- Home /
Fuse objects visually when close to each other Shader/ Effect
Hi,
Is there a way to do this? I can't find anything about it :(
The desired effect is a smooth fusion when objects are close enough to each other.
Answer by Bunny83 · Dec 15, 2019 at 02:37 PM
This is not possible with a pure shader and some arbitrary mesh geometry. Of course there are some post processing effects like an outline effect that can be "merged" with the outline of other objects. However the objects themself can not merge like you've shown. It seems what you're after are something like metaballs. However thoes are a mathematical concept. Rendering metaballs either require a raytracer or some sort of voxel renderer. They are quite expensive to render because they are not polygon based geometry. If you have no idea how they work or how to implement them, you might want to have a look at this coding train video where he creates 2d metaballs. Of course this would be quite difficult to pull off in Unity. What he actually does is implementing a rudimentary raytracer. Something like that would be possible in Unity but it's not that trivial. It also depends on what you actually need this for.
Answer by SuggestiveStranger · Mar 30, 2021 at 03:18 AM
I'm dabbling myself and found this cool vid. I'll probably spend the next couple weeks trying to figure it out, but if it makes sense to you, do share. I'd love to get a head start on understanding it.