An implementation Metaballs (a.k.a Blobs) inside Unity3D. Written as a shader for the Particle System to allow formore control and fun ;-)
Demo scene included. As I didn't have time to make GUI, I included the following commands to interact with the demo.
-
RMB
and move mouse to rotate camera. -
Mouse Wheel
to zoom in/out. -
1, 2, 3
to change between 3 shader varients. -
q, w
to change between 2 particle system. -
a
to change the speed of the particles between (0.5, 1, 2) -
s
to stop the particle system. -
d
to disable the noise effect of the particle system. -
z, x, c
to change the background. -
v
to stop the auto rotation of the camera
- Create a new Particle System and make sure it is set to Prewarm and the Max Particles are 10.
- Create a new material with one of the provided shaders.
- Add the material to the renderer component in the Particle System.
- Add the script MetaBalls.cs to the Particle System.
- Enjoy a mesmerizing effect.
- Further optimise the raymarching on the particles.
- Write a main cginclude file to allow reusability and extensibility.
- Further integrate the shader it can take colours directly from the Particle System.
- Add support to Blend Probes.
- Support huge amounts of particles. (Currently only support max of 10 particles)
Skybox from http://pauldebevec.com/Probes/