Stock video reference: “An old and melted candle rotates in front of a black background” by Forrest Brown.
PROCEDURAL MELTING TEST
Melting test using SOP based on Junichiro Horikawa’s technique. The speed, shape, and thickness of the melting are easier to control in comparison with the FLIP tests.
- IsoOffset: Add some resolution by increasing the sampling. Name: density, this name is going to be used to compare voxels and determine the bottom part of the geometry to create the melting effect (is going to be used when manipulating color).
- Volume Resize: Scale based on the bounding box of the main object, using Bound node.
- Reference the values of the bound by using a point wrangle: information of size and center. Run over: Detail (only once)
- Reference the information from the Point Wrangle on the Volume Size to have control over the voxels: detail("../pointwrangle1", "size", 0)
detail("../pointwrangle1", "center", 0)
- Set in controls "padding" and "global padding", so the dripping can excede the size of the bbox. In "Y": detail("../pointwrangle1", "size", 1) + ch("../CONTROLS/padding") detail("../pointwrangle1", "center", 1) - 0.5 * ch("../CONTROLS/padding")
- Solver (to manipulate the points)
- Use Convert node to turn the volume into a polygon (set the offset to 0.5, turn U value up if more resolution is needed) and smooth the surface of the polygon with an Attribute Blur: Increase blurring Iterations (in this case 10).
This Volume Wrangle takes the value that is in the current voxel and compares it to the value of the voxel that is above it. It checks to see if the density in the other voxel is less than the current value.
- set(@ix,@iy,@iz) is used to check the position of the voxels.
- f@density = upvalue is used to transfer the density to the "transparent" or less dense voxel.
- Noise is added so not all the voxels have the same density. Include a seed for the noise.
- vector4 seed = set(@P.x, @P.y, @P.z, 0) is the position vector.
- To adjust the seed based on the frame and controlling the speed of the melting: seed.w = @Frame * chf("speed").
BREAKING THE TOP EDGE
In this test, I wanted to compare if having an irregular edge (boolean result obtained by subtracting part of the initial shape) would affect the final result of the simulation. Because the edge geometry was only modified slightly on the “Y” axis, the melting pattern is almost identical in both tests. Doing a boolean operation, instead of just displacing the points of the edge generates a more interesting shape in the top face of the tube. In the last test reduced the radius of the top edge, in order to have a more realistic result: the “melted” geometry shape is blended more with the main shape.
The shape of the top edge of the geometry can be modified to have subtle variations in the melting result and to produce a more interesting shape of the top of the candle. I tried three different edges, by copying a sphere, a tube, and a torus to the points of the top edge. To have an organic look and have a clean result in the geometry, the copies were converted to volumes and turned back into polygons.
I randomized the scale and rotation of the elements to break the edge. By using VDB smooth and increasing the resolution (scaling down the voxels) I created the geometry to melt.
To test multiple iterations I set some controls in a Null node. I added the original controls that J. Horikawa proposed: resolution for increasing the density in the volume, padding to contain the dripping, threshold to create more dense melting lines (increase value), noise scale to make smaller clusters by using a higher value, and the speed of the melting. In addition, I added “edge wear” to control if the top edge of the candle is regular or irregular, “dripping shape” to test different edge shapes to melt.
Even though the initial shape of the top edge geometry has more variation, the result of the melting had slight changes and in the case of the torus and the tubes, it required more resolution to clean the initial topology.
To create more interest in the shape, I added a POP particle system. I tested the look of different speeds and the number of particles generated in different frames to have more control of the dripping.
For the shape of the dripping particles, I used the trail node, and with an attribute remap I controlled the thickness of the tubes. At the end of each tube, I copied spheres to shape the drip.
To have a more organic look I placed some spheres along the tube surface, turned them into volumes, and used a volume mix to subtract shapes from the melting volume. The result was static and not realistic.
I also tried to add more variety and motion by subtracting the particle dripping system from the melting volume. The result was not as expected and the simulation presents some artifacts and noise.