Jump to content

View more

Image of the Day

#indiedev  #indiegame #screenshotsaturday https://t.co/IwVbswGrhe
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.

Sign up now

3D Terrain Editor [Warcraft 3 Style]

4: Adsense

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
1 reply to this topic

#1 hentailoli   Members   


Posted 29 August 2012 - 04:01 AM

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.

Posted Image

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!

Edited by hentailoli, 29 August 2012 - 10:12 AM.

#2 Steve_Segreto   Members   


Posted 29 August 2012 - 10:22 AM

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

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.