AdvectVDB: how to create an erosion effect
In this tutorial, Edwin Braun will show you how to turn a simple 3dsMax object/box into volumetric particles as well as flowing particles into a surface volume by using just five VDB Operators: Volume2Shape/Volume2Shape; Part2Volume; GetGrid; Advect; SetGrid.
Focus is on AdvectVDB : Advect is defined as ' transfer (heat or matter) by flow of a fluid, especially horozontally inthe atmosphere or the sea '.
SCENE: Box object, floor object, dummy object.
ObjToParticle:
First thing's first: all the objects has to be brought into thinkingParticles and use Instance Shape to transform the objects into a particle.
Make sure each is inside the correct Group in the Create R-menu. here we use Group-Box for the box and Group-Helper for the Dummy.
Add 'force - Gravity': 290, downwards to act on the particles in 'Acid' group.
SIMULATION - std fluid setup with:
- FlowSolver (as the Container);
- FlowGroup (enhanced in tP 6.8) so a basic setup with Smoothing Radius; Density; Viscosity; Tension; Decompress values.
- FlowBoundary - check the i/p list. In this scene, we are using the Box as the boundary - unyielding.
- FlowEmitter/ helper - Dummy object - Obj2Particle brings in the dummy to helper. Particle (helper) connects to FlowEmitter (for spray effects, for example). The ' collision' is with the original Box object and is optimized.
The more complex volume data for the collision will be done after transforming box object to volume.
Note that as usual OpenVDB is a Container and does not activate anything. However, like any container, it is used to create space-holders to take in data such as 1) Distance field & 2) Velocity field as for this scene.
** Signed Distance Field (SDF) in Drop 8 uses a method to store the SDF data (distance from the Box volume) in OpenVDB so every point (volume particles) now will have the SDF info stored in it and the flexibility to used each or any particle for a simulation in a 3D space, activated by Signed Distance.
SHOW VDB - helps to visualize & do Debugging** - in this scene, select Box to view the SDF - select Bounding box - select On or Off 'Interior / Exterior ' to view/debug your premises for the effects as necessary.
ADJUSTING Box- Volume PARAMETERS
Labeled 'STV box' (Box volume in Create) - adjust the Ext / Int bandwidth to generate and view the Voxels, how detail you want it. In this scene, it's set at exterior bandwidth : 3.0 & interior b/w: 10. Voxel size - adjust up 3.0 and you can see real time, there's less voxels now.
Volume2Shape VDB
- Part2Volume (i.e. volume back to mesh operator) a powerful operator that makes every point in space turned into a volume giving the artist unprecedented flexibility and freedom in manipulating down to micro particle effects.
- select (target Vol PGroup): namely where you store rge vol data of ur particles;
- Velocity (speed of particles stored here) ;
- specify where are the particles under Source PGroup - in this scene that is the 'Acid'.
- note that one is the Source group and one is the Target group.
- ShowVDB - select Grid/ Velocity - view the velocity displayed and you can select Type displayed: 'Points' , 'Color' , 'Vector' , 'Velocity'.
GetGrid VDB
- this grabs data from a volume and supplies it to whatever you command it to. Here from OpenVDB - PGroup/Box i.e. Distance field (1) to the AdvectVDB and the 2nd GetGridVDB connects to PGroup/PVolume which is the Velocity field (2) to AdvectVDB.
ADVECT VDB - now the Big thing!
- AdvectVDB most important value is the Time Scale meaning how long in the VFX (effects) do you wish to advert a particle?
- Field of Advect and reference to another volume - feeds into the velocity field to decide when to advect (the trigger).
- in this scene, we are creating an advection / erosion effects with acid and you can see that happening now quickly as a erosion crevice is formed and erosion starts at the edge of the Box.
- Increase the value of Advect Time Scale from 0.1 to 2.0 and you now see it burning out a hole!
- You can also play with values of temperature / melting etc.
SetGrid VDB
- at the end of a VDB setup, Setgrid commits or write back the modified volume data to the volume itself so if you enable Volume2Shape VDB you see the actual effects take place on an actual Box surface.
- to show surface of the flow particles, ON OpenVDBShape and specify your particle group and it automatically creates a surface for your flow particles. Amazingly fast and simple!
For all upcoming and archived tutorials for Drop 8, please subscribe to vimeopro.com/cebasvt/thinkingparticles-v6-drop-8-new-features-and-quick-tutorials
Join facebook.com/groups/thinkingParticles
Commercial license purchase @ cebas.com and Educational license, please email us.