- Home /
Drawing an animated circle onto a terrain,Drawing an animated circle onto a mesh
I was hoping someone might be able to give me some pointers on where to start with an effect similar to the "Buried supplies" indicator used in "7 Days To Die".
In the effect, an animated emissive circle is drawn onto the (potentially non-flat) terrain. You can see it in action here: https://youtu.be/_96GhPIOD2E?t=210.
I've tried using shader graph and using the depth buffer (similar to Bracky's Force Field Effect). I don't like the result because it is too heavily influenced by the existence or absence of pixels drawn behind the effect. I've briefly detailed this attempt in this short unlisted video.
I considered using a custom shader for the terrain, and applying the effect if the point's distance is within some bounds of an input position (the centre of the circle), but that would only let me draw a single circle on a given terrain mesh. I want to be able to potentially draw quite a few.
I don't want to use a decal, because as I understand it, that will deform the circle too much when the terrain gets extreme. Imagine a circle placed near the edge of a cliff. I don't want part of the circle drawn all the way down at the bottom of the cliff, since that would be outside the radius.
I'm pretty new to Unity, so am sure I'm missing an obvious approach. Can anyone point me in the right direction? I effectively want to find the collision boundary between a sphere and an arbitrary mesh, and apply a highlight effect at the boundary.
Your answer
Follow this Question
Related Questions
Area of effect spell marker 1 Answer
How do I raise terrain as a circle? 0 Answers
Make a simple tree 1 Answer
Cannot paint non-default trees 0 Answers
Is there any prefab brush that works well in unity 2d? 0 Answers