Exporting scene from camera view from Terragen 2 to Lightwave

Started by Franco-Jo, January 04, 2012, 10:16:45 AM

Previous topic - Next topic

Franco-Jo

Firstly, I am (as many people confess), a noob to Terragen 2.0. I have created a landscape with the intention of exporting the view from the camera into Lightwave. I need to be able to bring a low poly version of the landscape from Terragen 2 into Lightwave with the camera view replicated.

I have followed the advice in this thread > http://forums.planetside.co.uk/index.php?topic=5852.0 . I've created a LWO Micro exporter, assigned it to the micro handler, unchecked Extra output images, set all Sequence fields to 1 and hit Render Sequence which turns up a WriteLWO2: Unable to open file: terrain_2.lwo

I'm obviously doing something wrong or the software is acting up, I'm going with the former.

Also, I am using a Procedural Terrain (I think??) which I recall reading somewhere that I have to convert it which I have no idea how to do.

Another issue is that the final dimensions of the video in Lightwave will be 5760 x 1080 as the video will be a wide panoramic HD, 3 screen projection. I've read that I will need to keep the detail down for Lightwave so I'm a little confused as to what the export dimensions should be. If it's 5760 x 1080 in Lightwave, should that be the export and if so, I'm guessing LW won't like it?

Can anyone offer any help?

Tangled-Universe

Do an advanced search for "micro exporter" and set 'by user' to my nick.
A couple of hits will perfectly explain the do's and don't's for exporting a mesh from TG2.

Simply put you should export as much of the terrain as visible in the final LW shot.
As you can read in the search hits the export will be based on what's being rendered, thus visible to the render camera.

For this I'd recommend using a separate camera, which is high(er) altitude and facing down, to export the terrain.
Using the crop settings of the renderer allows you to export very rectangular sections of terrain.

cyphyr

Also you can't export the camera from Terragen as such, but you can bake it.

Go to Projects>Bake Animation Curves.

This will create a key frame for every frame but the camera animation is still not exported. Once the Terragen project is saved you can open it in a text editor and simply copy and paste the camera data into LW.

Good luck

Richard

www.richardfraservfx.com
https://www.facebook.com/RichardFraserVFX/
/|\

Ryzen 9 5950X OC@4Ghz, 64Gb (TG4 benchmark 4:13)

freelancah

I believe there are tutorials @ planetside.co.uk site for max and maya. The method is pretty much the same.. Also Carl Ocestra just updated a LW plugin for cameras here: http://forums.planetside.co.uk/index.php?topic=11484.0 maybe it helps too

Tangled-Universe

Quote from: freelancah on January 04, 2012, 01:09:44 PM
I believe there are tutorials @ planetside.co.uk site for max and maya. The method is pretty much the same.. Also Carl Ocestra just updated a LW plugin for cameras here: http://forums.planetside.co.uk/index.php?topic=11484.0 maybe it helps too

That's outdated stuff in my opinion. The micro exporter is much better than the LWO exporter discussed there and in the meantime TG2 underwent other significant improvements.

freelancah

Ah right it was for LWO exporter. I wasnt able to check due posting on my cell but yeah that's true

Matt

Richard, can you elaborate more on "simply copy and paste the camera data in LW"? How does LW understand it?
Just because milk is white doesn't mean that clouds are made of milk.

rcallicotte

Great topic!  So good to understand all this.  Thanks everyone!
So this is Disney World.  Can we live here?

cyphyr

Umm, yah!  ::)
Lol I realize:
a. I answered a question that wasn't actually asked and
b. its a bit more complex than "simply copy and paste the camera data in LW"

I have however in the past used the baked camera data in a saved .tgd. I open this in a text editor and can copy the camera data

<param name = "position"
vf1 = "0 1000 -1300"
vf2 = "6.853164968 998.3300004 -1297.403985"
....
/>
<param name = "rotation"
vf1 = "-20 30 0"
vf2 = "-20.00646223 29.76331083 0"
....
/>

and strip out the brackets, text and vf1 = " and the final " leaving


0 1000 -1300
6.853164968 998.3300004 -1297.403985
....

-20 30 0
-20.00646223 29.76331083 0
....

Which can be "paste special" into a spreadsheet, manipulated (xyz and hpb columns can be moved and swapped easily) and saved out as an appropriate .chan file.

:)

Richard

Sorry for my confusion, manage to get the wrong end of the stick sometimes!
www.richardfraservfx.com
https://www.facebook.com/RichardFraserVFX/
/|\

Ryzen 9 5950X OC@4Ghz, 64Gb (TG4 benchmark 4:13)

Matt

Franco-Jo,

First, if you haven't already done so, can you please check that you are using Terragen v2.3 and not v2.0? To get updates you can use the Check for Updates feature inside Terragen, on the Help menu.

In 2.3 use the "Micro Exporter" instead of the "LWO Micro Exporter", but the following advice applies to both. The exported geometry contains every micro-polygon that was rendered in the camera's view. The number of micro-polygons can be the millions, especially at the output image resolution you are talking about, because micro-polygons are built to occupy only few pixels each and many times they are even smaller than a pixel (this is especially a problem with flat or nearly-flat horizons). The higher the image resolution, the more detailed the output geometry will be. It also completely depends on the 'Detail' setting on your render node. 5760 x 1080 will produce an insane amount of geometry at the default detail of 0.5. You could reduce this to 0.05 and you might get something usable, but I go for a smaller image resolution instead. I'd recommend starting with something very, very low resolution so you can see how the process works. Then keeping upping the detail or the resolution until you get the level of detail you want. To start with I would try a render of 576 x 108. Set the 'Detail' on the render node's Quality tab to 0.1. The geometry will probably be light-weight and the renders should hopefully be nice and quick to test the process.

I am not sure why you got that error or whether you edited the filename when reporting the error here, but I just want to say make sure you choose a folder to put the file in, not just enter the name of the file in the edit field. Also, saving to the root C:\ drive on Windows usually doesn't work because of permissions settings in Windows, but I can't tell if that's what happened here.

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

Franco-Jo

Thank you very much for all of your responses!

Matt: Yes, I'm on 2.3 and have followed yours and Tangled-Universe's advice with the "Micro Exporter" with success.

Here are the steps that I followed, in the event that anyone else reading this is wondering what they were exactly. Copied and pasted Tangled-Universe's response for ease from another thread:

1) create a "micro exporter" `(right mouse button -> create other -> micro exporter)

2) double click on it and set the filename to something like "terrain.obj" (it automatically saves it as obj then)

The near and farthest settings control the distance over which TG2 will output the geometry.
The output of the geometry is based on what your render camera sees.

So what also works well is a 90 degrees down facing camera at 0, Y, 0 where Y is an appropriate altitude from where it can "see" the portion of the terrain you want to be exported.
If the altitude of your camera is 1000m then set farthest distance to something a bit bigger, say 1500m. Then all geometry up to 1500m away from the camera will be exported.

3) Once the micro exporter is configured you need to enable the export in the render node, so go to the render node

4) In the last tab, called "sequence/output", you need to enable the micro exporter by clicking on the green '+' sign then choose "assign micro handler" and choose "micro exporter 01". Don't forget to actually activate the output by checking the box to the left.

5) Now your export-camera and mesh export node are configured, all you need is to render your scene and with each render it will automatically save out the mesh. So don't forget to disable it after you're done with exporting, because.....

6) The number of triangles is determined by the render detail setting in the quality tab. For export a detail of 0.4-0.5 results in a nice mesh suitable for animating a camera-path or fluid-sims.
If you render with detail 0.8 or higher, for instance, the mesh will become VERY dense and the exported file will become very large and also will take some time.

I then followed Matt's advice and tried settings at 0.1 and carried it up to 0.5 (the last of which ended up being the most appropriate for my needs).

cyphyr - I did ask about the camera data but I'm struggling to work your method out, though I appreciate the added information you've given. I'll press on and see if I can make it work!




Tangled-Universe

The render detail setting for exporting is also resolution specific.
0.4 - 0.5 is generally too high, but if you render that at a very low resolution you may end up with a similar number of polygons compared to rendering with detail 0.1 and 2 or more times higher resolution.