Environment VFX - procedural fracture and vertex coloring system

Making Of / 18 April 2024

This article covers the Houdini pipeline for shattering meshes and adding vertex colors per-piece from the fracture. The technique was used in this piece: https://davidlindberg8.artstation.com/pages/env-vfx

Process overview:

The complete Houdini graph looks like this:

In summary, the process is:

For the small animatable pieces:

1. Subtract a piece from the source geometry, defined by a second mesh

2. Run RBDMaterialFracture to turn it into smaller pieces

3. Separate small and large pieces, to add detail to flat surfaces on large pieces

4. Put the small and large pieces back together

5. Group faces by connectivity

6. Pack each group to primitives (points highlighted below, to show primitive locations)

7. Assign primitive ID numbers based on primitive distance to a point (in this case just origo)

8. Store the primitive number as a custom int named id

9. Refit the values of the primitive IDs to be between 0.0 and 1.0

10. Unpack the primitives, transferring distanceId and id

11. Assign a color attribute based on the value of distanceId (range 0 to 1)

12. Promote distanceId from a primitive attribute to a vertex attribute

13. Set the color of each vertex, based on the value of distanceId for that vertex

14. Shift the UVs for the "interior" geometry to the top of the UV space, so that the new geometry from the boolean and fracture can be colored with a strip in the texture

For the large immovable piece:

1. Subtract a piece from the source geometry, to be shattered and colored

2. Color the geometry black, so that any vertex animation multiplied with it, will make not cause it to move

3. Shift the UVs of the new interior geometry (the "damaged" parts) to the top of the UV space, so that we can use an "interior" strip in the texture for the inside of the statue

Both the large and small pieces are triangulated before being merged together.