Recommendations sought for modelling landscapes

I want to generate a landscape in something like Terragen, convert it to polygons, and render it using JOGL.

Any recommendations as to landscape modelling programs, and how best to convert / import such a model into a JOGL program?

Ideally I’d like to have buildings in the landscape, and also to use a OpenGL light source.

Terrain rendering is a research topic on its own :slight_smile: The virtual terrain project is a pretty good starting point…

I have not used terragen, but I think you can export at least the height-data as grayscale bitmap and a skybox with an all-around-view. I am not sure about the surface textures.

normally you would read the height data from the bitmap and form a set of triangle strips in a nested for-loop (for x and y coordinates), taking the current grayscale of your heightdata, multiplying it with some factor and use the result as the z coordinate of your vertex.

To get a reasonable looking terrain, you have to have at least one overall texture for your terrain with appropriate terrain type color and a repeated detail texture (often only luminance) to make your terrain look - well - more detailed :wink:

Keep in mind, that you might have to implement some sort of level of detail optimization (e.g. clod or geomipmapping) to get good fps out of your rendering.

May I go OT for a second and say that the next version of Terragen looks damn sweet?

There’s some pretty decent documentation on the Terragen native file format. Apparently the data is split up into a relatively simple height map file and a surface map file containing all the procedural texture details. The height map part should be straightforward to decode and use, the surface map might be a tad more difficult.

Indeed it does :slight_smile: Has any of you guys used terragen? How long does it take to render one of those shots?

From terragen you can export :

  • Heightmap : terrain window->export
  • Sky box : need a simple script, I will send it later
  • Ground texture : set camera to isometric, remove atmosphere effect,set cam target to 128,128,0 unit and cam pos to 128,128,256 render land and save

Then you will need a CLOD engine to convert heighmtap to vertex/face and to reduce face number do draw (have a look to ROAM).

Thanks for the feedback all! Looks like I will try Terragen (as I had been thinking of.)

I’ll follow up those leads.

The script to export terragen skybox, before you run the script, you must uncheck the two checkbox named “fixed height …”

when the script is finished convert the six bmp images to jpg and map them to a cube with flipped normals.


initanim "C:\TGScript", 1

;_ft
Zoom 1.0
CamH 0
CamP 0
CamB 0
frend

;_lf
Zoom 1.0
CamH 90
CamP 0
CamB 0
frend

;_up
Zoom 1.0
CamH 270
CamP 90
CamB 0
frend

;_bk
Zoom 1.0
CamH 180
CamP 0
CamB 0
frend

;_rt
Zoom 1.0
CamH 270
CamP 0
CamB 0
frend

;_dn
Zoom 1.0
CamH 270
CamP -90
CamB 0
frend

A sample of a terragen landscape using ROAM : http://www.java-gaming.org/forums/index.php?topic=11836.msg94147#msg94147

Bruno