Exporting Terrains out of TG2TP as hightmaps?

Started by RealUser, October 08, 2007, 09:31:37 AM

Previous topic - Next topic

RealUser

Hi,
is it possible to export (proc) terrains as hightmaps including stone populations or fakestones?

--
Markus
Markus / RealUser
...................................................................
visit my Renderosity Gallery at
http://www.renderosity.com/mod/gallery/browse.php?username=RealUser
...................................................................

cyphyr

#1
Should be doable, although it would require a work around, I don't think theres a direct way of doing it yet. Place your camera above the center of the area you want to export and set it to "orthographic" mode, set use Ortho Width or Height to your desired terrain size, say 1000, (remember the render will be the size specified in the render tab so change that to the same size say 1000 x1000). Now place the sun behind the planet to avoid and shadows (or just turn its intensity down to 0) and set your surface layers to an image map gradient in the z axis (might be x?). The gradient should be a 16 bit gray scale gradient (bottom black to top white) image scaled to the maximum and minimum height of your desired terrain (min height is say -200, max height is 1500, then scale your image to 1700 x 1700). Crank up th luminosity and render. Small stones wont show up but thats a matter of overall scale. I'm sure theres a way of doing this with functions but I'm not wise in their esoteric ways :)
Good luck
Richard
www.richardfraservfx.com
https://www.facebook.com/RichardFraserVFX/
/|\

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

RealUser

Hey cyphyr,
thank you for the explanation of the technique. Very appreciated!
Markus / RealUser
...................................................................
visit my Renderosity Gallery at
http://www.renderosity.com/mod/gallery/browse.php?username=RealUser
...................................................................

Oshyan

This workaround is not necessary. Plug your shader tree into the Shdaer input of a Heightfield Generate node, use the numbers next to "New Heightfield" in the settings of the node to control pixel resolution of the resulting file (top values) and coverage in meters (bottom values). Then click Generate. Right-click the node in the node network view and choose Save As, give it a name and be sure to put .ter on the end. Viola!

- Oshyan

cyphyr

Hehe, knew there was a simpler solution. Cheers
Richard
www.richardfraservfx.com
https://www.facebook.com/RichardFraserVFX/
/|\

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

rcallicotte

Oshyan, when you mention 'plug your shader tree', which shader tree are you talking about?  Everything else makes sense.



Quote from: Oshyan on October 08, 2007, 02:36:45 PM
This workaround is not necessary. Plug your shader tree into the Shdaer input of a Heightfield Generate node, use the numbers next to "New Heightfield" in the settings of the node to control pixel resolution of the resulting file (top values) and coverage in meters (bottom values). Then click Generate. Right-click the node in the node network view and choose Save As, give it a name and be sure to put .ter on the end. Viola!

- Oshyan
So this is Disney World.  Can we live here?

Volker Harun

He means any shader before the 'planet node'.

rcallicotte

Oh, that's interesting, Volker, since there's a Shader Node in the Heightfield Generate.  Hmmm.  Okay.  So then, if what you are saying is correct, Volker, it's possible to create a terrain with everything in it and then save it to a heightfield.  This is great news.


Quote from: Volker Harun on October 09, 2007, 09:28:09 AM
He means any shader before the 'planet node'.
So this is Disney World.  Can we live here?

RealUser

Markus / RealUser
...................................................................
visit my Renderosity Gallery at
http://www.renderosity.com/mod/gallery/browse.php?username=RealUser
...................................................................

Oshyan

Technically any shader before the "planet node", yes, but most significant displacement should be done in the Terrain group, *before* the Compute Terrain node and the Shaders group. In that case you would plug all the terrain-definining shaders before the Compute Terrain into this input.

Keep in mind that this will not save color/texture info, only height, and it also doesn't handle overhangs. The pixel dimensions will control detail. 2000x2000 is a good average resolution I'd say, although it depends on what use you are putting it to.

- Oshyan

Harvey Birdman

#10
2000x2000 pixels for what size area? I mean this is a pretty cool feature, but I can't see how it'd be useful for including object geometry in the terrain - it all depends on the end use in mind, but I'd think the sample rate would be too coarse. If your sample rate is 1 pixel per half meter square, you aren't going to get terribly good reproduction of fake stones unless they're massive boulders. Conversely, if you make your sample rate high enough to accurately resolve medium size rocks, you're going to end up with 20,000 x 20,000 pixels per square kilometer of terrain.

Sorry as usual if I'm stating the obvious. It's just that I'd kind of chased this around myself.  ;)

Volker Harun

I think the above is all technically. De facto I am using it to 'cut out' a specific area of a procedural terrain, as the heightfield is faster to render.
Displacements, fake stones and so on are added later on.

Oshyan

Yes, of course you're right. It's just that generally I wouldn't recommend trying to capture something on the scale of "fake stones" in a heightfield. It's just not an efficient format for that level of detail. The right tool/format for the job and all that, you know?

- Oshyan

rcallicotte

No.  What's a 'fake stone'?   :P

Quote from: Oshyan on October 09, 2007, 01:50:02 PM
Yes, of course you're right. It's just that generally I wouldn't recommend trying to capture something on the scale of "fake stones" in a heightfield. It's just not an efficient format for that level of detail. The right tool/format for the job and all that, you know?

- Oshyan
So this is Disney World.  Can we live here?

Harvey Birdman

You know... right click - 'Create Shader/Displacement Shader/Fake stones shader'.