I had an idea to use a render to texture method in my game to be able to have blood splats on the ground, like sc2 creep, splatoon's paint or portal 2's gel. I need some help making a plan on how to make this work, here are my ideas so far:
1) The 3D scene is a terrain with some buildings on it, take the scene bounding box's min plane and store it as a separate plane.
2) Raycast into this plane, alternative method is to raycast the physics engine collision mesh?
3) Make a texture for the plane during scene init, but keep the texture within a reasonable dimension, 2kx2k?
4) Render whatever we want to this texture and let the scene shader's sample it.
That's the rough idea, how comes the hard part, so we have the ray intersection point for either the plane or the triangle on the mesh.
1) How to find that point on the texture?
2) How to generate the new texture coord's for the scene meshes?
3) Should I be using some kind of unwrap uv like OpenGI http://opengi.sourceforge.net ?
4) What about the technique projective texturing? I know it is similar to a shadowmap, just not sure if that's what I need, the entire scene can be covered at any one point by the blood/gel/creep material.
Any help would be appreciated! Thanks.