- Home /
Bullet holes (decals?) on Characters
This question has been asked on Unity Answers before, but the answer wasn't really an answer at all and all the threads about decals are VERY confusing in my opinion. Now I've spent A LOT of time searching for a solution to this, but I simply couldn't find one. I am creating an FPS, and I want to have bullet wound decals on my enemies when I shoot at them. What would be the best possible method to do so? I know that the bootcamp demo had a nice decal system, but somebody on the Unity forums said it was very very difficult to isolate it and use it for other projects...
I'm stuck and I simply don't know what to do... Spawning a plane with a texture on it (classical decal example you find in evey tutorial) at the hit.point location wouldn't look good, since the colliders of the character/ragdoll are only capsules that do not really match the actual geometry of the body. Would a projector be the solution? But if yes, wouldn't that hurt performance badly? In case it doesn't, can somebody please explain how I am supposed to do it?
I really hope somebody can help me. Thanks in advance :)
Answer by Dantus · Nov 06, 2013 at 10:10 AM
Have you considered to use the Decal System: https://www.assetstore.unity3d.com/#/content/3779
It is not really easy to use it at runtime.
Yes I tried, and I'm the guy who contacted you about the problem with the limited amount of decals in the Decal System forum thread xD In the end I kinda managed to get projectors to work as they should by using the builtin projector/multiply shader and spawning them with an offset on the ragdoll... Now I just have to find a way to decrese the amount of drawcalls, like.... some way of batching them together, given that this is possible... Or maybe set a timer and make them disappear automatically :)
I see :) I am pretty sure we would have found a solution for your issue. If you need to lower the draw calls, you may consider to try it again and we can continue where we stopped.
It is really awesome how much support you are giving to all the people! Really! Das ist echt unglaublich :O Now, the problem with your decal system was that I couldn't create more than 4 bullet holes on a skinned mesh... But now I tried it on another model, and on that the limit was 3... and 3 it was every time °+ this is really weird... Should I upload a webgame build?
Yes, please! And also try the demos that come with the Decal System. Do you have the limitation there as well when you import the newest version of the Decal System into an empty project? But I suggest that we continue the discussion in the Decal System thread :)
yes, they are there as well... by the way okay, I'll send you the link there