Highlighting a region of terrain

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
drewbacca
Posts: 38
Joined: Tue Jan 30, 2007 6:49 pm

Highlighting a region of terrain

Post 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?
Post Reply