Page 1 of 1

Highlighting a region of terrain

Posted: Thu Dec 11, 2008 3:46 pm
by drewbacca
Does anyone have a suggestion for a way to highlight a region of terrain? By highlight, I mean some method that makes an area of 3d terrain a different color, ideally using some alpha blending to still let some of the original terrain texture show through. The two methods I immediately thought of are 1) use multitexturing, or 2) create a mesh just above the terrain, but neither method seems straightforward. Does anyone have any suggestions or has done this before?

My problems with multitexturing:
- The only support i see for adding an extra texture channel for my highlighted region is by using the EMT_SOLID_2_LAYER material type, which is not available in openGL (what I would like to use).
- Could be a pain since I have multiple terrain tiles

My problems with creating another mesh:
- My highlighted region would be a polygon, and to have the highlighting mesh actually follow the terrain, I would have to calculate all the internal vertices that match the terrain below.
- The camera may be close to the terrain, or flying well above it, which makes choosing a distance to offset my highlighting mesh from terrain difficult. Does irrlicht provide any methods similar to openGLs polygonoffset method to find the minimum distance that avoids z-fighting?