Are you spending hours tweaking your Houdini scene only to see your liquid clip through the walls of a glass container? Do complex node setups and endless solver tweaks leave you frustrated?
Working with fluid simulation inside a glass container can feel overwhelming. You might face refraction artifacts, collision issues, or slow simulation speeds that stall your project.
This article zeroes in on a straightforward workflow for containing fluids inside a glass vessel using Houdini’s FLIP solver. No unnecessary detours—just clear steps to build a watertight container, set up your fluid source, and fine-tune solver settings.
By following along, you’ll learn how to optimize collision geometry, adjust particle separation, and apply realistic shading for crystal-clear results. Let’s dive into creating a polished fluid-in-glass effect that holds up under close inspection.
What Houdini version, plugins, and scene assets should I prepare before simulating a fluid inside a glass container?
We recommend Houdini 19.5 or newer for its optimized FLIP solver, GPU-accelerated particles, and improved volume handling. Core SOP and DOP workflows in these versions reduce simulation noise and runtime. If you plan to use the latest Karma XPU renderer, Houdini 20 provides deeper integration and viewport feedback.
For rendering options, choose between Mantra, Karma XPU, or a third-party GPU renderer like Redshift or Arnold. If using Redshift, install the Redshift for Houdini plugin and enable the ROP Redshift node. Arnold users should load the HtoA plugin. Make sure your license server is reachable before launching heavy renders.
Before you start the simulation, gather these scene assets:
- Glass container: closed manifold mesh with consistent thickness and normals; export as OBJ or FBX.
- Collision proxy: convert the container to a VDB SDF for stable DOP interactions.
- Fluid emitter geometry: a simple sphere or box source scaled to the container’s interior volume.
- HDRI environment: 16-bit EXR for realistic lighting and sharp refractions.
- Utility textures: noise and gradient maps for subtle fluid shader variation.
Optionally, use SideFX Labs HDAs—like the FLIP Toolbox to seed emitter velocities or the Shockwave Silo for debris effects. Pre-cache collision geometry with a low-res proxy to speed up iteration, then swap in high resolution for the final simulation pass.
How do I model and prepare the glass container for precise collision (thin walls, thickness, and UVs)?
Accurate collision starts with a well-modeled glass container. In Houdini, begin with a simple polygonal shape—often a PolyBox or revolved curve via Revolve SOP—and use PolyExtrude on the faces to generate consistent wall thickness. Maintaining uniform wall thickness (0.5–2 mm in real-world scale) prevents fluid particles from slipping through or causing simulation artifacts.
Next, inspect and refine normals. Use a Facet SOP to ensure all normals face outward on the outer shell and inward on the inner shell. If you’re working with mirrored or procedural instances, apply a Transform SOP uniformly to both shells. Always freeze transforms before generating collision volumes to avoid scale discrepancies in the solver.
Proper UVs guarantee accurate refraction and can aid in advanced collision baking. Apply the UVFlatten SOP to unwrap cylindrical surfaces: define logical seams—usually at the back or non-visible edge—and set padding to accommodate mip-mapped textures. A quick UV Quickshade preview helps identify distortions before committing to the simulation.
Finally, convert your finished geometry into a collision-ready volume. Use VDB from Polygons to create a signed distance field (SDF), selecting a voxel size that matches your container’s wall thickness (typically one quarter of the thickness). Feed this VDB into the FLIP or Pyro solver’s collision input for watertight results. If memory is a concern, downsample to a coarser VDB and refine only around the fluid surface by cropping or using a Volume Wrangle.
- PolyExtrude SOP for consistent shell creation
- Facet SOP to correct normals on dual shells
- UVFlatten SOP with defined seams and padding
- VDB from Polygons for precise collision geometry
How do I create and initialize the FLIP fluid source inside the container (volume vs. particle emission)?
To start a FLIP sim inside your glass container, you must first define where and how fluid particles emit. Houdini offers two primary workflows: volume-based emission and point-based emission. Volume emission treats the entire interior as a particle-generating region, while point emission spawns particles from surface points. Choosing the right method impacts both control and performance.
First, import or model your container and convert its inner surface into a level set (VDB). Place a FLIP Object node and connect a FLIP Source SOP. In the FLIP Source parameters, set the emission type to “Volume” or “Points.” For volume, point cloud density is computed per voxel inside the VDB; for points, particles emit only where packed points exist on the surface.
- Volume Emission: Use the container’s SDF as the emission volume. Adjust “Emission Density” and “Birth Rate” to fill quickly. Ideal for uniform fills and closed containers.
- Point Emission: Scatter points on the surface or use a Scatter SOP, then feed into FLIP Source. Offers precise control over emission zones and timing.
When using volume emission, ensure your VDB resolution matches the desired particle size: a coarse VDB yields sparse particles, while a fine VDB increases memory usage. For point emission, you can drive emission with attributes—such as velocity or temperature—to create jets or localized streams. In production, combine both: a base volume fill plus a point-source jet for dynamic effects.
How do I configure the FLIP solver and forces to simulate realistic fluid behavior inside glass?
Essential FLIP solver parameters: particle separation, substeps, viscosity, surface tension
Accurate fluid inside glass starts with tuning the FLIP solver’s core settings. Particle separation defines resolution: smaller values capture fine surface detail but increase compute time. Substeps improve stability when fluid interacts with tight geometries—isolate this under the Solver tab and raise to 3–5 for splashy motion. Viscosity controls thickness—values near zero simulate water, while 0.05–0.1 give syrupy behavior. Surface tension binds particles into cohesive droplets; small values (0.001–0.005) prevent excessive jitter while preserving realism.
| Parameter | Role | Suggested Range |
|---|---|---|
| Particle Separation | Surface detail vs. speed | 0.02–0.05 |
| Substeps | Collision accuracy | 2–5 |
| Viscosity | Flow resistance | 0–0.1 |
| Surface Tension | Droplet cohesion | 0.001–0.005 |
Advanced techniques: adhesion, boundary handling, and preventing leakage with constraints
To simulate fluid clinging to glass, generate a “nearBoundary” particle group by sampling distance to the container’s inner SDF. In the FLIP solver’s Adhesion tab, enable adhesion for that group and dial strength between 0.1–0.4. This creates a realistic wetting line and subtle capillary pull along the glass walls.
Boundary handling requires precise collision SDFs: on your Static Object DOP, reduce collision padding to ~0.001 and enable post-collision separation. If particles still penetrate, use a Volume Wrangle to clamp velocities along normals. For leakage prevention, define a kill zone outside the container by testing P positions against the glass SDF and discarding particles immediately. This constraint approach maintains clean borders and avoids artifacts in tight crevices.
How can I cache, troubleshoot, and optimize the simulation for faster iteration and stability?
Efficient iteration begins with a robust caching workflow. Inside your SOP network, insert a File Cache SOP to write out .bgeo.sc frames. This prevents Houdini from recalculating fluid every time you tweak shading or lighting. For larger batches, switch to a Geometry ROP with “Write to Disk” enabled and point to a dedicated SSD. Always lock and timestamp your cache nodes to ensure repeatable results.
Troubleshooting often means isolating problem areas. Use a DOP Import Fields node to pull in only the velocity or surface fields. Display the velocity vector glyphs and examine the Geometry Spreadsheet for extreme values. If you see spikes above 10 m/s, reduce your Flip Particle Separation or lower the “Velocity Scale” in the Flip Solver. This pinpoints whether artifacts originate in solver settings or collision proxies.
Optimization hinges on balancing detail and speed. Crop your DOP network using a bounding box around the glass container to cull off-screen particles. Reduce particle count by increasing Particle Separation or enabling “Adaptive Particle Sizing.” In the Flip Solver, drop the maximum substeps to 1–2 per frame and raise the CFL Condition to 3–4 to allow larger timesteps. These tweaks cut simulation time without drastic quality loss.
For stability, adjust solver damping and collision offsets. Under the Flip Solver’s “Advanced” tab, enable “Under-Relaxation” on pressure and velocity to quell oscillations. Increase the collision object’s inward offset by 0.005 m to prevent particles from jittering through the glass wall. Finally, run short test sims (10–20 frames) with OpenCL disabled to verify consistent behavior before committing to full-cache passes.
- Cache early: File Cache SOP or Geometry ROP on SSD
- Isolate fields: DOP Import Fields + vector glyphs
- Crop domain: DOP bounding box culling
- Reduce particles: higher separation, adaptive sizing
- Tune solver: CFL 3–4, substeps 1–2, under-relaxation
- Offset collisions: inward collision ghost 0.005 m
How do I shade, light, and render the liquid and glass for photoreal results (Mantra/Redshift/Arnold tips)?
In Houdini, a photoreal glass shader begins with the Principled Shader in Mantra or its equivalents in Redshift and Arnold. Set the index of refraction (IOR) to around 1.5, enable thin-walled mode for a single-surface approximation, and drive color absorption by depth. In Redshift’s RS Material, dial up Refraction Weight and use the Absorption Color and Absorption Depth to tint thicker areas. For Arnold, the aiStandardSurface’s Transmission weight and Thin Walled toggle yield crisp refractions without internal volume computation.
For the fluid, decide between a volumetric or thin-surface approach based on simulation resolution. With a thin surface, use subsurface scattering in the Principled Shader or Redshift’s SSS parameters to mimic light penetration. Drive color via a ramp keyed to the fluid’s depth attribute—deeper regions absorb more light. In Arnold, the Volume shader’s scattering_coefficient and attenuationColor settings produce realistic diffusion inside the liquid.
Proper lighting emphasizes refractions and caustics. Use an HDR environment map for realistic ambient light, then add a key backlight to accentuate rim highlights through both glass and fluid. In Mantra’s physically based engine, enable GlobIllum for indirect bounces. In Redshift, activate Photons for caustics and optimize the Min/Max Radius. In Arnold, enable Refractive Caustics on your lights and increase Caustics Rays in the Render Settings for sharper patterns on nearby surfaces.
- Mantra: Reflection Depth 8, Refraction Depth 12, use Ray Variance Antialiasing
- Redshift: Global Ray Depth 10, Refraction Rays 15, enable Unified Sampling (Min/Max Samples 32/256)
- Arnold: Camera (AA) Samples 4–8, Transmission Samples 4–6, Ray Depth Settings: Refraction 12
- Enable motion blur only if the fluid moves; otherwise disable to reduce noise
- Use AOVs (diffuse, specular, transmission) for precise compositing
By combining accurate shading parameters, targeted lighting setups, and optimized render settings, you will achieve a believable interplay of glass and fluid. Always iterate on material IOR, absorption curves, and sample counts per renderer to balance noise and performance. Refer to your renderer’s documentation for advanced caustic controls.