Jump to content
  • Advertisement
Sign in to follow this  

3D Terrain Editor [Warcraft 3 Style]

This topic is 2296 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

Hello to all!

I am making a simple 3D Strategy game resembling Starcraft and Warcraft 3. For this game I want to develop a terrain editor. I want my terrain
editor to have the same functionality as the Warcraft III terrain with which I can create terrain like that in the picture below.


This is an example terrain created with the Warcraft III Editor. I did some research and managed to find some information on how the editor works.

The Warcraft III Terrain editor is tile based. Each tile can have its own texture, as well as different height for each of its four points. The are two major tile types. Normal (flat) tiles which are just a plain heightmap, and cliff tiles which are composed of complex geometry.

Before I start building the terrain editor I started thinking about the different aspects of such an editor and found my self with a few questions:

1.) The whole terrain will be represented by a single Vertex Buffer. This buffer will be recreated every time the camera moves and contain only the visible vertices of the terrain. is this possible and will it pull too much strain on the video card? What are other possibilities? Should I use LOD for a 3D strategy game which has a top-down view tilted 45 degrees on the Y axes? (Like the picture)

2.) I will create a single large texture for every terrain type. (Grass, Stone, etc...) and then use alpha maps to blend them together and apply over the terrain then use another texture with multi-texturing to add detail. Is this a good solution? Will I be able to achieve good quality texturing if I build a big texture for the whole terrain? Is it better to create many small textures? Should I devide the terrain into small parts each having its own textures and vertex buffer and then just do a simple check of the position of the camera to remove the non visible parts of the terrain?

3.) How will I be able to achieve square hills like the picture? What I am thinking of using is having a quad of the terrain, which are parts of hills do be subdivided and then displaced using a heighmap texture ( to make the hill look like there are rocks sticking out). Is it better to just create a mesh for a hill (tillable) and then where there's a hill I simply render the mesh ontop? What other possible ways are there?

I think that's all. I hope someone can answer my questions :(

Thank you for your time!
-hentailoli Edited by hentailoli

Share this post

Link to post
Share on other sites
#1. Don't use a single large vertex buffer to represent all of the terrain or else you can't use frustum culling and then you might over-stress a video card. Instead pick up a copy of Frank Luna's 3D Game Programming with DirectX and follow his instructions on creating terrain patches and a quad-tree. There are of course more optimizations available beyond that, but I think LOD is the last one you should consider. If you have a good "patch" size combined with frustum culling, most of the batches will be offscreen and won't even be drawn.

#2. I think you're describing "Texture Splatting" or "Terrain Splatting". Google it to be sure, but it is capable of producing quality similar to your image. Here's a link: http://www.gamedev.net/topic/553825-hlsl-texture-splatting-question/

#3. You can make a square pyramid simply by equally offsetting the height values of all the vertices in a square fashion. Despite the 2-d appearance of the above terrain, you should use 3-d rendering and 3-d terrain and allow the user to select squares of terrain to offset the y-value to produce those plateaus.

Share this post

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

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!