Animation axis??

Started by gneale, August 14, 2007, 01:43:02 PM

Previous topic - Next topic

gneale

What is the axis order for t2?  I'm exporting animation data out of max as .chan with XYZ order.  Ocasionally it will flip the camera around its axis in t2 during the animation for no appereant reason, like its doing a barrel roll or some such.  any ideas?  thanks!

-Geoff

old_blaggard

X and Z are horizontal, while Y is vertical.  However, if you are on a different part of the planet, that can change, because the coordinates are based on a grid and not on the planet's spherical surface.
http://www.terragen.org - A great Terragen resource with models, contests, galleries, and forums.

rcallicotte

Ahhh.  So, while I knew this in part, this might affect how to place a terrain on the other side of the planet.  Using negative Y values is the way, I guess.  Right?
So this is Disney World.  Can we live here?

old_blaggard

Possibly.  I frankly haven't experimented with that too much - being near the starting point of the planet has always been good enough for me.  Give it a shot and let us know how it works out ;).
http://www.terragen.org - A great Terragen resource with models, contests, galleries, and forums.

rcallicotte

I might do this tomorrow...      :P
So this is Disney World.  Can we live here?

bigben

Altitude is calculated from the planet surface unless you have "Use Y for altitude" checked in your shader, but that's only really useful for loaded terrains that also have "Flatten first" checked in their displacement, which in turn isn't practical for a whole planet as you get a flat terrain, not a spherical one.

As for placing terrains, I don't think you can place a terrain on the other side of a planet. Terrains are currently mapped by simply projecting the terrain down onto a sphere from the top. To cover large sections you need to select an appropriate projection for the terrain.  It would be nice to be able to place equirectangular projected terrains onto portions of a planet, but this is not possible at present. You can use a spherical projected image map for a displacement shader for the entire planet but this limists your resolution.

I've been setting up multiple terrains of different resolutions to provide padding for a high resolution area of interest to allow the camera to fly down from a very high altitude (http://forums.planetside.co.uk/index.php?topic=2036.0), but this is still restricted to working on one hemisphere. 

On idea I had toyed with was using transform shaders to move the terrain and clouds around the camera. The camera would stay at 0,0 changing only altitude and orientation but I don't think that will help with loaded terrains as it still doesn't address projection issues.

Matt

Hi Geoff,

Have you looked at the rotation values in the .chan file at the frames where the flip occurs? It would be useful to rule out the possibility that the .chan exporter is creating unfriendly values.

Matt
Just because milk is white doesn't mean that clouds are made of milk.

Matt

#7
The rotation order is ZXY in TG2 coordinates and also in .chan coordinates. In other words Bank, Pitch, Heading. If you check "Import Z up" then it expects the Y and Z to be swapped, so the rotation order in .chan coordinates would be YXZ.

Matt

Just because milk is white doesn't mean that clouds are made of milk.

gneale

Thanks Matt.

The  script we are using ended up handling the max -> t2 data pretty well.  It actually would come into T2 pretty fine and dandy.  I will have a look at the data set in the channel file later today when we are done to see if there is anything out of whack.  I think imagine T2 was not happy with some of the extreme rotations I was doing with the camera as I was mimicking some map of the earth flying (2000 frames worth!).    Thanks!

-G


Matt

OK, if you find any particular values that TG2 doesn't like then I will try to make improvements if possible.

Would you be able to provide script to the TG2 community (or is it available already)?

Matt
Just because milk is white doesn't mean that clouds are made of milk.

gneale

It was Lazlo's old maya to max camera channel data script.  We changed some lines to make it export the extra channels T2 needed.  Lazlo's script is still up on scriptspot.  I'll have to see if we can post our edit.  I'll scour over the data and see if I can get you those values.  Thanks man, T2 is rockin.

-G


bigben

My (alpha) animation script tool might help. http://forums.planetside.co.uk/index.php?topic=1841.0  It basically imports a CHAN file and the allows you to manually specify the field mapping and conversion settings to be compatible with TG2.