Planetside Software Forums

General => Terragen Discussion => Topic started by: Seth on June 08, 2011, 01:34:18 PM

Title: more than 6 digits ?
Post by: Seth on June 08, 2011, 01:34:18 PM
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 ?
Title: Re: more than 6 digits ?
Post by: Tangled-Universe on June 08, 2011, 02:01:33 PM
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?
Title: Re: more than 6 digits ?
Post by: Seth on June 08, 2011, 02:03:49 PM
12345.678 => problem
Title: Re: more than 6 digits ?
Post by: Tangled-Universe on June 08, 2011, 02:09:25 PM
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.
Title: Re: more than 6 digits ?
Post by: Seth on June 08, 2011, 02:25:13 PM
yeah... I'm trying to rescale everything in Maya and change the import scale to see if it works better ^^
Title: Re: more than 6 digits ?
Post by: Tangled-Universe on June 08, 2011, 02:28:34 PM
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?
Title: Re: more than 6 digits ?
Post by: Seth on June 08, 2011, 02:33:58 PM
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 !!!!
Title: Re: more than 6 digits ?
Post by: Matt on June 08, 2011, 02:51:34 PM
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.
Title: Re: more than 6 digits ?
Post by: Seth on June 08, 2011, 02:53:33 PM
okidoki, thanks for that Matt !!!
gonna find someone to check my exporter in the company right now !!! ^^

Cheers !
Title: Re: more than 6 digits ?
Post by: Tangled-Universe on June 08, 2011, 03:12:12 PM
The MEL-script I've found here: http://forums.planetside.co.uk/index.php?topic=1466.0 (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?
Title: Re: more than 6 digits ?
Post by: Seth on June 08, 2011, 03:31:51 PM
holy crap ! thanks Martin !!! ;D
Title: Re: more than 6 digits ?
Post by: Tangled-Universe on June 08, 2011, 03:37:02 PM
Say thanks to Google, I know nothing about Maya and/or MEL scripting ;D

But did it work?
Title: Re: more than 6 digits ?
Post by: Seth on June 08, 2011, 04:01:32 PM
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 !
Title: Re: more than 6 digits ?
Post by: 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
Title: Re: more than 6 digits ?
Post by: Tangled-Universe on June 09, 2011, 08:03:45 AM
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.
Title: Re: more than 6 digits ?
Post by: Matt on June 09, 2011, 11:59:07 AM
Quote from: Tangled-Universe on June 09, 2011, 08:03:45 AM
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.

I think Seth is talking about the edit fields in the parameter view, which only show up to 6 digits even though the internal value may have more precision (unless you edit them by hand).
Title: Re: more than 6 digits ?
Post by: Tangled-Universe on June 09, 2011, 12:19:42 PM
My mistake, I confused preview box with preview render as he had a wobbly camera move.