Hi I need some advice about Classic and opening output files

Started by adder6, June 13, 2010, 09:51:49 PM

Previous topic - Next topic

adder6

Dear All,

I'm making a game. I'm spending most of my time with DirectX right now learning about mesh animating but I've spent alot of time on Physics engines before and Collision Detection. I do not want to have to code my own scenery generator when there is already stuff out there of this quality.

I intend to buy a commercial license for Classic. I do have some important questions though as follows:

1)Terragen File Output

1a) I want to able to control the number of polygons it is creating. I am making a game which needs to run fast but just give a reasonable indication of an environment. I have looked at some of the screenshots from Classic and they seem a bit too high poly for what I want.

1b) For some of my own personal modifications I would need to be able to load a Terragen created file and alter some of the vertex positions. Am I able to do that with whatever output file Terragen creates?

2)Terragen Textures

2a) I do not require some of the photorealistic textures present in the gallery I've seen. I need things which will have good resolution down to ground level and perhaps be a bit more simple than those I've seen used with it so far. Can I apply more simplified repeated textures over quite small terrain areas so they retain their resolution close up?

That's about it I think. I'd appreciate any help anyone could offer. I will not respond to questions about why am I doing this or that. I have my reasons and I'm tired of posters on other forums throwing subjects off-topic with unnecessary questions. If I want a debate I'll go to a chat room. However if you can genuinely offer help that would be so much appreciated thanks. ;)

neuspadrin

The screenshots you see are based off the rendering engine doing the work with all of the settings in terragen.  The render engine is most definitely meant for rendering stills, or animations with known paths etc.  It can't be done by your game engine because games have to simplify things a lot.  The renders you see are from hours of rendering, and thats quite unacceptable frame rate of a game ;).

The only real output usable by other programs is the heightmap being used.  This heightmap is usually an image file (or it can be a .ter which is almost the same), that you can then determine what height to draw in your program based off the data/pixel values within the file.

http://en.wikipedia.org/wiki/Heightmap

So they pretty much can be spaced however you wish, and represent whatever height you wish overall, but relative to one another they show the height.  But your program would basically just read this image output from terragen and then build its own 3d representation.

As for textures, there isn't a way to take the ones (that i know of) directly from terragen and apply on top.  As you mentioned you could probably just put a tile or something.  You could do a top down render of the textures you want, then make them tile-able and use them in your program by placing it as the texture being used.

adder6

Kickass, that's a great reply thanks! I'm with what you're saying totally I just need to start understanding how I can get a modelling program to read from these height maps now. So basically I still need to do most of the 3D stuff myself in another program say 3DS Max or something, that will run a script based on the heightmap - please anyone correct me if I'm mistaken.

I'm wondering if maybe I could write code to sort through a heightmap and make an average of several collected values and replace them with one per unit area so as to reduce the number of vertices that would end up as my game scene. Please again anyone feel free to do a bulls**t check on what I'm saying if I'm talking nonsense.

I'm encouraged by what you said about texturing. Seems I have a reasonable idea with regards using a tiling effect. I'm not too sure about blending effects though I haven't covered anything about that yet in DirectX but I'm sure I can find the info I'd need if I looked. I guess I could apply two tiles to the same space for say a rock to sand or rock to snow effect and just fade each one along its length so they gently blended together in the middle.

So to summarise at the moment it looks like using Terragen to produce a height map then using that as the source of info for my own project.

This question isn't related directly to Terragen but some of you might be able to help anyway

I have seen a demo of some kind of terrain sampling on the net where guys used adjacent vertices to create circles which they then diagnosed into triangles (I think that's right) to produce a sharper more high verticed terrain. I was wondering in the case of airborne vehicles could you use some kind of reverse of this effect to 'dull' a terrain by removing polygons so players flying planes and helicopters could dramatically reduce the amount of data being drawn to the video card when say several hundered feet away from the ground? Just a thought, thanks!

adder6

No way I've just realised how powerful these heightmaps could be. I reckon I could have a player flying even a very fast airplane through a landscape where the program just referenced a heightmap to know what vertices and thus what polygons to display. I could just use a circle with its radius based on the player's view distance to know which vertices to load. The actual entire 3D terrain need never even exist in full vertex form in memory anywhere.

I could even use a special colour within a heightmap that corresponded with areas that were of very high detail such as little paths or roads. The main landscape rendering code could then just ignore these areas and then go back into them once everything else was took care of and use a heightmap with the same resolution but over a smaller area to recreate these small intimate places.

This would mean you could alter the 'tilesize' of your height map depending upon how much detail was in the area being covered by it. Large open rolling terrain would have a heightmap covering a large area which would give lower vertex position resolution, whilst small intimate places would have a heightmap covering a much smaller area meaning I could still use fine vertex variations in intimate areas.

A decent search algorithm could I presume tell me which vertices need not be rendered (say they are behind a mountain) and these never even get sent to DirectX so it doesn't have to draw loads of unrequired stuff and then rely on the Z buffer to display the screen properly.

This could be really powerful and provide the answer as to how to render huge yet detailed environments realistically on the fly at low memory cost. Thanks for pointing me in this direction, cheers!

neuspadrin

You might also want to look into 2 other programs we often use here at Terragen:

GeoControl2 - http://www.geocontrol2.com/e_index.htm
Has a 31 day trial.

and

World Machine 2 - http://www.world-machine.com/index.html (currently 25% off standard version)
Has a unlimited length demo version for noncomercial use, with a size limit on exports.

These are dedicated to just terrain generation, where as terragen itself is more dedicated to generation + animation.  You could perhaps use terragen to make your texture tiles, and one of these others to generate terrains.

Those other programs also have more choice on file export I believe.  Many different formats of heightmaps + I believe both support exporting as mesh (obj format i think?).

N810

For clasic you might want to check out the "for export only" plug in as well,
it gives you a few more options.
Hmmm... wonder what this button does....

adder6

That sounds great. Thank you both so much for your help ;)

Oshyan

I agree with Neuspadrin, a dedicated heightfield modeler may be better for your needs. World Machine and Geocontrol are both good options, around the same price as TG Classic but with far more power, control, options, and flexibility in terrain generation and output. World Machine has decent geometry export functions and controls. Both can generate and export textures and masks.

- Oshyan

adder6