Units and Interoperability.

Started by dyarza, August 03, 2007, 04:44:06 PM

Previous topic - Next topic

dyarza

Hi everyone,

I have a questions about the unit system in TG2.  I would like to match the camera in TG to the camera in my Cinama4D scene so that I can composite a rendering of a building into the TG landscape.

Has anybody done this successfully?  The coordinated in TG seem somewhat arbitrary.

Thanks,

D

Oshyan

The coordinates are specified in meters with an origin point 0,0,0 which in the default scene is on the planet surface, in view of the starting camera position. What other information do you need on the unit specifics? I'm afraid I can't help with C4D's unit specifications or conversion.

- Oshyan

dyarza

Thanks, that helps.

I set up C4D to have inches as my unit of choice, so I can convert the values easily.

So if I understand you right 0,0,0 is on the surface of the planet.  which way is considered north?  (0 degrees heading for the sun?)

Thanks,

D

Oshyan

I don't think 0 would actually be considered North. 0 heading for camera and sun seems like "West" to me. The heading for the camera and sun are the same in any case.

- Oshyan

bigben


Oshyan

How do you define "north"? Obviously if you're corresponding it *directly* with degrees it is, but is there an absolute here? If you look at the default planet, is "north" (0) woult you would expect it to be?

- Oshyan

Matt

Currently TG2 does not define a 'north'. You can call 'north' whatever you want. However, when importing real world DEM data, real world North is usually mapped to the Z coordinate in TG2 space.

In future when TG2's heightfield system supports latitude and longitude, the labels North, South, East and West will have real meaning, but then north will no longer be along the Z axis.

To match coordinates with C4D you should set C4D's units to "metres". I believe C4D uses "Y = up" by default, so you may need to swap Y and Z when converting to Terragen. You may also need to negate Z (TG2's Z) if C4D uses a right-handed coordinate system.

Rotation is slightly more tricky. The rotation order in TG2 is ZXY and you may have to negate both Y and Z. The rotation order becomes "Bank, Pitch, Heading".

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