To do list:
- import/export mesh settings, scale, units, file formats, optimizations for complex geometry
- simulation techniques, partitions, network sim, switches
- solid dynamics inside fluid and interaction
- fluid mesh building and export options
- optimize mesh or surface building
- details: bump, ripples, foam, wet map, density map + shading
- render passes + light setup
- comp + nuke gizmos
01. import/export mesh settings, scale, units, file formats, optimizations for complex geometry
3D Studio Max units scale 1 unit = 1 meter
import scale in RealFlow 1
scene size for simulation grid inside 3DSMax aprox. 30 meters X 30 meters
the geometry container can be single sided but the normals have to be toward the fluid
the geometry container has to be collapsed to poly, triangle faces, max 7K triangles (we choose this value arbitrary and it seems to work both ways – quality and size wise/speed), pivot centered on 0,0,0 world, pivot aligned to world. this is initial state for geometry in order to reference everything by this.
the object can be exported as OBJ or SD from inside 3DSMax. I exporting SD, single frame, selected object.
the object can be imported back from RealFlow as SD or OBJ. The SD import works great and does not affect pivot or scene placement. The condition is not to have the same named object inside 3DSMax.
the SD export object can be activated under Export Central inside RealFlow.
if the export option is OBJ, then you have to mirror it on Y axes with the offset -2*Y_value (keep in mind initial state mesh).
RealFlow fluid meshes export as bin’s and it come as ‘flipped’ inside 3DSMax.
scale -Y and it snaps into place.
Mesh optimization results:
Updated low resolution cave mesh (for fluid simulation). Decimated from 40k to only 4k faces.
Shape curvature deviation is kept between 4% and 16%. Planar surfaces were decimated separately to keep the poly count to a minimum.
Dark green areas show original dense topology. Brighter colors show low res version.
Triangle spread and topology.
02. initial settings for fluid, density, viscosity, no of particles
1. Scale 1 unit = 1 meter (3dsmax), scale 1.00 (realFlow)
2. Realflow Sim FPS 25fps
- Resolution 0.1 => 300k particles to fill the whole volume
- Density 1000
- int pressure 1
- ext pressure 1
- Viscosity 3
- Surface Tension 0
- Max Particles 5000k
Conclusion: – to be simulated
Last sim looked good but particles were too scarse so mesh ended up with low definition.
- Resolution (all fluids) 1 => 1400k particles to fill the whole volume
- Max particles count (all fluids) => 5000k
- Water density = 1000
- ReWater density = 1000
- Foam density = 780
- Spray density = 700
- Scene scale = 1
- Sim time for 600 frames = aprox. 52h
03. simulation techniques, partitions, network sim, switches
The particle emiters are:
- Water – density 1000
- ReWater – density 1000
- Foam – density 780
- Spray – density 700
The script has been tested on a 1.0 RF scale
Event script: waveFoamSprayEvent v1.0 from nextlimit website – all the copyright to the owner.
What the event script does:
- cycles trough every water particles and tests for pressure, velocity and collision.
- when the water particles values tested are inside the treshold limits stated by us, we copy the particle from the water emitter to the foam emitter.
- cycles trough every foam particles and tests for age and height,
- when the foam particles values tested are inside the treshold limits stated by us, we copy the particle from the foam emitter to the rewater emitter.
We modified the script to get the ReWater particles back to Water particles after given time, in order to end up with only one fluid. This is because we want to pass only one particle system to the next stage.
# Transform particles back to REwater back to WATER
particle_rewater = rewater.getFirstParticle()
current_age = particle_rewater.getAge()
vel_rewater = particle_rewater.getVelocity()
pos_rewater = particle_rewater.getPosition()
if (current_age >= 2):
particle_foam = particle_foam.getNextParticle()
Final result of the simulation:
04. solid dynamics inside fluid and interaction
– on hold for the time being
05. fluid mesh building and export options
First pass: one mesh (Water + ReWater)
- polygon size 0.06
- filters on
- relaxation 0.1
- tension 0.05
- steps 64
- radius 0.04
Export mesh as .bin file
Final result of the mesh build – rendered on mray
Foam shading – pyrocluster and mental ray:
Use Real Flow particle cache .bin files inside 3dsmax. For shading particles I choose pyrocluster voxel renderer because of the integration with the mental ray:
3D Studio Max scale values: 1 unit = 1 meter, display metric
Pyrocluster settings for foam:
- include RFparticles_foam – particle system
- include 1 spot light with shadow cast on – same position as the sunlight in the scene
- initial step 0.1m
- color 1 = 240,248,254
- color 2 = 213,221,225
- illumination enable
- receive shadow on
- self shadows on
- initial shadow step = 0.2m
- override light settings on
- shadow type = raytrace shadows
- shape = sphere
- radius 0.2m
- squash 0.1
- regularity 30%
- velocity scale on
- stretch 5.0
- noise type = turbulence
- density 260
- size 0.2
- details 3
first render of the foam particles – no upscale interpolation
clay mesh + foam particles geometry + pyrocluster