How do I get this effect? Basically when a player hits another player with a weapon we need to have blood appear on the blade. The blood should appear at the correct location and both sides of the blade. We tried decals but those project into infinity with no way to restrict them to only 1 mesh.
(Before anybody says Custom Stencil, no that won’t work, as the same mesh might be multiple times in the player hands, imagine 2 players holding the same sword mesh, the decal will try to project onto the mesh. Even if I were to automate this process I would be restricted to 255 meshes as it seems.)
I am a programmer and having severe difficulty implementing some generic mask to the weapon and then translating a relative location onto whatever points on the mask. Currently on the programming side I can retrieve the world location of the impact, convert it to a relative location on the mesh and make it a hit percent. A hit percent in this case just means how far up the blade the hit occured with 0 being the hilt and 1 being the tip of the blade.
I am completely clueless on how to:
- translate this to texture positions
- paint the blood using opacity or whatever suitable way at the correct location that I got beforehand
- do this dynamically each hit
I am not an artist, so I would highly appreciate visual references, documentation or similar. The response I got so far is “A single render target for the weapon, used as a weight map for a masked blend, could be especially low res and cost almost nothing.” which tells me absolutely nothing.
Besides that a render target seems like a severe overkill in my case. I’ve tried it out on our character following this tutorial: https://youtu.be/gyAFtpEpBnk
This resulted in 8GB of memory being used for the render target which in my opinion is simply absurd. Luckily we can buy a 100$ plugin to avoid this for skeletal meshes, which is fine by us.