Applying partial decals on dynamic objects

the old post, about Quads at batchnode, has a big flaw: irregular surfaces (even spheres would break it).
may be the projective texture mapping is still the best solution, still have to test it tho.

============== old post ===========

how to apply partial decals using a BatchNode?

so, I dont want to modify the texture, by painting it, to apply decals, because I guess it would require an endless memory to store so many textures modified by decals, or not?

by partial decals, I mean, we have like 3 cubes, and an explosion happens near them all, and I would like to put a decal only where it will look good:

I think Quad(s) could be placed properly aligned, but how to cut them and still place the texture properly?
Each geometry would have its own batchnode btw.

unless there is a better way to do that, JME doesnt come with anything ready that way?

well, the above is for dynamic objects, about static ones, I read we can use some trick I didnt understand very well that we could render only the inside of a cube? containing the texture and that is intersecting the surface to apply the decal, if I understood it right,
Are there decals? - #8 by IsaacYousuf,
Projective Texture Mapping,
I am not sure also if it would be faster than the BatchNode to apply a huge lot of decals everywhere.

2 Likes