Planetside Software Forums

General => Terragen Discussion => Topic started by: Nala1977 on May 09, 2021, 05:54:13 AM

Title: Animated Geometry
Post by: Nala1977 on May 09, 2021, 05:54:13 AM
Hey guys, so i've created this kind of animation growth on this tree, i am trying to import an animated mesh into terragen but i can not understand how can i do this.

i've exported the trunk/branches and leaves as FBX to retain animation and growth, but when i get into Terragen from File > import FBX scene, it imports nothing, blank, no geometry.
what could be the issue?
Title: Re: Animated Geometry
Post by: digitalguru on May 09, 2021, 10:28:57 AM
FBX only imports cameras and lights, geometry can only be imported as an .obj or .tgo

Terragen can import an .obj sequence and that would be your best bet to create a growing tree like the one in your example.
Title: Re: Animated Geometry
Post by: Nala1977 on May 09, 2021, 12:22:35 PM
maybe im dumb but i can not see any obj sequence import, when i go from file > import obj, it just imports the first frame. under the Sequence tab i've set the frames but it still imorts a single object
Title: Re: Animated Geometry
Post by: WAS on May 09, 2021, 01:01:36 PM
I think you do the "objectName_%04d.obj" where the object files are 0001 - 1000 sort of filename range. Then I believe TG steps through the files for each frame. Not positive yet I haven't done a animated object besides animated shaders.
Title: Re: Animated Geometry
Post by: digitalguru on May 09, 2021, 04:36:05 PM
Quote from: WAS on May 09, 2021, 01:01:36 PMI think you do the "objectName_%04d.obj" where the object files are 0001 - 1000 sort of filename range. Then I believe TG steps through the files for each frame. Not positive yet I haven't done a animated object besides animated shaders.
That's right, %04d is the file token to render and read sequences - the 4 in that token is the number of digits in the file number. So a file sequence can be named:
tree.0001.obj
tree.0002.obj etc
and the import file name:
tree.%04d.obj (you can use periods to separate out the file numbers)
It isn't the most elegant way of getting deforming animation into Terragen, but for your example where it looks like new geo is being generated per frame it's the best and only solution.
Note this won't have any motion blur when rendered in Terragen, but TG doesn't blur imported objects anyway.

p.s what app are you exporting that geo from?
Title: Re: Animated Geometry
Post by: Nala1977 on May 10, 2021, 02:45:36 AM
Quote from: digitalguru on May 09, 2021, 04:36:05 PM
Quote from: WAS on May 09, 2021, 01:01:36 PMI think you do the "objectName_%04d.obj" where the object files are 0001 - 1000 sort of filename range. Then I believe TG steps through the files for each frame. Not positive yet I haven't done a animated object besides animated shaders.
That's right, %04d is the file token to render and read sequences - the 4 in that token is the number of digits in the file number. So a file sequence can be named:
tree.0001.obj
tree.0002.obj etc
and the import file name:
tree.%04d.obj (you can use periods to separate out the file numbers)
It isn't the most elegant way of getting deforming animation into Terragen, but for your example where it looks like new geo is being generated per frame it's the best and only solution.
Note this won't have any motion blur when rendered in Terragen, but TG doesn't blur imported objects anyway.

p.s what app are you exporting that geo from?
my main 3d app is Softimage, thanks everyone for the tip, i'll try and get things done
Title: Re: Animated Geometry
Post by: Kevin Kipper on May 10, 2021, 03:07:00 PM
Also check out the documentation under the Sequence Tab here:
https://planetside.co.uk/wiki/index.php?title=OBJ_Reader
Title: Re: Animated Geometry
Post by: KlausK on May 11, 2021, 10:24:23 AM
This is a very simple test animation with a obj sequence.
The lightest tubes in the front are the sequence. The others are simply re-imported and transformed.

The animation is done in Softimage XSI 2015.
One circle is extruded along multiple curves over a 100 frames.
The object exporter is set to merge all parts of the original into a single object.
Maybe I am going to try some more involved stuff. It`s fun, actually.

CHeers, Klaus
Title: Re: Animated Geometry
Post by: KlausK on May 11, 2021, 10:37:02 AM
Btw. :

there is a annoying thingie happening in regards to the "Error and Warnings" window.

Even though I deactivated "Show warnings in Errors and Warnings window by default" in the Preferences / General
the window pops up when I try to change the file name of the imported obj in the "Object Reader" to filename_%3d.obj.
This then blocks the obj inspector, you have to click around to get back to the inspector, put in the next letter - it pops up again
and so on and so forth. Which is quite time consuming when you import lots of obj into a scene.
Since this window pops up under various circumstances it is just...well, whatever.

CHeers, Klaus