Planetside Software Forums

General => Terragen Discussion => Topic started by: Cephei on March 15, 2009, 09:48:09 PM

Title: Can't Export from Terragen 2
Post by: Cephei on March 15, 2009, 09:48:09 PM
After a Long run with Trial and Error, I have come very close to actually exporting my scene from TG2 into Lightwave.
But for some wierd reason it won't work.

I'm not sure what I do wrong, I have my scene... I apply "Heightfield export LWO 01" double click and hit export to file yet nothing exports. No terrain...

Any help would be Greatly appreciated.

~Ceph
Title: Re: Can't Export from Terragen 2
Post by: rcallicotte on March 15, 2009, 11:08:18 PM
If you're doing it correctly, you'll choose a file name for your export and save it in a place where you can find it. 

Have you done a search to see how it's done?
Title: Re: Can't Export from Terragen 2
Post by: Cephei on March 16, 2009, 06:37:14 AM
Hey thanks for your reply!

I am quite sure I do it correctly.. 
I'll take a screen shot for you

http://img27.imageshack.us/my.php?image=clueless1.jpg
Title: Re: Can't Export from Terragen 2
Post by: Mohawk20 on March 16, 2009, 07:49:02 AM
Ah, there's your problem... The export should go after the terrain, but in this case it won't work, as the terrain should be a heightfield, and not a procedural. You should use an lwo export node to export the camera view to mesh. Dont have time to explain how that works exactly, but perhaps someone else can, or I'll do it when I come home...
Title: Re: Can't Export from Terragen 2
Post by: rcallicotte on March 16, 2009, 08:43:15 AM
The heightfield or land-mass you want to export needs to go into the Lightwave Export node and then double-click the Lightwave Export node to save your file.  Then run it.
Title: Re: Can't Export from Terragen 2
Post by: Tangled-Universe on March 16, 2009, 09:31:02 AM
May I add that you don't render at too high quality settings, because the density/detail of the mesh would become very very high and thus very very big.

I don't have much experience with this either, but I have read somewhere before that renders at 600x600px and detail 0.5 is sufficient in most cases.
Title: Re: Can't Export from Terragen 2
Post by: Cephei on March 16, 2009, 04:17:18 PM
Hey all sorry for replying so late (College)
Thank you all for the great replies!

I haven't been working with TG2 for too long, so I am still quite a newbie (But ALWAYS willing to learn... since I'm a quick learner I guess I enjoy learning)
So forgive me, but I still havent a clue how to fix this .... hahaha :Is so ashamed.:

@Mohawk20, You say I should use an LWO export node to export the camera view to mesh... anybody know how I'd roughly go about doing that? This node talk is still quite new to me haha
Title: Re: Can't Export from Terragen 2
Post by: neuspadrin on March 16, 2009, 04:46:58 PM
You need to reverse where the heightfield export goes.  Nodes work the same way as a flow chart, following the little arrows.  Basically your attempt was trying to export nothing because there was 0 input into the lwo exporter.  You need the lwo exporter to receive a heightfield that has been generated. 

Here's an example of what I think they wanted you to do:
Ive never done this and I don't have Lightwave to test it in really quick, but heres my shot.  It exported something, quite a few somethings in fact.
Title: Re: Can't Export from Terragen 2
Post by: Cephei on March 16, 2009, 05:05:39 PM
Hey Neuspadrin! Thank you so much for the help!
And you were right! it worked, same way as yours did... 16 objects exported just like yours... but this time when I opened my scene in Lightwave I got quite the unexpected result...

http://img212.imageshack.us/img212/9164/clueless2.jpg

Yep... My scene did look quite a bit more attractive than that... Assuming that's my scene.
Any ideas what possibly could have gone wrong?
Title: Re: Can't Export from Terragen 2
Post by: neuspadrin on March 16, 2009, 05:53:32 PM
I started to think about Mohawk's comment about using the render camera to export etc.  Noticed there was a micro exporter for lwo, and under the renderers tab, under sequence/output tab at bottom (where you usually are on quality and change those settings like GI and AA etc)

this exporter seems to create a huge lwo object of the terrain from the render camera view, but doesn't do backfacing... so you get just the visible terrain from the render camera.  If you were going to shift the render camera maybe a top/down approach could work to get all the terrain you need.  I imported the lwo made into blender, and after moving it around (since its so huge) i noticed it did indeed make the file correctly.

So i think this is what Mohawk was talking about creating a mesh from the camera's view.

Heres a screen shot
Title: Re: Can't Export from Terragen 2
Post by: Mohawk20 on March 16, 2009, 06:15:03 PM
As I said, your terrain is procedural, as opposed to a heightfield. All you did now was export a new and flat heightfield.

What you have to do is this.
Right-click in the node network and from the menu select 'Create other' -> 'Lwo micro exporter'.
The new node (gray coloured) should have appeared somewhere near the mouse cursor.
Double-click it to change it's settings.
next to 'Filename' is a blank field and a 'save' icon. Click the icon. Browse to a folder you want to save the lwo file in, and name the file to your liking, but make sure you add .lwo at the end as that doesn't happen automatically.

Now go to the render tab of the main window. Select the renderer you want to use (eg. 'Full Render'), to change the settings.
In the lower left you have some tabs, go to the last tab called 'Sequence/Output'. If you purchased Deep+Animation you can render a sequence here, but you can also add a Micro exporter.
To do that, check the box of Micro exporter (and you can uncheck the box above that if it's checked).
Than click the '...' button on the other side of the blank field.
Go to 'Assign micro_handler' -> '"/Lwo micro exporter 01"' (the lwo exporter we just created).
Now that's done.

Last thing we need to do is place the camera in a spot that overviews the area you want to export.
The should be like the image you posted above, so that's good.
Now set the resolution to something square, like 512x512, and the render detail to 0.5.
(I once exported at full render size and detail, but the file was so large LightWave could not handle it...!)

If you have steep cliffs or overhangs, do multiple renders/exports of top and side views to capture all vertexes, as the micro exporter only creates vertexes that are visible in the render.
You can render again at higher settings with the Micro exporter box unchecked to create a top view image map if you want...


I hope you have all the information you need now.
Title: Re: Can't Export from Terragen 2
Post by: Cephei on March 16, 2009, 06:32:37 PM
You Sir(s), Are genius...es (What's plural for genius?... Genei? Geniuses... I don't know.)
But thank you, it works perfectly, I shall show you the result once it's all in 3D Studio max...

Again, Thank you all for your wonderful help!! This forum is Really good and will be seeing a lot of me (Hopefully in time I'll be the one helping others.)

Thank you and you'll all hear from me shortly!

With Gratitude,
Ceph (Aka, Sekula... My real name)
Title: Re: Can't Export from Terragen 2
Post by: Cephei on March 16, 2009, 10:17:05 PM
Gah sorry for the double post... But I notice that once exported, the model is cut into 6 sections.. Aswell as the abnormal amount of holes in the bsp (And yes... it is a birds eye view render that I used... which means everything was in clear sight in the render). Any ideas?
Title: Re: Can't Export from Terragen 2
Post by: Oshyan on March 16, 2009, 11:01:22 PM
A couple of things here. First, if you want to export a non-camera dependent heightfield from a procedural (rather than heightfield) terrain, you can use the Shader input of a heightfield generate node to create a heightfield out of that procedural shader network input. Then just put the LWO exporter after the heightfield generate, first press Generate, then when done, press Export. If you really want a *camera dependent* LWO data export, then yes you should use the LWO Micro exporter.

As for why there are multiple files on export, the geometry is split up to avoid resolution limitations and save/load errors when LWO files get to too high a geometry level. This may be an outdated limitation as far as the current LWO format, I'm not sure, but there were issues in older format versions I believe, hence the files are split. The LWS scene file aligns them all together correctly. Alternatively you can reduce the geometry level being exported by reducing pixel resolution of the heightfield (or in the case of the LWO micro exporter, reduce render detail).

- Oshyan
Title: Re: Can't Export from Terragen 2
Post by: Cephei on March 17, 2009, 04:30:47 PM
Hmm Fair enough, the splits in the bsp arent much of a problem though... it's just the holes in the actual model that annoy me...

Ref:
http://img21.imageshack.us/img21/8099/53600449.jpg

As you can see... the entire object is Scattered with holes... I tried everything, exporting lower res, higher res, lower detail, higher detail... everything. and no help there are still holes all over it.
Title: Re: Can't Export from Terragen 2
Post by: Mohawk20 on March 17, 2009, 07:37:30 PM
Hmmm, annoying!
Have you tried combining the output of multiple camera angles? (I know the object file size will increase, but it's still worth a try.)


Or you could try the other method Oshyan wrote about, plugging your fractal terrain into the 'Shader' input of a 'Heightfield Generate' and then export like you did before.
Title: Re: Can't Export from Terragen 2
Post by: Cephei on March 17, 2009, 08:43:54 PM
Hmmm.... That Seems confusing, So bare with me while my mind attempts to comprehend this.

In theory, if I was to have 4 Cameras Each pointing to a single spot (The centre of the scene) and a fifth camera pointing down from the top, down; then Link all of them to the render... I would come out with that very scene... but with all sides, no holes or missing sides... just a single model.

As for Oshyan's method. Jee I would love to try that... but I seem to have err... well... misplaced my Fractal terrain, Seriously... the Fractal terrain is neither in the Terrain nodes nor the graph... so I'm a tad lost. :dumbfounded:
Title: Re: Can't Export from Terragen 2
Post by: jo on March 17, 2009, 10:15:38 PM
Hi Cephei,

Try looking for it in the Node Network view list. It could perhaps be inside another node. It would be interesting to know if it is, if it is then it's a problem we should try and address before release.

Regards,

Jo
Title: Re: Can't Export from Terragen 2
Post by: Mohawk20 on March 18, 2009, 05:21:23 AM
If you attach the tgd to your next post I could set up the nodes for you, and then I can tell you where they were hiding as well  ;)
Title: Re: Can't Export from Terragen 2
Post by: Cephei on March 18, 2009, 06:46:38 PM
Be my guest....

Wait how do I attatch the file?
Title: Re: Can't Export from Terragen 2
Post by: neuspadrin on March 18, 2009, 06:48:10 PM
See where you type replies? just below there should be a "additional options". clicky.  Choose file, and post.  It allows you to upload most file types that are important to share, with only a limitation of a file that is below 512kb
Title: Re: Can't Export from Terragen 2
Post by: Cephei on March 18, 2009, 06:55:02 PM
Ah thank you!
Here it is...

And btw, I can no longer open it... I don't know why... TG2 crashes everytime I open it.
Title: Re: Can't Export from Terragen 2
Post by: neuspadrin on March 18, 2009, 07:48:51 PM
switched one set of nodes, heres my switch. switched the output of heightfield into the input of mountains, not to blendshader of mountains.

Also set the render camera to not be wayyyyyy off in space far far away.  Can you open now no crash?
Title: Re: Can't Export from Terragen 2
Post by: Cephei on March 18, 2009, 07:59:21 PM
Damn you're good!
Yep it works perfect now! no problems. And yea the camera thing I just wanted to have a good full view of the planet :P.

Thanks a lot!, I'm going to retry the export... see if it works any better! :D.

EDIT: Alrighty yeah I checked the model out in max, still has a few holes but the outcome is far greater than my previous attempts, Thank you very much Neuspadrin!
Title: Re: Can't Export from Terragen 2
Post by: Oshyan on March 19, 2009, 12:40:17 AM
The holes are no doubt due to it being camera-dependent. Using the Heightfield Export LWO method should work better.

- Oshyan
Title: Re: Can't Export from Terragen 2
Post by: fxmodels on May 25, 2009, 04:58:16 PM
Quote from: Mohawk20 on March 16, 2009, 06:15:03 PM
As I said, your terrain is procedural, as opposed to a heightfield. All you did now was export a new and flat heightfield.

What you have to do is this.
Right-click in the node network and from the menu select 'Create other' -> 'Lwo micro exporter'.
The new node (gray coloured) should have appeared somewhere near the mouse cursor.
Double-click it to change it's settings.
next to 'Filename' is a blank field and a 'save' icon. Click the icon. Browse to a folder you want to save the lwo file in, and name the file to your liking, but make sure you add .lwo at the end as that doesn't happen automatically.

Now go to the render tab of the main window. Select the renderer you want to use (eg. 'Full Render'), to change the settings.
In the lower left you have some tabs, go to the last tab called 'Sequence/Output'. If you purchased Deep+Animation you can render a sequence here, but you can also add a Micro exporter.
To do that, check the box of Micro exporter (and you can uncheck the box above that if it's checked).
Than click the '...' button on the other side of the blank field.
Go to 'Assign micro_handler' -> '"/Lwo micro exporter 01"' (the lwo exporter we just created).
Now that's done.

Last thing we need to do is place the camera in a spot that overviews the area you want to export.
The should be like the image you posted above, so that's good.
Now set the resolution to something square, like 512x512, and the render detail to 0.5.
(I once exported at full render size and detail, but the file was so large LightWave could not handle it...!)

If you have steep cliffs or overhangs, do multiple renders/exports of top and side views to capture all vertexes, as the micro exporter only creates vertexes that are visible in the render.
You can render again at higher settings with the Micro exporter box unchecked to create a top view image map if you want...


I hope you have all the information you need now.


Hi ... I tried this LWO micro exporter just as you outlined and all I get is a 1k lwo output file which when I try to load it by importing it into Cinema 4D say out of memory, which to me means that the exporter is not functioning properly or I did something wrong. I followed your instructions above exactly.
Any ideas? Oshyan?  Someone?
Thanks,
Marc
fxmodels.com
Title: Re: Can't Export from Terragen 2
Post by: Mohawk20 on May 25, 2009, 05:09:19 PM
Erm... 1k?  :-\

That is a bit strange.
I don't know how that could ever make you run out of memory...

Oshyan? Matt?
Title: Re: Can't Export from Terragen 2
Post by: Oshyan on May 25, 2009, 06:20:37 PM
It sounds like the export process might be stalling or crashing. What is your detail level and resolution? Did you allow it to complete the rendering process?

- Oshyan
Title: Re: Can't Export from Terragen 2
Post by: fxmodels on May 25, 2009, 06:46:05 PM
Quote from: Oshyan on May 25, 2009, 06:20:37 PM
It sounds like the export process might be stalling or crashing. What is your detail level and resolution? Did you allow it to complete the rendering process?

- Oshyan

Hi Oshyan,
My res is set for testing at 512x512, and the detail level is .50625...
Here are my settings directly:
http://www.fxmodels.com/CG/TG2-SettingsForMicroExport.jpg

I rendered the image, then looked for the exported file and it was there, but was 1k in size as an LWO and there was a 2k LWS file too. On the sequence/output tab, I unchecked the Extra Output images, checked the micro exporter  and set it to the lwo micro exporter 01 that I had available. I am on Vista 32.

I am anxious to see this work and am pleased that it looks like this is exporter is available.
Thanks Oshyan,
Marc
Title: Re: Can't Export from Terragen 2
Post by: fxmodels on May 25, 2009, 06:46:51 PM
Quote from: Mohawk20 on May 25, 2009, 05:09:19 PM
Erm... 1k?  :-\

That is a bit strange.
I don't know how that could ever make you run out of memory...

Oshyan? Matt?

I agree... I am thinking it is exactly the opposite. Perhaps it is a divide by zero type error along the way...  :o
Title: Re: Can't Export from Terragen 2
Post by: Oshyan on May 25, 2009, 06:55:31 PM
Unless I'm mistaken, the Farthest Distance is measured in meters. There's nothing to export with your current settings, the terrain is much further from your camera than 0.875 meters. Try something much, much higher. You could also try a lower detail export, 0.25 for example, just to make sure it's not a resolution/detail issue.

- Oshyan
Title: Re: Can't Export from Terragen 2
Post by: Mohawk20 on May 25, 2009, 07:16:46 PM
Yeah, it's definitely the max distance setting that's messing up your export. Sorry I didn't include that in the explanation, but most of the time the default settings are fine. I should have said not to change them to drastically...

So try a setting of 1e+006, the default. That's 1/6 of the planet's size so it should definitely be enough for this scene. It could probably even be 1000 judging from that screenshot, but better safe than sorry.

Hope that fixed it.
(If it does I think I'll put this explanation up on the wiki so everyone can find it...)
Title: Re: Can't Export from Terragen 2
Post by: fxmodels on May 25, 2009, 11:18:27 PM
Yes that was it, by setting the distance to 1e+006 I was able to obtain the 1/6 of the planet terrain. But now as with others, I see that there are many MANY holes in the terrain even on camera facing sides. I know that it doesnt show polys that are not visible to the camera but its removing polys visible as well. My view was a high altitude looking down on an approximately 45 angle down.
What can cause that?
Thanks for the help so far.
Marc
Title: Re: Can't Export from Terragen 2
Post by: Oshyan on May 27, 2009, 11:13:58 PM
At that point try increasing detail. Not sure if there are any other settings that would help. If you really don't need overhangs or the camera-dependent export, I would strongly recommend the Heightfield Export LWO approach as it produces a much more consistent mesh export.

- Oshyan
Title: Re: Can't Export from Terragen 2
Post by: fxmodels on May 28, 2009, 11:15:54 AM
Hi Oshyan,
Thank you for the reply. I will try increasing detail and I know the LWO export for the Heightfield so I can try to wire that up. Its nice the that positional data for each of the many segments created is remembered. I just load each one in succession to get the final piece. But, when I do that, I notice that the fractal terrain I have in TG2 does not look like what was generated for export. It is two different terrains. How do I get exactly what I generated in TG2?

Also, regarding a version number issue I created a new post  under a different topic...

Thanks,
Marc
Title: Re: Can't Export from Terragen 2
Post by: Oshyan on May 28, 2009, 10:43:19 PM
If you make significant changes to the terrain *after* your Heightfield Export LWO node, for example in the Shaders group, then the exported terrain will not match your TG2 terrain. It is always recommended to do all major displacement in the Terrain group. If you connect the output of your last displacement-creating shader to the Shader input of a Heightfield Generate, then use Heightfield Export LWO, you should get good results in the export. Remember of course that overhangs can't be exported in this way.

- Oshyan
Title: Re: Can't Export from Terragen 2
Post by: fxmodels on May 29, 2009, 12:29:16 AM
Hi Oshyan,
Thank you. I will see if I can figure out exactly what you mean and try that in TG2. I will let you know what happens!
THanks,
Marc