Terrain and Textures

From EQUIS Lab Wiki

Revision as of 15:01, 25 July 2005 by Graham (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)
Jump to: navigation, search

We are experimenting with applying multiple detail textures over a landscape using a detail texture map to determine where the textures go.

For now, these are implemented using a CG fragment program that can handle up to six different detail textures over a single world texture. The next step will be to generalize this using a 3d texture to represent an arbitrary set of detail textures.

Detail textures are only applied near the camera, and are faded out over the distance.

From the examples below, we can see that

  • The transitions between textures isn't quite right, with an obvious seam between the texture areas.
  • The world texture doesn't have enough detail, leading to blurred features in the distance.
  • Some of the detail textures don't blend well with the underlying world texture.

So we have a little work to resolve these.

To Do

  • Change the CG script to use a 3d texture
  • Create utility to put n png's into a single 3d texture
  • Add crumble factor into XML specifying how adjacent texture areas 'crumble' into each other
  • Find a way of blending detail textures at transitions so we don't get those ugly ridges
    • I now know why this happens, but haven't figured out how to stop it...
  • Improve generation of world texture.
    • Add mechanism to take account of detail textures when generating world texture to improve blending.
  • Add shadowing to world texture.

Utilities

For generating heightmaps:

For working with DDS volumes:

  • The best tool for creating DDS volume textures is dxtex, which can be downloaded as part of the DirectX SDK. To create a volume with dxtex:
    • Create a new texture; use the dialogue box to specify the dimensions of the volume texture.
      • Specify the number of mipmaps. Personally, I find mipmaps don't work so well with detail textures as their effect is too obvious. With detail fading, they aren't really necessary in any case.
    • Use File|Open Onto This Surface to load your detail textures onto each surface. Use the '<' and '>' keys to select the slice onto which the surface is to be loaded.
    • Save the image
  • Another tool for reading DDS files is ddsview. Due to an apparent bug in the DevIL image library, ddsview cannot write DDS volumes.

Examples

terrainMultipleDetailTextures1.png

terrainMultipleDetailTextures2.png

terrainMultipleDetailTextures3.png