more than 6 digits ?

Started by Seth, June 08, 2011, 01:34:18 PM

Previous topic - Next topic

Seth

Hello there !
I have a little problem : I imported a camera from Maya, the same way I did with the last scenes I am working on, but the problem is that the coordinates out of Maya have more than 6 digits. So when this .chan is imported into TG2, the camera doesn't react properly (like shaking).
any idea, guys ?

Tangled-Universe

With 6 digits for position it's not enough?

Is it like: 1234.56 = 6 digits
Or like 0.123456 = 6 digits

In the first case I can imagine it gives troubles in TG2, but in the second case?

Seth


Tangled-Universe

Oh...that's lame

Only thing I can think of is offsetting your camera export in Maya to generate smaller numbers.
Then use the same offset in a translate shader in TG2 to move the terrain/shaders/atmosphere.

Seth

yeah... I'm trying to rescale everything in Maya and change the import scale to see if it works better ^^

Tangled-Universe

I'm actually quite surprised that the system is limited to 6 symbols in the way you describe it.
Yet another reason to stay as close to the origin as possible in TG2.
I wonder if it would have great impact if Matt could change this from 6 to 8 or more. Would it become slower?

Seth

Quote from: Tangled-Universe on June 08, 2011, 02:28:34 PM

Yet another reason to stay as close to the origin as possible in TG2.


absolutely right !!!!

Matt

#7
Terragen will import as many digits as your .chan file contains (up to the limit of a 64-bit "double" floating point value). This sounds like a limitation of the .chan exporter in Maya, not Terragen's importer. Although Terragen only displays up to 6 digits in the edit fields, the internal value can be much more precise. It renders with those precise internal values.
Just because milk is white doesn't mean that clouds are made of milk.

Seth

okidoki, thanks for that Matt !!!
gonna find someone to check my exporter in the company right now !!! ^^

Cheers !

Tangled-Universe

The MEL-script I've found here: http://forums.planetside.co.uk/index.php?topic=1466.0 exports in 10 digits.
Open the .mel in a text-editor and search for "-pre" and you'll find one string which says "-pre 10".

There should be a similar string in your melscript. If it is not defined it is set to 6 I just read somewhere.
I'm afraid it isn't defined, so you should lookup for a similar part of the code?

Seth

holy crap ! thanks Martin !!! ;D

Tangled-Universe

Say thanks to Google, I know nothing about Maya and/or MEL scripting ;D

But did it work?

Seth

nope... no "-pre" of anykind. Just look at the file you send and do some google research too :P
but I'll see tomorrow... someone here should be able to edit correctly the script.  ^^
thanks again Martin !

Seth

Matt was right, I had the problem in the preview box, but when I rendered the all animation, the camera was moving smoothly ! :D

Tangled-Universe

Quote from: Seth on June 09, 2011, 04:27:40 AM
Matt was right, I had the problem in the preview box, but when I rendered the all animation, the camera was moving smoothly ! :D

Aaahhh...so it was actually a discrepancy between preview and real render, good to know.