Feature inquiry: saving off procedural terrain maps

Started by Arandil, February 23, 2007, 09:15:17 PM

Previous topic - Next topic

Arandil

I'm still just starting to dig into TG2 between other projects, but I'm wondering if it would be possible at some point to export heightfields our of arbitrary sections of procedurally generated terrain?  Ideally, there could be some tiling logic.  :-*

I haven't got to the point where I can see the potential of shading procedural terrain along the lines of what World Machine/Leveller/Wilbur/et. al. can do with heightfields, particularily with regard to erosion.  I'm comfortable with World Machine's node architecture, it was easy to generate masks from the source material, but have yet to suss out the spectrum of uses for the shader tree approach.

Cheers!


old_blaggard

To export a heightfield from TG2, simply create a "Generate heightfield" operator, set your terrain as the shader under "Generate from Shader," select the size and coordinates, and then hit generate ;).  After that, right-click the operator and export the terrain.
http://www.terragen.org - A great Terragen resource with models, contests, galleries, and forums.

Oshyan

You can use some existing heightfield operators to do this already in fact, although without the tiling (could be tiled in another app though). Here's the quick method - you can experiment further to get better results:

First create your procedural terrain, of course. Now create a Heightfield Generate node and hook up the *last* output of your procedural terrain to its Shader input (on the right). Then specify a coverage size ("size in meters") and number of output pixels in x,z (next to "new heightfield" checkbox). By specifying size in meters you tell it how much area you want it to cover in the world. By specifying number of output pixels you are basically setting the resolution of the resulting heightfield.

Once you're done setting that stuff up click Generate at the bottom. Wait for it to complete (it will take a bit for larger - in pixels - heightfields) and when it's done right-click the node and choose Save File As, specify a location and name and save. Viola! You have an output of your procedural terrain in heightfield form. .ter format can then be converted to just about anything else with freely available tools - TerraConv, Wilbur, World Machine, Blender, etc.

[Edit]o_b beat me to it, but the size specification stuff is good to know. ;D

- Oshyan

Arandil

Right on, thanks!  Yeah, I saw the export option but recalled reading somewhere up here that it may have needed more development.  Can't recall details.  In any case, the size specification stuff IS good to know!  If I get this right, you're essentially using the heightfield boundaries to select a section of procedural terrain to export?  Or am I off here?

P.S. You guys are quick, man ...  ;)

Oshyan

QuoteIf I get this right, you're essentially using the heightfield boundaries to select a section of procedural terrain to export?
Yes, that's basically correct.

- Oshyan

hansiMUC

Quote from: Oshyan on February 23, 2007, 09:48:04 PM
QuoteIf I get this right, you're essentially using the heightfield boundaries to select a section of procedural terrain to export?
Yes, that's basically correct.

- Oshyan

I just found this thread while looking for the export possibilities of TG2...
The question is how to precisely export a certain arbitrary area to a terrain file via the generate heightfield node ?

In my case I used a combination of a generated heightfield and an overlay of a procedurally generated terrain and exported that via an "generate heightfield"-node whose shader input was connected to the whole terrain generating tree...
I know that when generating  a terrain there is the "heightfield shader"-node to transform the terrain to a specific location you may enter into the position fields...
But when using the "generate heightfield"-Node for export it seems that it sits at the origin with the size and the resolution I've entered ( 1024x1024 pixels covering 2048 by 2048 meters )
But what do I do when I want to cover an area whose left corner is at let's say x/y -500/-250 ?
So far I did it by shifting the shader with the transform shader node by 500/250 before exporting ...

But is this the right way to do it or is there a better way ( not that I'm really troubled to use the inverse transform ) ?

Best regards,
Hansi


Matt

In the "Use shader" tab of the Heightfield Generate node you can specify the offset. The parameters are the same as those in the Heightfield Shader, so you can just plug exactly the same values in.

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