• Advertisement
Sign in to follow this  

Strategic Terrain

This topic is 1598 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi every one,

I want to create a simple 3D strategic game with my own engine now ,I want to know what techniques are exist for creating terrain and witch of those have the best performance and quality for STRATEGIC games!!

I should mention that I will create my engine with SlimDx with Direct3D 11 thus i can use the performance of tessellation.

Any idea will help me!

Thanks.

Share this post


Link to post
Share on other sites
Advertisement

Well since you mentioned Directx 11, then this might suit you for the terrain:

  • Send a quad plane to the GPU, and then displacement map it from there. The great part in displacement mapping is that you can have a dynamic lod system in the GPU, and the loading time is really fast (A simple quad!)
  • On the CPU side, generate terrain vertices (Tut: http://www.rastertek.com/tertut02.html)
  • Voxel Terrain if you need complex types of terrain
  • Other methods that I don't know

But this also depends on what kind of features your terrain should support.

  • All direction terrain: Voxel or Vector Displacement Maps
  • Static, Displacement mapping or generated (2nd)
  • Dynamic, I recommend displacement mapping, as you can overlap another texture for explosions n. stuff!

PS. What kind of strategy? top down, dynamic, etc?

 

Good Luck!

-MIGI0027

Share this post


Link to post
Share on other sites
For the past ten years or so the best performance has come from GPU-based terrain. When that isn't possible terrain as a static model kept in video memory will give you a distant second in performance.

As Migi wrote above, if you are already accepting the additional tasks D3D11 requires with all the mandatory shaders then adding a terrain shader should be a relaxing jaunt.

Share this post


Link to post
Share on other sites

There's lots of possibilities when it comes to creating terrain. One I have done recently utilizes simplex( or perlin ) noise generation for a heightmap which then in turn is generated into a map. It allows random map generation, but also allows you keep seeds and regenerate exact maps at any time.

You can also dive into it a bit further and compare the different height relationships at a per pixel basis to generate unique features( sudden change from black to white is a cliff and you can add a rocky texture over it with rocks. Subtle changes in the gray area could be sweeping hills with grass and trees, etc..

Share this post


Link to post
Share on other sites

Thanks to all,

About the displacement map that MIGI said, I think we have some problems ,assume that we have a car on the terrain that moves from point A to point B,to finding the changes in height we must sample the the displacement map. now assume that we have 300~500 cars, i think this method cause to reduce texture bandwidth (this is just a think)!!!!!

 

 

But this also depends on what kind of features your terrain should support.
All direction terrain: Voxel or Vector Displacement Maps
Static, Displacement mapping or generated (2nd)
Dynamic, I recommend displacement mapping, as you can overlap another texture for explosions n. stuff!

 

 

I need the terrain to be dynamic.

Share this post


Link to post
Share on other sites


About the displacement map that MIGI said, I think we have some problems ,assume that we have a car on the terrain that moves from point A to point B,to finding the changes in height we must sample the the displacement map. now assume that we have 300~500 cars, i think this method cause to reduce texture bandwidth (this is just a think)!!!!!

 

i was just dealing with this issue myself.

 

all entity / unit / target movement for ground targets will need to reference game specific height map data of some sort, to set the "altitude" of the unit at its new position. for this reason, ground unit movement can not be totally de-coupled from game specific height map data, even using generic rectilinear kinematics.   game specific collision checks during stepped movement is another intractable coupling between generic unit movement and game specific data.

 

its often a good idea to keep two separate representations of the world, one for graphics, and one for physics.  using the graphics representation for doing physics stuff can sometimes be inefficient.     using two representations can help address the issue you mention above.  

 

you'll only need voxels to do arches and overhangs and stuff. if you don't need those, you can use a displacement mapped mesh of quads. since you're displacement mapping in the vertex shader, its automatically dynamic, based on the displacement map you use - which you can modify as needed before drawing.

 

for small maps you can use a single level map or chunks, made by hand in an editor.

 

for really big maps, you'll probably want to go procedurally generated heightmap and chunks.

 

texturing is just a matter of how bleeding edge you want to get.

Share this post


Link to post
Share on other sites

I think the DetailTessellation11 sample in directx sdk is a good sample that i can use it to create terrain for strategic games but i need to make some changes in code and algorithm(i think) , for example i need to divide the quad to small quads for culling.

 

Any idea??

 

excuse for bad english.

Edited by hossainiir

Share this post


Link to post
Share on other sites

Ahh!

 

But maybe you don't need culling, you could base the amount of tessellation on the distance from the eyeposition to the vertex position (modal space).

Share this post


Link to post
Share on other sites


But maybe you don't need culling, you could base the amount of tessellation on the distance from the eyeposition to the vertex position (modal space).

 

I think this is good idea for small terrain but for large terrain i don't think so.

Share this post


Link to post
Share on other sites

We can define the large terrain as follow : A terrain that a camera at a medium altitude can see 1/(10~30) of this terrain if camera look to the terrain perpendicular.

 

I hope u understand what i mean.

Share this post


Link to post
Share on other sites

terrain is all a matter of apparent scale.

 

i'm doing a fps rpg where terrain is drawn out to about 1000 ft range (~300m).  in that games distance scale, its 1000 d3d units.   visual range for the game is considered to be something between 300 and 1000 feet (100-300m).   ground quad size is  10 d3d units, and the ground is draw out to a distance of about 1000 d3d units from the camera, which in that game's scale is about 1000 feet or about 300 meters.  the game world is 2500x2500 miles in size ( 4000 x 4000 Km ).  the "ground mesh" for the entire world  (if generated all at once from world map data) would be 87.12 trillion triangles.  The game stores world map data, and generates chunks of the ground mesh on the fly as needed from the world map data.  A chunk is 300x300 D3D units in size.  "visible range" is 100 ground quads in all directions from the camera.

 

i'm also working on an airship flight sim. in that game, visual range for the largest objects is something ridiculous like 187 miles  ( approximately 300 Km ).  in that game, the ground quad size isn't  10 d3d units, its 50,000 d3d units! and the terrain is drawn out to a distance of 1 million d3d units from the camera. the game world covers the area between Chicago and Moscow. For now it uses "scrolling" terrain. I haven't decided how i'll do the ground in it yet. procedural chunk based, with the heightmap function dictated by actual terrain (so it generates mountains where the Alps are, etc) - unless i can get my hands on some good topo data.  but "visible range" in this title is currently only 20 ground quads in all directions from the camera.

Share this post


Link to post
Share on other sites


We can define the large terrain as follow : A terrain that a camera at a medium altitude can see 1/(10~30) of this terrain if camera look to the terrain perpendicular.
 
I hope u understand what i mean.

 

you mean a skycam view as used in an RTS or RTT type title would only show 1/10th to 1/30th of the world at once.

 

a "big map" like that shouldn't be an issue.   it seems that everything becomes easy once you resort to chunking. well, maybe not easy, but probably doable at least.

 

Like my old hot rodder saying, "everything becomes easy once you resort to customization".

 

doable, even if you have to tessellate all possibly visible chunks ( chunk space partitioning anyone? ).

Share this post


Link to post
Share on other sites

Thanks Norman Barrow complete and nice descriptions.

 

i'm also working on an airship flight sim. in that game, visual range for the largest objects is something ridiculous like 187 miles  ( approximately 300 Km ).  in that game, the ground quad size isn't  10 d3d units, its 50,000 d3d units! and the terrain is drawn out to a distance of 1 million d3d units from the camera. the game world covers the area between Chicago and Moscow. For now it uses "scrolling" terrain. I haven't decided how i'll do the ground in it yet. procedural chunk based, with the heightmap function dictated by actual terrain (so it generates mountains where the Alps are, etc) - unless i can get my hands on some good topo data.  but "visible range" in this title is currently only 20 ground quads in all directions from the camera.

 

 

This work must be extraordinary thing.

 

 

 

Like my old hot rodder saying, "everything becomes easy once you resort to customization".

 

I agree with you.

 

 

 

i'm doing a fps rpg where terrain is drawn out to about 1000 ft range (~300m).  in that games distance scale, its 1000 d3d units.

 

 

 

What is the name of this game?

 

 

I think combining the chunk with DetailTessellation11(DirectX sample) gives good result. what do you think??

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement