views:

797

answers:

8

I am currently in the process of needing to create game content for our student project. I need to create a desert environment that we will export then load into our game. I am not a designer, although I am being forced into the role.

The environment with have a level of detail similar to World of Warcraft (maybe not as high detail).

My question is what was be the best way to do the environment design? Should we write the OpenGL GL_QUADS, etc code by hand, or should it be designed in an application like 3dsMax or Maya? Also what would be the best 3D format to use for loading in the game?

I am looking for the easiest tool to accomplish the design, so I can spend more time on the actual code implementation.

+1  A: 

Why not try Blender? It's free, and it's already used for such purposes. It has plenty of plugins and export-formats, and it probably runs on your favorite OS.

kaleissin
The Blender interface is ugly and confusing...there are those who preach its useful once you know how, but why be so different to other 3D apps just because you can. Not an option.
Brock Woolf
+2  A: 

Depends on what you want to accomplish. WoW has a rather large, continuous world that is likely based on a height map, which can be easily designed with a simple paint program (actually, you could use any graphics program you want), which is rather simple to write. In addition, it has special models for any features that cannot be expressed as a height map, like rocks, plants etc.

Rendering a height map is rather simple. You can use an additional map to specify which texture(s) should be used on any point on the map.

I did something similar in a hobbyist project some time ago and found it to be easier than having to import some real designed terrain. Every patch (rectangular area) could have up to three textures defined, with every point / vertex having its very own blend values for the three textures. Impressive enough, if you don't want to actually create a full featured game. Our terrain editing tool also supported several procedural texture algorithms (like fractals) to provide a fine-grained structure in both the height map and textures.

OregonGhost
+6  A: 

Typically this is done using a displacement map. You draw (or generate) a black and white image, and then use it to displace a mesh.

This is relatively easy to code. You simply create flat mesh of squares (in this example I will presume it lays on the xy plane), then map each vertex in that mesh to a a pixel location in your image. You then use the value of the pixel to decide how far to move your pixel in the z direction.

Doing this will allow to you to redraw your terrain using an image editor, and will appeal to you if you would rather code than generate assets. However for a more fine tuned terrain you will probably want to tweak the terrain by hand.

Incidentally terragen uses this tecnique for creating landscapes. While it is typically used to generate very high resolution terrains you can set it to use a much lower resolution mesh. Or you can use it to create your displacement map and then use your own code to apply it to a mesh.

Jack Ryan
+1  A: 

A heightmap would be your best bet for the terrain (and 'layered' or multiple images can be used for object placement). There are limitations with height maps (typically no overhangs/caves/etc) so you undoutably want to also be able to load general 3D models and animations as well. You might like to look at the Collada and FBX formats (which are widely supported by a lot of editors) or OAIL. A few of the open source 3d engines might be worth looking at if you want to jump start your project (e.g. Ogre).

However, as you are a student and if you aren't already I would highly recommend XNA which comes with FBX support.

Gwaredd
+3  A: 

As some people have already stated there are several techniques that you could use to generate the terrain, namely:

Using a 3D Modelling package

Create a full 3d terrain in your 3d editing program of choice (such as Blender, 3DS Max, etc). The advantage of this is that you can create exactly what you want, with overhangs, caves, and other impressively detailed features.

The down sides are that it will require some skill to make the level, which then needs to be exported from the modelling package and into the game. Additionally the data generated could be potentially huge, making the stored level far larger than the methods outlined below.

Heightmap in an Image

Create the terrain based on a height map which can be created as an image in an image manipulation program (paintbrush, Paint.Net, Photoshop, etc).

The advantages are that there are plenty of image manipulation programs out there, you should already have code in your project to load those images, and the file sizes will not be as large as storing the whole mesh of the level.

However without using some other tricks the level will not be able to have any overhangs or other complicated entities like caves. It will still be able to emulate some of these things with models in the scene though.

Random Map Generation

An alternative to the previous idea is to procedually generate the terrain (akin to using the clouds filter in Photoshop and blending it multiple times) using perlin noise. This is essentially what the Terragen program does to generate the terrain.

The main additional downside to this is that since the map is random you might not get two identical maps for a very long time.

Editors

As far as editors go you've got some choices:

  • Use a 3D Modelling package to model the whole map.
  • Use a paint package to create a heightmap.
  • Use some code and a random seed to generate a random map.
  • Or code up a map editor using the in game engine.

The last choice however will require a bigger investment by the team and will still require you to use one of the other methods of displaying the landscape (3d model or height map).

Daemin
A: 

Have a look at the Virtual Terrain Project. Not only is it an excellent open source terrain visualiser and designer, but the web page also includes numerous links to other terrain modelling applications and papers.

Shane MacLaughlin
A: 

Remember when you develop your light rendering code that you need normal vectors for the triangles/quads of your surface. If you don't do this (or do it bad) you'll get lighting problems (or no lighting at all). The good thing is that your normal calculation algorithm can be used in general for all the surfaces in your application, assuming they're based on the same type of elements (triangles, tri-strips or quads).

Note that normal vector perturbation can be applied for very interesting effects regarding lighting (without modifying the underlying surface).

How To Set the Current Normal Vector in an OpenGL Application

Hernán
A: 
Rocketmagnet