Realistic planet and heightmap export

Started by vooood, July 27, 2009, 02:07:33 PM

Previous topic - Next topic

vooood

Quote from: cyphyr on July 28, 2009, 11:06:44 AM
How to export a heightfield: :)
Create your fractal terrain...
at the end (bottom) of the chain of nodes used to create your terrain add a "Heightfield shader", this has attached to it a "Heightfield generate" node. Into this plug your fractal chain of nodes.
Now if you right click on the "Heightfield shader" you can export the file as a .ter of a .exr
Good luck
Richard

The only export I found here was on the Heightfield generate node. Did you mean that? What if there is a ton of shaders after that?

vooood

I have a huge number of shaders that define the planet. Is it possible to get the heightfield from the shaders? For some reason the "Heightfield from shader" node does not export anything (an "empty" 92 bytes file)..

vooood

So there was a lot of progress today:

I got this tgr file from here: http://forums.planetside.co.uk/index.php?topic=7040.msg74868#msg74868 and connected a "heightfield generate" node to the most bottom shader and generated it and exported as TGR. Is this now a random heightfield or one generated from the above shaders?

Henry Blewer

I was concerned that you might be offended. I was not. It's nothing to worry about.
Basically, a heightfield is an ordered collection of vertices. Each vertex describes the height information of that point. The procedurals manipulate this data, causing the vertices to adjust their positions slightly. So all you have in a heightfield is raw terrain data.
The procedurals are power fractals, displacement functions, color information, all of which are/can be combined to output the final render. So, if you wish to use these in an external application, they will have to be converted/changed into information the external application could use.
You know about the link to nvseal's planet, which is excellent. He's really onto a new way to make planetary bodies in Terragen 2.

Hope this helps! :)
http://flickr.com/photos/njeneb/
Forget Tuesday; It's just Monday spelled with a T

Matt

#19
Quote from: vooood on July 28, 2009, 01:19:03 PM
So there was a lot of progress today:

I got this tgr file from here: http://forums.planetside.co.uk/index.php?topic=7040.msg74868#msg74868 and connected a "heightfield generate" node to the most bottom shader and generated it and exported as TGR. Is this now a random heightfield or one generated from the above shaders?

That should give you a heightfield of the region specified in the heightfield generate node, including all the displacements from the shaders which is what you want. The problem is that heightfields nodes in Terragen only work well near the top of the planet (or north pole, depending on how you look at it). To export portions from anywhere on the planet we would need some other mechanism, and I'm afraid that it doesn't exist right now.

I know that exporting global heightmaps and textures is a valuable feature and it's extremely difficult in Terragen at the moment. I hope we can add some tools to help with this in the not-too-distant future.

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

Matt

If you have some mathematical understanding of projections and some coding ability, it's theoretically possible that you could render multiple views of the planet, with a greyscale shader attached to the surface which corresponds to surface altitude, and then extract data from those renders.

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

Cyber-Angel

Would it be possible in future too convert a procedural landscape (Power Fractal and Alpine Fractal) too a high resolution mesh (Quads not triangles please)? If this could be done then importing that terrain should be no problem into another application, the problem you'd then only be faced with is surface shaders I cannot see a problem with displacement as you could capture that in the exported mesh.

Its a shame that there is no universal standard format for the transfer of procedural data between applications, .tgd and .tgc files as discussed else where are based on XML that is a start now all you need is to work with the vendors of the other key applications on the market three of which (Lightwave, 3DS Max and Maya) are all done by just one vendor, too be able to read and open .tgd and .tgc files.

Maybe one day there could be away of been able to automatically update changes between TGxx (Future version of Terragen yet to come) and the target application and it would also work in reverse with changes in the target application been updated in TG2: such technology is already in use the makers of Zbrush have such technology and so do Adobe they call theirs Adobe Bridge (TM).

Any way all that is a long, long way off if ever.  ;D

Regards to you.

Cyber-Angel             

Oshyan

Quite honestly I'm not sure Terragen is the right application for your needs. TG2 does create very nice terrain, but a big part of its value and the quality of its output lies in its procedural detail and rendering engine, neither of which you will benefit from if you simply export a heightfield. If the heightfield is all you need, I would suggest instead a dedicated heightfield modeler like World Machine, L3DT, or Geocontrol, all of which are capable of generating large, seamless textures, potentially up to planetary scale. World Machine and L3DT are particularly capable in this area. Not only do they have better technology purpose-built for outputting multiple tiles of large-scale terrain, but they also tend to have more powerful terrain editing tools for heightfield-specific terrain. TG2 has the advantage of displacement, but you lose a lot of the benefit of that in a heightfield format since there can be no overhangs and the resolution is very limited by comparison.

I hope that helps.

- Oshyan

vooood

Quote from: Matt on July 28, 2009, 07:29:44 PM
I know that exporting global heightmaps and textures is a valuable feature and it's extremely difficult in Terragen at the moment. I hope we can add some tools to help with this in the not-too-distant future.

Matt


This would be a most valuable feature!
Quote from: Oshyan on July 28, 2009, 10:51:59 PM
Quite honestly I'm not sure Terragen is the right application for your needs. TG2 does create very nice terrain, but a big part of its value and the quality of its output lies in its procedural detail and rendering engine, neither of which you will benefit from if you simply export a heightfield. If the heightfield is all you need, I would suggest instead a dedicated heightfield modeler like World Machine, L3DT, or Geocontrol, all of which are capable of generating large, seamless textures, potentially up to planetary scale. World Machine and L3DT are particularly capable in this area. Not only do they have better technology purpose-built for outputting multiple tiles of large-scale terrain, but they also tend to have more powerful terrain editing tools for heightfield-specific terrain. TG2 has the advantage of displacement, but you lose a lot of the benefit of that in a heightfield format since there can be no overhangs and the resolution is very limited by comparison.

I hope that helps.

- Oshyan

L3DT seems nice enough while World Machine is too expensive for me right now. I still like the most what I saw in TG2 and it would be most fortunate to see a heightfield export of any form.

I was just wondering if it would be possible to set up a script/batch that would move the camera around the planet and render stuff with a grayscale shader so I get only the heightfield?

vooood

#24
What am I up to actually?

I'm working on a browser based MMORPG that needs realistic terrain. The terrain will be kept in a database as locations (height, climate, steepness, coordinates) where each location is a pixel from the heightmap. I know you might say that TG2 is an overkill here but I need very realistic terrain as the game tries to be very realistic.

I would like to use TG2 for this as it generates most realistic terrain that I ever saw in any generator and I'm not happy with results from other generators. The closest one is Fractal Terrains Pro from ProFantasy (which I also have) but I really don't like it's fractal procedures. To be hones, I'm in love with the alpine stuff TG2 does..

I don't have to export the WHOLE planet as several continents will do, too. And the map will be imported into the game slowly as more and more players join so time is also not an issue here. The only issue is if it is really possible to get a normal (tiled) heightfield export of the planet?

EDIT:
A plan for the future is to also have terrain transformations with ongoing erosion and changes to the terrain by either climate or players.

latego

Quote from: Oshyan on July 28, 2009, 10:51:59 PM
Quite honestly I'm not sure Terragen is the right application for your needs. TG2 does create very nice terrain, but a big part of its value and the quality of its output lies in its procedural detail and rendering engine, neither of which you will benefit from if you simply export a heightfield. If the heightfield is all you need, I would suggest instead a dedicated heightfield modeler like World Machine, L3DT, or Geocontrol, all of which are capable of generating large, seamless textures, potentially up to planetary scale. World Machine and L3DT are particularly capable in this area. Not only do they have better technology purpose-built for outputting multiple tiles of large-scale terrain, but they also tend to have more powerful terrain editing tools for heightfield-specific terrain. TG2 has the advantage of displacement, but you lose a lot of the benefit of that in a heightfield format since there can be no overhangs and the resolution is very limited by comparison.

Don't down play TG2 capabilities as terrain generator. I made a few tests and found that the erosion functionality did create very realistic features, much much more realistic than L3DT ones (try it using strong erosion on a flat terrain and you will see a slew of obscene artifacts) probably better or on pair with WM 2 and only somewhat inferior to GC2.

Obviously terrain generation is not TG2 main mission, but this does not mean that it can be a real contender in this arena.

Bye!!!

CCC

While terragen 2 does seem to do better then L3DT, world machine and especially geo control is far superior with erosion.

Terragen 2: Alpine (Procedural Planet-Wide)
                Heightfield Erode (Local Only)
                Smooth Erode (Local Only)

World Machine 2: Erosion Node (Fluvial/Sedimentary structures like the Alpine Shader but more convincing flows and even alluvial fans)
                        Thermal Erosion Node
                        Rigid Erosion Device Node

Geo Control 2: Hard Fluvial
                    Hard Fluvial Terraces
                    High Sedimentation
                    Soft Fluvial
                    Soft Fluvial wide
                    Thin Flows deep
                    Thin Flows sediment
                    Thin Flows sharp
                    Thin Flows Smooth
                    plus inverted versions of all the above.
                    River Tool (creeks, rivers and streams, lakes, ponds, water reservoirs, complex channels of
                                   flowing water, glacier erosion, waterless valleys and even volcanic flows.)

I would like to see the capability of feeding additional nodes into the alpine shader to allow different effects to occur with the displacement and erosion disposition, flow etc. settings themselves. Should produce some unique fractal features i'd think.

   


   

vooood

Looks like I will have to create a different workflow than planned:

  • Generate terrain with libnoise
  • Create heightmap with libnoise
  • Export the heightmap as either tiles or one huge image
  • Have erosion done in a tool (GC2 or WM2) or code my own erosion????? (this is what bothers me)
  • ???
  • Render in TG2
  • Profit!

Henry Blewer

Have you looked on SourceForge? I think someone worked on a terrain generator for games. I was using Stumble Upon and it came up. I was not really interested so I stumbled again. Download.com may have something as well.
http://flickr.com/photos/njeneb/
Forget Tuesday; It's just Monday spelled with a T

vooood

Quote from: njeneb on July 30, 2009, 11:48:32 AM
Have you looked on SourceForge? I think someone worked on a terrain generator for games. I was using Stumble Upon and it came up. I was not really interested so I stumbled again. Download.com may have something as well.

Those are 101% of the time not enough realistic.. :(