Hello, I'm wondering if there is any support in Irrlicht for drawing decals on objects (terrain for instance)... blood-splats or unit markers.
For example, when you click something in World of warcraft a red marker appears.
Anyone tried this or know a some way to implement it?
Decals on terrain
decals are not very hard to pretty tough depending on how nice you want it to look. heres some ways ive thought of doing it
easy:
use the triangle selector to get intersection like in example 7, add and rotate the right decal mesh node, then add a deletion animator to it. yuck.
harder:
make a custom node that is a cyclical vertex buffer, use the triangle selector to find the center and 4 corners of the decal. if a corner has no collision or it's too far away then clip it to the edges of the center's triangle and recalculate tcoords. still only really good for small decals on flat surfaces.
hard:
same as above, but copy all triangles inside the collision area, clip them to collision fustrum, project the tcoords on. too hard for me.
for markers, you could just add a red marker node and make it a child of the currently selected node, or have each object have a hidden marker child node that becomes visible when you select it.
easy:
use the triangle selector to get intersection like in example 7, add and rotate the right decal mesh node, then add a deletion animator to it. yuck.
harder:
make a custom node that is a cyclical vertex buffer, use the triangle selector to find the center and 4 corners of the decal. if a corner has no collision or it's too far away then clip it to the edges of the center's triangle and recalculate tcoords. still only really good for small decals on flat surfaces.
hard:
same as above, but copy all triangles inside the collision area, clip them to collision fustrum, project the tcoords on. too hard for me.
for markers, you could just add a red marker node and make it a child of the currently selected node, or have each object have a hidden marker child node that becomes visible when you select it.