- Home /
Decal on a curved surface
I need to place a sticker on a curved object. I was thinking of using projectors, but it projects through the mesh onto the other side. I was also thinking of using a "bullet" decal, but it is just a flat plane. I need to place the sticker dynamically, so it has to follow the contours of the object. Can I do this with a custom shader? Any ideas?
is a dynamic decal (like an hole caused by a bullet) or a stati decal?
its a static image, but i have to be able to place it anywhere on the object's surface. If there is a bump or a ridge it has to conform to the shape of the model.
Answer by screenname_taken · Aug 05, 2014 at 04:39 PM
Try https://www.assetstore.unity3d.com/en/#!/content/13889
I know for sure that https://www.assetstore.unity3d.com/en/#!/content/10608 does it, but it's not free. There used to be a free version but i can't find it in the store.
Thanks, the free asset worked perfectly. I just had to change some things to work during runtime.
Answer by duck · Aug 05, 2014 at 05:00 PM
One technique is to calculate which triangles of your mesh are intersected by the decal projection, duplicate them to a new mesh, and then calculate the decal UVs on the new mesh from the projection.
There's a great article here describing how to do it: http://blog.wolfire.com/2009/06/how-to-project-decals
Your answer
Follow this Question
Related Questions
Weird Lines When Using Projector Unity 2020.3 0 Answers
What is the best way of drawing/projecting dynamic trajectory on a ground surface 1 Answer
Project vertices on surface, make a shape 1 Answer
Blood patterns on terrain 0 Answers
Bug with Decal Projector in HDRP 2019. White glow instead of transparency. 0 Answers