1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
|
vdb_tool 10.6.1
# Define frames over which to iterate. n is the number of frames and s is the stride
# See the comments associated with the "read" and "write" options below to
# understand the implications of the "frames" option.
for n=100,110,1
# Read the multiple frames of the OpenVDB files with points:
# "..._points.0100.vdb", "..._points.0101.vdb, ending with
# ""..._points.0109.vdb"
read /Users/ken/dev/data/vdb/fluid_points.{$n:4:pad0}.vdb
# convert vdb point to geometry points
vdb2points
# PointToLevelSet dimension=256 [voxels], radius=2 [voxel units], width=3 [voxel units]
points2ls dim=256 radius=2 width=3
# Dilate level set
# radius of dilation is 1.0 voxels
# spatial discretization is 5'th order WENO
# temporal discretization is 1'th order TVD-RK
dilate radius=1 space=5 time=1
# Gaussian filtering of level set
# number of iterations is 1
# spatial discretization is 5'th order WENO
# temporal discretization is 1'th order TVD-RK
# width of the filter kernel is 1.0 voxels
gauss iter=1 space=5 time=1 size=1
# Erode level set
# radius of erosion is 1.0 voxels
# spatial discretization is 5'th order WENO
# temporal discretization is 1'th order TVD-RK
erode radius=1 space=5 time=1
# Level set to polygon mesh conversion
# Mesh adaptivity is 0.1 %
ls2mesh adapt=0.1
# write polygon mesh to binary ply files:
# "surface-000.ply", "surface-100.ply, ending with "surface-109.ply"
write surface-{$n:3:pad0}.ply
# end for loop
end
|