- Home /
Bullet holes on a a character skinned mesh?
I basically want to achieve this effect http://i.dailymail.co.uk/i/pix/2013/09/15/article-2421049-1BD5EFCA000005DC-2_634x339.jpg , I have tried with small quads, but it works very, very badly when the decal has to be big, especially for the head, which is rounded. I s there another way to do it? It has been in games since the Half Life 2 era (2004). I cannot believe it's not standard in Unity...
The results are very diverging, from using stencils, to projectors with custom shaders, to this asset https://www.assetstore.unity3d.com/en/#!/content/13889 . None of those that I saw seem to "carve" a hole the way a (clamped) normal map in the secondary map of the standard shader would do, i.e. those seem to simply put a "smear" on the skinned mesh.
I could argue that "carving" a hole with a normal map is exactly what you do with the secondary map of the standard shader when you use normal map with it - you create a high-quality decal. The thing is this does not work with skinned meshes (or at least I cannot make it work).
Hi, I copied the link to an example in my original post in order to clarify. I put now an example from my project on the difference between what I want to do with projected normal map (on the quad to the right) vs on what I can do with projected shadow shader (on the avatar in the middle). I hope it's clear now http://i.imgur.com/VJIyIGW.jpg
Normal $$anonymous$$aps appearing as they should depend entirely on the lighting situation. Not all lights can produce the effect. You are using the standard shader?
For the hole on the quad on the right I use the standard shader with the bullet hole normal map attached to the secondary map. For the spot on the character I use a projector with a Projector/$$anonymous$$ultiply shader, which is one of only two standard projector shaders in the Unity's Standard assets. If there were a "normal map" projector shader, that could do the trick I guess, but I have not found such projector shader...
There is an interesting Shader in the CGBook. Perhaps you can use it in some way, or otherwise add to it. There's decent articles out there if you do want to write your own shader.
https://en.wikibooks.org/wiki/Cg_Program$$anonymous$$g/Unity/Projectors
Your answer
Follow this Question
Related Questions
Create transparent hole in sails 0 Answers
HIghlight Mesh Areas near bone 1 Answer
Can anyone help me out with the script??? 1 Answer
Detecting Mesh and Saving it 1 Answer
Random Heightmap decals 1 Answer