Disintegration

Disintegration

To continue  my exploration with Geometry Nodes, I decided to delve a little into Simulations with them.  I wanted to experiment with particle distribution, more specifically an effect of disintegration.

To achieve this, I followed this tutorial from Motion Dreams in Youtube. The tutorial is under 20 minutes long, but it packs a lot and goes very quick, so it took me a while to setup the trees correctly and experiment with each action in it.

Setting Up Particle Distribution

I started with a solid mesh and worked on distributing particles within it. Using the Mesh to Volume node, I converted the mesh into a volume. Then, I applied the Distribute Points in Volume node to generate points inside the volume. To ensure a dense distribution, I multiplied the density, allowing for a larger number of points that clearly represented the shape of the mesh.

Particle Distribution Nodes

Next, I set the point radius to a lower value using the Set Point Radius node. This adjustment made the individual particles smaller and helped in achieving a more detailed representation of the mesh.

Particle Distribution Render

Creating the Mask with an Empty Sphere

To control which particles would be affected during the disintegration, I introduced an empty sphere into the scene. By bringing the empty object into the geometry nodes, I was able to calculate the distance between each particle and the empty sphere's position. Using a Less Than or Equal comparison node, I created a mask that selected particles within the sphere's bounds.

Mask Creation Nodes

Adding Simulation Nodes

To make the effect more dynamic, I incorporated simulation nodes. I used the Named Attribute node to store information about the mask. By adding this information into a Store Named Attribute node, I made it keyframable, which allowed the mask to update every frame as the empty sphere moved.

With this setup, the simulation runs continuously, updating the mask and affecting particles based on the empty sphere's position.

 

Moving Particles with the Mask

Using a Set Position node, I manipulated the positions of the particles selected by the mask. As the empty sphere animates through the mesh, the particles within its bounds begin to move upwards, simulating a disintegration effect.

However, without any constraints, the particles would continue moving indefinitely. To address this, I used the Named Attribute and Store Named Attribute nodes to track the "age" of each particle. By adding 1 to the age attribute every frame for particles affected by the mask, I could monitor how long each particle had been active.

I then used a Delete Geometry node in conjunction with a Greater Than or Equal node to remove particles whose age exceeded a certain value. This kept the simulation controlled and prevented particles from drifting endlessly.

Improving the Simulation

To enhance the effect, I switched to using the Distribute Points on Faces node. This change focused the particle distribution on the mesh's exterior, providing a more accurate shape and a cleaner disintegration effect.

Improved Distribution

Initially, the simulation showed a clear spherical pattern due to the empty sphere's influence, which didn't look very natural. To experiment on a different model I downloaded the character Dozy from Mixamo.

Initial Simulation

To introduce randomness and make the disintegration appear more organic, I added a Noise Texture node. By mixing the position data with the noise using a Mix RGB node set to Linear Light, I was able to break up the uniformity of the mask. This adjustment added variability to which particles were affected and how they moved.

Adding Noise for Randomness

Adding Random Movement to Particles

To further enhance the effect, I added randomness to the particles' movement. By setting up movement vectors and applying a Scale node, I connected a Noise Texture with a Map Range node to a Random Value node. This setup allowed me to control the scale of the randomness, giving me significant control over the animation's look.

An interesting addition was the use of the Scene Time node, which outputs the elapsed time in seconds. By connecting it to a Multiply node, I could increase the noise over time, making the particles' movement more dynamic as the simulation progressed.

Random Movement Nodes

Instancing Geometry on Particles

To replace the particles with actual geometry, I used the Instance on Points node. By connecting the geometry after the particle deletion step, I was able to add new geometry only to the particles that remained. I added an Ico Sphere as the instance object and used the mask (from the Named Attribute) for the selection. This ensured that the instances appeared only where the mask had passed.

Instancing Geometry

This step significantly improved the visual quality of the disintegration effect.

Instanced Geometry Animation

Transferring Texture to Particles

To make the instanced geometry inherit the original mesh's texture, I used the Sample Nearest Surface node. This node allowed each particle to sample texture information from the original mesh. By using a Named Attribute node to get the UV map information and storing it with a Store Named Attribute node (named "ParticlesUV"), I could transfer the UV data to the particles.

UV Mapping Nodes

In the material setup for the instanced geometry, I created a copy of the original mesh's material. I then used an Attribute node to call the "ParticlesUV" attribute and connected it to the vector input of the Image Texture node within the shader. This allowed the particles to display the mesh's texture correctly.

Material Setup for Particles

As a result, the particles now carried over the texture from the original mesh instead of appearing as plain white spheres.

Particles with Mesh Texture

Making the Mesh Disappear

To complete the disintegration effect, I needed the original mesh to disappear as the particles took its place. I created a new geometry node setup for the disappearing mesh. By grouping the mask nodes from the particle simulation and adding that group to the new simulation on the animated mesh, I ensured that the same mask controlled both the particle appearance and the mesh disappearance.

Mesh Disappearance Nodes

In the mesh's material, I used the same mask information to control transparency. An Attribute node called the mesh mask, and a Color Ramp connected this data to the alpha channel of the Principled BSDF shader. This setup allowed the mesh to become transparent where the particles were taking over.

Mesh Transparency Setup

 

Conclusion and Next Steps

By combining these techniques, I achieved a convincing particle disintegration effect. For final touches, I added a second controller to the mask to provide more animation options. I'm considering adding a smoke-like effect to enhance the visual impact further, following this tutorial: Blender Smoke Effect Tutorial

 

Back to blog

Collapsible content

References