thinkingParticles 6 Drop 8 VDB Getting Started with BooleanVDB # 3 by Edwin Braun
ATTN: if you wish to follow thinkingparticles tutorials, please note Access Only @ vimeo.com/cebasvt. Not on Youtube.com, please follow @ Vimeo.
Edwin Braun will now talk about hoe to use the BooleanVDB in thinkingParticles Drop 8.
OpenVDB is used to modify and change volumes. Boolean operations + OpenVDb will give you Watertight resolves, straightforward effects that are a breeze to make.
SCENE: consists of multiple cylinders, sphere and torus.
MISSION: to subtract cylinder shapes from the sphere and to move the torus through the sliced sphere while having the shape of the sphere restore as the torus moves out.
HOW TO,
Boolean #1 : cutting out the cylinder shapes; Boolean #2: dynamic motion torus thru sphere.
MASTER DYNAMIC SETUP
Golden Rule - always make sure you organized and name your setups/ subsets in proper order to avoid future hassles.
CREATE Dynamic Setup - ObjToParticles used to wire multiple objects to particle operators.
First, select sphere and Instance Shape, meaning transform the 'sphere' into a 'particle' in thinkingParticles to work with. Store this Instance Shape (sphere) in the Group - target.
There are 3 main master system created : 1) Target 2) Operators 3) PreBoolean. This is for organizing the setups.
Target - ObjToParticle: start by renaming the operators:
1) o2p Sphere 2) o2p Cylinders 3) o2p torus. Give an initial velocity value of ' 80 ' in the X direction.
Now, the info is ready for us to work with procedural and systematically.
** OPENVDB recall acts solely as a Container where you store and organize all your volume grids. By itself it does not operate or do anything. ** Next, we create two distance volume grids : SDF (Signed Distance Field) and 'Restore' Distance. You can see this on the R-menu: under Create - OpenVDB - Grids.
i) Turn cylinders into volume representations; ii) Cut shape out of sphere
OPERATION 1: Cutting out the cylinder shapes from the sphere:
- Scanning the cylinders into real volume representation for the Boolean operations.
- Shape2Volume : this takes target particle group (o2p Sphere) and Converts sphere mesh to volume using Shape2VolumeVDB and takes the sphere and turns it into a distance field * and distance field (o/p) is a volume data now. (* distance field is SDF (Signed Distance Field) and helps with location coordinates on a 3D space)
- Explaining the parallel initiators (and tP users will know we cannot have two initiators in parallel) but in Open VDB, we can do this so there is a following call out to all the connections / operations coming after. - So Shape2Volume Sphere (1) activates Shape2volume Cylinders (2). - S2V (Cyl) o/p twice with the Booleam operations. All the three cylinders vol data are held in the S2V(Cyl) (2) and it then outputs three times for 3 cylinder cut-out shapes as a preBoolean operations. Refer Create - o2p Cyl - Group - Prebool.
Rename - S2V(1) -- Sphere Vol which will call upon S2V(2) Cylinder Vol. And the Cylinder Vol S2V activates in turn the BooleanVDB: so three cylinders thrice in cutting out the shapes.
Here Edwin wanted to work on the result of Prebool - so using the newly created Distance Field (look at the small prints under BooleanVDB).
(Optional) FILTER VDB - powerful smoothing tool. Here, we try out a Gausse filter and you can see how well it smooths and bevels out the edges of the sphere after the cylinder cut outs. The beauty of VDB is that once you have converted something into volume data, you can tweak and work on the Volume Data.
SETGRID VDB - rewrites the final volume output after the actual modifications on the volumes are completed, i.e., it writes the field into the Distance and into Restore.
OPERATION 2: TORUS through SPHERE
Again use ShapeToVolumeVDB and turn the torus into volumetric data.
GETGRID VDB - we are taking the restore o/p and wiring it to the i/p distance in the SetGridVDB and what happens is that the effects you can now see the sphere is restore to shape after the torus slices through. And Disabled the torus can slice through without a restoration of the shape.
DYNAMIC SET TREE ORDER
Reiteration on the importance of how you order the operators / nodes on the Dynamic setup as it works through the sequence so for example, SetGrid and GetGrid comes at the end AFTER all the aforesaid operations have been executed. GetGridVDB (1) is used here with distance field i/p from the Sphere (renamed Sphere Vol) and GetGridVDB (2) renamed Torus Vol so again, we see here an unconventional double / parallel initiators feeding into Boolean operator and then we used the etGridVDb to write it back. ShowVDB helps you see the real time display of the operations.
The Vol2Shape is responsible to display the Final-Final results back into an editable mesh.
Thumbsup the tutorial if it has helped you. Subscribe to cebas youtube. To make a purchase: www.cebas.com/thinkingParticles Educ info@cebas.com