1

I'm looking for a way to make two objects smoothly merge together in Unity. I'd like to do it through shaders rather than mesh, thinking that'll be faster as this merging effect needs to happen often at runtime. Initially I looked into raymarching as I saw an example of exactly what I'm looking for using it, see below. However, it seemed far too daunting a task to make raymarching from scratch and in general coding shaders in Unity. C# scripts I can manage but shaders seem like a whole 'nother beast.

Or this link: https://i.stack.imgur.com/yYqHb.png

Or this link: https://www.youtube.com/watch?v=B1Rzst89MPU

(Thanks Stefan Wuebbe for reminding me to add clean links as well)

I am hoping to find a solution using Unity Shader Graph, as that's the only real shader work I've had any experience with. But of course, any suggestions for an approach to this challenge are appreciated.

For a bit more context, I am hoping to use these merging shapes to make dynamic elemental attacks and effects for a game about bending the elements I'm starting to work on. Specifically spheres merging could make a great effect for a water stream attack.

Thanks for the help in advance!

  • You are trying to avoid mesh solution without any try or performance profiling, I don't know about your usage case, but there are many great ways to make it as fast as possible, time slicing, unity jobs, burst are a few nice examples – Hesamom Feb 25 '22 at 20:07
  • @StefanWuebbe Good point, I added the normal links in there as well. Thanks! – Peter Christensen Feb 26 '22 at 13:27
  • You're welcome, hope there will be lots of useful Answers to your question – Stefan Wuebbe Feb 26 '22 at 13:36

0 Answers0