Blender SPH particle based fluids to lightwave tutorial and script. The Blender
script is a replacement for the mdd addon installed with Blender. It
adds a checkbox for exporting in Lightwave mode which swaps the Y
and Z coordinates of the points. This tutorial is based on the video
by James Guard for getting particles from Blender to Modo,
http://vimeo.com/21617994.
Update June 1 2014:
Tried 100,000 particles and had no improvement in the quality of the
fluid in Lightwave. A few days later recreated the 25,000 particle
run and changed the Hypervoxel Blend value from 100% to 3% gave a
much more fluid like result. You tube link:
http://youtu.be/G8jcPcuMLEk
The plan is for the 4th test to use more particles(50,000?) with
better HV materials, tweaked HV size and blend values and better
environment for the render.
Image has 25000 particles. Guessing that something between
100,000 and 1,000,000 particles are needed for a smooth result.
right click the links below to download the videos
MP4, size 24.8MB, play time 7:34
Walk through the scene in Lightwave. Export FBX file. Setup
Blender Addon. Setup and run the simulation.
MP4, size 46.8MB, play time 10:41
Instancing in Blender, export obj and mdd files. Import to
Lightwave.
Software used:
Assets:
- lwo file - includes a
single point mesh and a triangle mesh for particle instancing in
Blender and a flattened torus for instancing inside Lightwave
Install the modified mdd exporter for Blender:
- unzip and copy the io_shape_mdd_testing folder - the
location will be something like
"blender-2.70a-windows32\2.70\scripts\addons\"
- start Blender and activate the addon
- File - user Preferences
- Addons
- Support Level set to "Testing"
- Find Import-Export: Newtek MDD Format and
check the box
- Press the Save User Settings button
Basic steps:
- Export scene to fbx (binary, scale = 0.01)
- Import fbx to Blender
- Add particle system
- Under Physics choose Fluid
- Under Render choose Unborn and Died to keep a constant
particle count
- Particle life set longer than timeline
- Collisions set stickiness to about 1 to prevent bouncing
- Set cache to every frame to remove mysterious particle bounce
- Subframes to automatic
- Create a mesh composed of one vertex located at the origin -
if mesh imported from Lightwave set rotations to zero
- Apply the Particle Instance modifier
- Export the scene or just the mesh in fbx or obj format with
default options
- export the mesh in mdd format choosing the Lightwave mode
option
- load the fbx/obj into Layout with scale = 100
- load the mdd onto the geometry
- apply hypervoxels
Notes:
- Export from Lightwave with scale = 0.01, and binary format
- Import to Lightwave with scale = 100
- Blender does not import fbx animations at this time
- Method works with any Blender particle system, not just fluids
- The modification to Blenders mdd script was minimal. The code
to swap the Y and Z values was already there, but disabled.
- Blender fluids created by the particle system uses Smoothed Particle Hydrodynamics
(SPH)
- Blender domain based fluids uses the Lattice Boltzmann Method
(LBM)
- Compares fluid methods - https://www.fxguide.com/featured/the-science-of-fluid-sims/