Sucked into the vacuum of a black hole: Unity Shader Graph

Sucked into the vacuum of a black hole: Unity Shader Graph

One of the effects I’ve liked in games is the “everything being sucked into a black hole vacuum” look. What are the correct words to describe it? Does this effect already have a proper name or keyword? In Virtual Virtual Reality, the conceit is that you’re the human employee pruning and vacuuming some machine’s lovely domestic abode and suddenly without warning it is as if you have done a terrible thing; you’ve accidentally sucked the first layer of the world away by mistake!…

Today, I was reminded of it again whilst watching the (ever inspiring) devlog for the indie game Farewell North, so I wanted to figure out how it was made. In Farewell North, it seems like it is being used in the playback scene for memories; the visual effect of being sucked back into the projector is exactly what makes them feel like ethereal memories being played back.

This evening I spent a while trying to figure it out. The answer seems to be using Unity’s Shader Graph (which I’ve actually never properly used before, but it reminds me of Blender’s shader nodes, so I guess roughly get the node based system). I looked around for examples and explanations of how it was created. I am glad to say that with all the power of the internets and online resources, it was indeed possible for me to understand how one can recreate the “sucked into a vacuum” effect. Lerp refers to linear interpolation and the value will change from a to b over t. There’s a Vector3 to set the origin point of the “BlackHole” or where everything will be sucked into / spat out of. And then there is a slider property for the “Effect” (a bit like “time” in this case) which can be helpfully tweaked in Inspector for testing purposes. “Range” is a fixed value. There’s obviously a lot more I can experiment with Shader Graph. But for now… a working example of the “Sucked-into-a-blackhole-vacuum” Shader Graph looks like this:

My basic version of the “Sucked-into-a-blackhole-vacuum” look…

Imagine my Spheres and Cubes teleporting endlessly from this world to another world and then back again – oh wait now you don’t even have to imagine it, here’s an actual visual representation of it!