Issues with I/O from Terragen 4.4.4 professional to Maya 2023

Started by dangerweenie, August 03, 2022, 04:44:44 PM

Previous topic - Next topic

dangerweenie

Hi there!

I'm currently running into three issues:

1. I've created a very stylized low-poly environment in Terragen (primarily by lowering the micropoly detail to .01).  I rendered it out and it looks great, except for the fact that when I play it back, there's tons of polygons popping on and off - is there any way to generate a static mesh so that the geometry isn't quite so adaptive?

2. When exporting the scene as FBX via File->Export in Terragen, 
    1. The camera is not viewable in Maya, due to the massive scale changes in movement (10,000 units per frame).  I checked the "scale" attribute in Terragen's export dialogue, but regardless of it being 1.0 or .00001, the camera comes in the same.  I've read a lot about exporting cameras and seen some plugins and scripts that are now deprecated - is there a way to just send cameras from Terragen to Maya that result in a scene that is possible to work with?  
    2. When exporting the terrain via Micro Exporter (default, not LWO), The geometry is extremely curved, broken up, and none of the triangles are really displaced (and it's not even in the FOV of the aforementioned camera).

I've watched quite a few videos and checked the help docs (incl the FBX), and haven't had any luck.  I'd be deeply grateful if anyone could provide some guidance around this!



Kevin Kipper

Hi dangerweenie,

For the polygons that are popping on and off in the rendered frames, try changing the Renderers > Advanced > Ray detail region from "Detail in camera" to "360 degree detail (optimal)".  Alternatively, you could export the low res terrain via the micro-exporter, then load it back into Terragen as an OBJ.

Can you upload your project so we can take a look at it for the other questions regarding FBX export and the micro exporter?

Thanks

KlausK

...maybe try to scale down the fbx units when importing into Maya, not on export from TG.

I can say this:

Animated a Camera over a hundred frames and exported as a fbx file.

Newtek LightWave 2020.3 reads it in. Automatic scaling on import gets the values used in TG. That is to say probably miles/kilometers.
So the scene might look "unusable" on import.
I scaled it down with a factor of 0,01 which gives me a very usable sized camera path.

Autodesk Softimage 2015 SP2 cannot read the fbx from TG anymore.
Something changed at some point in the TG release cycle. Forgot, which version used to work.
On import I get this error message in Softimage XSI:

# ERROR : 2229 - Invalid argument.  UI Items should be specified as a 1D array of String/Value pairs.

It would be cool, if Matt or someone would be able to make that work again.
Right now my workaround is to import into LW and export from there. I choose FBX version 2014.
More recent versions of LightWaves FBX Exporter (2016 etc) do not work for XSI.
FBX 2014 files I can import back into XSI.

CHeers, Klaus
/ ASUS WS Mainboard / Dual XEON E5-2640v3 / 64GB RAM / NVIDIA GeForce GTX 1070 TI / Win7 Ultimate . . . still (||-:-||)

dangerweenie

#3
Quote from: Kevin Kipper on August 03, 2022, 05:10:05 PMHi dangerweenie,

For the polygons that are popping on and off in the rendered frames, try changing the Renderers > Advanced > Ray detail region from "Detail in camera" to "360 degree detail (optimal)".  Alternatively, you could export the low res terrain via the micro-exporter, then load it back into Terragen as an OBJ.

Can you upload your project so we can take a look at it for the other questions regarding FBX export and the micro exporter?

Thanks
I don't think I've ever seen such a quick and helpful response - totally impressed!
Here's a screenshot from Maya after importing the micro-export with the toggle (360 optimal) turned on.  It's curved (as the earth is), and it looks like it included the atmosphere backdroup as geo as well.  For the render, the polycount change and popping/disappearing did not change.  The micro-export is also unusuable (its just a very triangulated partial sphere with little to no height/raised geometry)

I saw there were other interesting settings re: ray detail / adaptivity, but I didn't touch any of them.

I'm really just trying to create and animate a simple linear camera fly-over of some generic low poly mountains, and then adding some animated giant birds in Maya for a personal project - considering maybe just using a mountainSOP or deformer in Houdini/Maya and doing it all in there, but I'd really like to get better with Terragen while I have access to it.

TIA for any help and advice!  Do you guys have a Discord?
What's the best way to upload a file?  Google Drive? 
https://imgur.com/a/OkIgefD

Kevin Kipper

Hi dangerweenie,

Thanks for providing the screenshot, as it helps to get a better idea of what you're trying to accomplish. 

The exported terrain will contain the curvature of the earth.  By setting the "Farthest Distance" parameter you can exclude the background sphere.  You can also simply disable the backgroud sphere in the Object Node list.

The lack of detail in the exported terrain is partially due to the "Micropoly detail", the resolution you're rendering, and how large an area of terrain you're exporting.  In your first post you mentioned "10,000 units per frame", which is an extremely large amount and probably on a planetary level.  Keep in mind that the default unit of measurement in Terragen is 1 unit = 1 meter.  So as you create your animation think about how far you're traveling in real world scale.  You may determine that for your simple linear camera fly-over some generic low poly mountains with some birds,  you may only be traveling over a few thousand meters.  Knowing this will allow you to maximize the detail exported via the micro-exporter.

The recommendation to change the "Ray Detail Region" settings, won't help you with the micro-exporter.  That helps when you're rendering an image sequence in Terragen, and you find that shadows and reflections are popping in the rendered frames because the camera is not aware of the terrain outside its field of view.

If you haven't watched the first few chapters of the "Terragen for Vfx" videos, I would highly recommend it. 

Go ahead and email your Terrgen project file to support@planetside.co.uk and I'll take a look at it.

digitalguru

Quote from: dangerweenie on August 03, 2022, 04:44:44 PMis there a way to just send cameras from Terragen to Maya that result in a scene that is possible to work with? 
Yes, my Maya script - Terraman - can do just that. Amongst many other features, it can import camera data from Terragen to Maya.
It can also import cameras and terrain at preset scales to avoid have large unworkable scene extents in Maya (eg.: 1:100, 1:1000, 1:10000 )
It's available to purchase on Gumroad:
https://grahamcristie.gumroad.com/l/wxcbx
Overview and walkthroughs here:
https://www.youtube.com/playlist?list=PLm8w7fdcRUoKGFggtnUVWdXec4OQXT063
If you decide to purchase it, pm me and I can help you get up and running with your scene.

WAS

Quote from: KlausK on August 04, 2022, 06:39:51 AM...maybe try to scale down the fbx units when importing into Maya, not on export from TG.

I can say this:

Animated a Camera over a hundred frames and exported as a fbx file.

Newtek LightWave 2020.3 reads it in. Automatic scaling on import gets the values used in TG. That is to say probably miles/kilometers.
So the scene might look "unusable" on import.
I scaled it down with a factor of 0,01 which gives me a very usable sized camera path.

Autodesk Softimage 2015 SP2 cannot read the fbx from TG anymore.
Something changed at some point in the TG release cycle. Forgot, which version used to work.
On import I get this error message in Softimage XSI:

# ERROR : 2229 - Invalid argument.  UI Items should be specified as a 1D array of String/Value pairs.

It would be cool, if Matt or someone would be able to make that work again.
Right now my workaround is to import into LW and export from there. I choose FBX version 2014.
More recent versions of LightWaves FBX Exporter (2016 etc) do not work for XSI.
FBX 2014 files I can import back into XSI.

CHeers, Klaus


You sure there isn't a setting that is expecting ASCII FBX? I am pretty sure TG uses Binary FBX. Seems it's trying to be read as a text file and just pull the class array from it.Binary FBX is actually an object, not even an array to begin with.

Also wonder if the old converters would help: https://www.autodesk.com/developer-network/platform-technologies/fbx-converter-archives

digitalguru

Personally I avoid exporting terrains via the Micro Exporter to FBX - the terrains generated always contain duplicated vertices and cleaning these can massively reduce the file size

Terragen's FBX is a binary and you could clean that too, but you would have to go through a few more conversion steps (or import into Maya) to clean it.

If you want to "freeze" you low micro poly terrain, you could try exporting a vector displacment map (or "regular" scalar displacement if you only have a heightfield with no lateral displacement) then re-import as displacement and render at a higher micropoly detail:
https://www.youtube.com/watch?v=bTKfAeEPDhY&list=PLm8w7fdcRUoJG9kDkJ3immafR6lErhZiG&index=1&t=11s

KlausK

@WAS thx for your response.

Yes, TG uses binary fbx. And no, there is no setting that lets me choose to import binary or ascii in Softimage XSI.

The import is handled by Crosswalk which was/is a import-export "addon" for the Autodesk Media and Entertainment applications.
So you could send scenes from XSI to Maya, Mudbox, 3DSMAX etc. and back. I guess it reads wether it is a binary or a ascii fbx and handles it.
But the latest version of Crosswalk dates from 2015.

When I export a fbx from XSI I have the option to encode it as a binary or a ascii if you need to get it into a software which cannot read the binary fbx.

And the latest converter of that site you linked is version 2013 - which gives the same error I get when I try to import to XSI:
"File corrupted" (that is the TG exported fbx). Been there a long time ago ;)

The workaround via LightWave is not too inconvenient. At least I am able at all to get it into XSI.

CHeers, Klaus

/ ASUS WS Mainboard / Dual XEON E5-2640v3 / 64GB RAM / NVIDIA GeForce GTX 1070 TI / Win7 Ultimate . . . still (||-:-||)

KlausK

btw I looked at the fbx exported from TG in a hexeditor and saw that the FBX SDK Exporter Plugin used in my TG version (4.5.71) is 2016.1.2
I guess there have been changes in the FBX SDK after XSI had been discontinued. And XSI simply does not know how to interpret what it finds at import time.
Maybe the Error message is totally unrelated in that case and a guess as good as any other.

CHeers, Klaus
/ ASUS WS Mainboard / Dual XEON E5-2640v3 / 64GB RAM / NVIDIA GeForce GTX 1070 TI / Win7 Ultimate . . . still (||-:-||)