Jump to content

  • Log In with Google      Sign In   
  • Create Account


Strategic Terrain


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
14 replies to this topic

#1 hossainiir   Members   -  Reputation: 995

Like
0Likes
Like

Posted 02 September 2013 - 11:41 PM

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.


خلیج تا ابد فارس

Persian Gulf


Sponsor:

#2 Migi0027   Crossbones+   -  Reputation: 1660

Like
1Likes
Like

Posted 03 September 2013 - 12:44 AM

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


Hi! Cuboid Zone
The Rule: Be polite, be professional, but have a plan to kill everyone you meet, ohh, AND STEAL ALL ZE TRIANGLES FROM ZHEM!

#3 frob   Moderators   -  Reputation: 20496

Like
0Likes
Like

Posted 03 September 2013 - 01:06 AM

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.
Check out my personal indie blog at bryanwagstaff.com.

#4 PandaDragonThing   Members   -  Reputation: 311

Like
0Likes
Like

Posted 03 September 2013 - 05:07 AM

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..



#5 hossainiir   Members   -  Reputation: 995

Like
0Likes
Like

Posted 03 September 2013 - 09:06 AM

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.


خلیج تا ابد فارس

Persian Gulf


#6 Norman Barrows   Crossbones+   -  Reputation: 2058

Like
2Likes
Like

Posted 03 September 2013 - 11:08 AM


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.


Norm Barrows

Rockland Software Productions

"Building PC games since 1988"

 

rocklandsoftware.net

 


#7 hossainiir   Members   -  Reputation: 995

Like
0Likes
Like

Posted 03 September 2013 - 02:03 PM

Thanks Norman Barrows,

With all descriptions ,seems that the best technique is to use displacement map.


خلیج تا ابد فارس

Persian Gulf


#8 hossainiir   Members   -  Reputation: 995

Like
0Likes
Like

Posted 04 September 2013 - 12:55 AM

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, 04 September 2013 - 12:55 AM.

خلیج تا ابد فارس

Persian Gulf


#9 Migi0027   Crossbones+   -  Reputation: 1660

Like
0Likes
Like

Posted 04 September 2013 - 02:29 AM

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).


Hi! Cuboid Zone
The Rule: Be polite, be professional, but have a plan to kill everyone you meet, ohh, AND STEAL ALL ZE TRIANGLES FROM ZHEM!

#10 hossainiir   Members   -  Reputation: 995

Like
0Likes
Like

Posted 04 September 2013 - 02:52 AM


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.


خلیج تا ابد فارس

Persian Gulf


#11 Migi0027   Crossbones+   -  Reputation: 1660

Like
0Likes
Like

Posted 04 September 2013 - 03:10 AM

What is a 'large' terrain?


Hi! Cuboid Zone
The Rule: Be polite, be professional, but have a plan to kill everyone you meet, ohh, AND STEAL ALL ZE TRIANGLES FROM ZHEM!

#12 hossainiir   Members   -  Reputation: 995

Like
0Likes
Like

Posted 04 September 2013 - 04:01 AM

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.


خلیج تا ابد فارس

Persian Gulf


#13 Norman Barrows   Crossbones+   -  Reputation: 2058

Like
1Likes
Like

Posted 05 September 2013 - 02:42 AM

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.


Norm Barrows

Rockland Software Productions

"Building PC games since 1988"

 

rocklandsoftware.net

 


#14 Norman Barrows   Crossbones+   -  Reputation: 2058

Like
1Likes
Like

Posted 05 September 2013 - 02:50 AM


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? ).


Norm Barrows

Rockland Software Productions

"Building PC games since 1988"

 

rocklandsoftware.net

 


#15 hossainiir   Members   -  Reputation: 995

Like
0Likes
Like

Posted 05 September 2013 - 08:46 AM

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??


خلیج تا ابد فارس

Persian Gulf





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS