How to do a Bulge or “dented” effect using Tyflow openVDB.

Updated: Jan 14

The last update of Tyflow added nodes to work with openvdb volumes. Then, for the first time, 3DS Max artists can create meshes and effects using the openvdb library.

In this tutorial I will show you how to do a “dented” or “bulge” effect using Tyflow. The efffect is not complicated. The artist only have to take care to follow the steps in order to achieve the bulge effect. Let’s get started.

  1. I’ve created a scene with a Torus, a Sphere and a Teapot object. The Torus is the object that will be cut. Then, I’ve already placed the Sphere and the Teapot (the cutters) at the desired place. After that I’ve created the Tyflow Object.

The Base Scene
The Base scene

2. Now, we have to follow this logic: Dilate the base mesh (the Torus) and the bulge mesh (the cutters. In this case, the Teapot and the Sphere). After that we need to do a boolean intersect operation between the both dilated vdb’s. Then, we have to subtract (boolean subtraction) the ¨bulge vdb” (the Sphere and the Teapot) from the base vdb (the Torus); and subtract the vdb intersection result from the “bulge mesh”. The last to do is combine (boolean add) both subtractions, and we have the final result.

The Bulge Effect Logic
Vdb Bulge or “dented” Effect Steps

3. Creating the VDBs: Open up the Tyflow editor. You can scroll to find the vdb nodes or use the filter to only display the vdb nodes. Add a Birth vdb node to convert the meshes to openvdb sdf volumes. The voxel size controls the quality and precision of the vdb volume. As the value decreases, the resolution of the vdb volume increases. For this tutorial, we can work with the default value of 1,0.

Scroll to the vdb nodes.
…or filter the vdb nodes.
Then add the Birth VDB node to convert the meshes to volumes.

4. Add the Object to SDF node and pick the object that will be the base mesh. In this case, the Torus. For this example, I’ll rename the nodes for the clarity of all steps.

The Object to SDF node was renamed to Base mesh for clarity.

5. Add another Object to SDF node. This one will convert the cutters (Sphere and Teapot) to vdb volumes. Then, pick the Sphere and Teapot objects. Note that the operation was set to Intersect.

The Object to SDF node was renamed to Bulge mesh.

6. Hide all objects, except the Tyflow object. We can see the result of the boolean intersect operation between the base mesh (torus) and the bulge mesh (sphere and teapot).

The boolean intersect result will be used to create the “bulge” effect.

7. The VDB Filter node will be used to dilate the vdb intersection result. This pass will prepare the intersect mesh to be cut by the bulge mesh (the cutters) and, therefore, create the “dented” or “bulge” effect. in this example we used a dilation width of 4,0.

The VDB Filter was set to dilation and width equals 4.

8. Add another Object to SDF node. Pick the cutters (Sphere and Teapot) and set the operation to Subtract. This will subtract the cutters from the dilated mesh operation done before.

The bulge mesh was subtracted from the filter dilation result.

9. Now we have to add again the base mesh (the Torus). Add an Object to SDF node and pick the Torus object.

We already can see the “bulge” effect.

10. Now we have to cut the base mesh (Torus) with the cutters. Add an Object to SDF node, set it to Subtract and pick the Sphere and teapot objects.

Now the Torus was cut correctly and the Bulge Effect was achieved.

11. Unhide the Sphere and Teapot. Then, we have the final result.

The final result.

12. If you move the Sphere or the Teapot, the bulge is updated accordingly.

Move the bulge causing object…
… and the bulge is dynamically updated.

13. But, the Torus looks faceted. Commonly, the artist first move is to add a VDB Filter to smooth the mesh or to increase the VDB resolution. However, a better solution is to work with an already smoothed object and then add a VDB Filter to fine tune the smoothness. First, disable the Tyflow event and unhide all objects.

14. Select the Torus object and increase the segments to 96 and sides to 48.

Increase the torus divisions to smooth the object.

15. Hide the Torus object and enable the Tyflow event. Not that the Torus is already more smoothed.

After the VDB operations are done, increase the subdivisions of the objects to smooth the surface.

16. Add a VDB Filter set to Mean and width equals to 1 to fine tune the smoothness.

The last pass: the previous object subdivision operation avoids the nodes overload caused by using too many VDB Filter nodes.

17. And the work is done! Now we have a template. You can add other objects or replace the existing ones in the Object to SDF nodes. The bulge effect will be update appropriately.

Another example using the same logic. Of course, the bulge effect can also be animated!

And do not forget: Donation = Loving

#3dsmax #openvdb #tyflow #vdb

68 views0 comments