Exporting mesh from Fractal Terrain?

Started by breravin, September 12, 2010, 08:05:44 PM

Previous topic - Next topic

breravin

Hi Guys!

Terraformer 2 is quite new to me, however, in an attempt to wrap my head around the program, I'm working with an already constructed scene to help myself learn.

This file does not appear to be creating terrain via a 'Heighmap Generator', but instead through a series of Fractal Terrains and a couple shaders (Power Fractal and Redirect) - allowing for cool waves and overhangs and such.

So my question is: is there any way to actually extract the mesh data with this type of terrain?

As near as I can tell, since there is no Height Generator, 'Heighfield export LWO' won't yield anything. I've managed to use the Micro exporter, but the mesh is much too incomplete.

Any suggestions?

breravin

I've managed to get height to export by hooking up the nodes as shown in the attachment, but

1) I can't tell if the exported height is actually the same as the terrain in Terragen

2) It's exporting a huge area of data, when really I just want a small section (roughly the area that is visible in the render view, maybe just a few dozen square meters. Is there an easy way to specify a specific area of terrain to export?

Kadri

#2
Welcome to the forum Breravin  :)

http://forums.planetside.co.uk/index.php?topic=10195.0
http://forums.planetside.co.uk/index.php?topic=6664.0
http://forums.planetside.co.uk/index.php?topic=3684.msg38115#msg38115
http://forums.planetside.co.uk/index.php?topic=9743.0

I don't know if these can help you .
If you use the search function on this forum you could find maybe more relevant posts .

Cheers!

breravin

#3
Hi Kadri,

Thanks for those links, there's a wealth of information there! I've read a lot of them, but many of those discussions are over my head - basically information overload for a noob such as myself :). I also couldn't tell from those other discussions if Fractal/Shader stuff could actually be exported.

In my case, there are overhangs and the like that wouldn't really be represented in a "heightmap" as such. So, that's why I was wondering if it's even possible to get a literal 1:1 mesh from a section Fractal Terrain.

breravin

#4
Ok, I've made a bit of progress in understanding the heighfield export, but I don't think it's quite what I want. So how about this:

Using the LWO micro export, would it be possible to setup 2 render cameras, one directly above the area I want to export, and one directly below and then bring the mesh data together after the fact? I'm not familiar enough with what information the micro exporter is maintaining. For example: Does a .lwo generated from a mirco export maintain it's relative world position? That is, if I took a top-down and a bottom-up shot, would the files match perfectly? Or would they each have a unique origin?

edit: when I was writing this, I was assuming terragen would not draw the back faces of a mesh, but I'm now wondering if that's the case. I did a quick test render, and it looks like if a camera is "below" the terrain, it still renders the back faces.

breravin

Heh, I'm kind of talking to myself a little here, but thought I'd continue sharing progress.

For those who didn't know, LWO micro export does maintain world position, and therefor the meshes will "fit" together.

Right now micro export seems to be my best bet, though the results aren't perfect. Issues include

- I was actually surprised at the lack of detail. Even with higher detail settings, at a certain point, the mesh is simply divided more rather the actually being higher fidelity
- The random holes that are present in the mesh are problematic
- There are quite a few lamina faces (sharing all edges)
- It's not super easy to line the camera up nicely (and if you 'bump' it, there is no camera undo (that i could find)
- Even though the mesh maintains world position, since the triangles are somewhat randomly generated, meshes don't line up perfectly

Still, I'm please with the results, as this is still about the furthest I've come with this type of thing after many many other attempts.


breravin

Alright, those settings will be my next thing to test!

(Though, I have this sneaking suspicion that I'm going to learn all this, only to have it rendered moot by the next update)

rcallicotte

Hi breravin.  It's unlikely that even the next three updates will change things so much that what we learn in this case will neutralize much of anything we know.  Planetside has been very good with TG2 to keep things flowing.
So this is Disney World.  Can we live here?

Oshyan

You've found what is essentially the best workflow for now given your needs (maintain overhangs, etc.). In the future we'll be improving the geometry export capabilities to disable back face culling (optionally), etc. which should make this sort of project much easier.

- Oshyan

breravin

Cool :) - thanks for the reply. After getting this about 90% worked out I got really busy and had to move on; I will definitely need to get back to it before too long though!