- Home /
Blood splatter PNG file flush with terrain?
Hello,
I just made a blood splatter .PNG image in GIMP with a transparent background and I was wondering how to place this onto a piece of my terrain? I tried placing the image of the blood on a plane but that made the blood look rigid and it didn't match up to the terrain quite correctly. I don't need it so that an object shoots the blood everywhere (getting shot), but rather it be a preset texture on the ground so when a player comes across the blood it is already there (static). All the while looking as if the blood is actually on the ground.
Thanks.
Answer by Olgo · Jul 10, 2014 at 03:39 AM
I believe what you may be looking for is the Projector.
found here: http://docs.unity3d.com/Manual/class-Projector.html
One of it's suggested uses would be to create bullet holes. I believe you could spatter blood using your blood .PNG file.
It won't combine a texture with your terrain texture but you can shine it on to your terrain, you could even tell it what layers to ignore. In this case, you would want to ignore all layers except for terrain so you dont have it shining on your players as they walk over it.
Hope that helps.
There is such an ocean of settings to wade through at the various levels (Texture, $$anonymous$$aterial, Projector), that it's basically blind luck to ever get this working properly at all. I finally managed to get it working using the GUI/Text Shader of all things, on the Projector $$anonymous$$aterial (in Unity 5). Too bad none of the various YouTube or Forum tutorials about this ever work properly, or they're all ten years old, or links are dead. Very frustrating.
I believe the method I described in my answer is now Legacy and has now been replaced. Once I get back to my dev computer I'll check it out and hopefully come back with more info.
$$anonymous$$an that would be super-awesome of you. Thanks. The way I got it working doesn't really work with Terrains, Spheres, or anything other than a flat quad, so pretty useless. The projector also seems to indiscri$$anonymous$$ately spam the texture onto all $$anonymous$$eshes in the scene, rather than the one I want. I guess I'd need to put every mesh onto it's own layer in the scene...