MaxLiquidSolver

MaxLiquidSolver : MaxFluidSolverClass {49815c51,49491593}

Available in 3ds Max 2018.3 and higher. The liquid class contains the set up parameters for a fluid simulation, including references to other objects, such as colliders and kill planes, that interact with the liquid in the simulation.

Constructor

Not directly creatable by MAXScript. Solvers are "owned" by MaxLiquid objects. You can create a solver using MaxFluidLiquidObject.createSolver().

For example:

liquid = maxLiquid pos:[0,0,50]
liquid.CreateSolver 1
solver = liquid.solvers[1]
solver.baseVoxelSize = 4.0

Properties

This class has many properties. They are organized here according to their order of appearance on the Simulation View dialog.

Note: Properties not listed here should be considered as for internal use only, or reserved for future implementation.

General Parameters

<MaxLiquidSolver>.solveName : string

The solver name.

Liquid Attributes Tab

Properties in this area of the dialog are associated with the parent MaxLiquid object. See MaxLiquid.

Solver Parameters Tab

Simulation Parameters

General Parameters Rollup

<MaxLiquidSolver>.simUseTimeline : boolean

Indicates whether to use the full scene timeline for the start and end of the simulation.

<MaxLiquidSolver>.simStartFrame : integer

When simUseTimeline is false, sets the start frame of the simulation.

<MaxLiquidSolver>.simEndFrame : integer

When simUseTimeline is false, sets the end frame of the simulation.

<MaxLiquidSolver>.useSystemScale : boolean

Indicates whether to use the default system scale (where one unit = 1 inch).

<MaxLiquidSolver>.fluidScale : float
<MaxLiquidSolver>.fluidScaleList : integer

When useSystemScale is false, these parameters set the scale of one fluid unit. The fluidScale parameter sets the value, and the fluidScaleList parameter sets the units, where:

<MaxLiquidSolver>.reScaleParams : boolean

Gets or sets the Auto-rescale parameters setting.

<MaxLiquidSolver>.baseVoxelSize : float

Gets or sets the Base Voxel size, which is the base resolution for the simulation.

Note:

Prior to 3ds Max 2022 this property was called masterVoxelSize.

<MaxLiquidSolver>.gravityMagnitude : float

The base gravity magnitude, in meters per second squared. The default of 9.8 corresponds to the earth's gravity.

<MaxLiquidSolver>.gravityForceNode : node

Gets or sets the gravity force node (which is a Gravity : SpacewarpObject object) that affects the gravity direction for the simulation.

<MaxLiquidSolver>.useGravityNodeStrength : boolean

Indicates whether to use the .strength parameter on the gravity force node instead of the .gravityMagnitude parameter to determine gravity strength.

<MaxLiquidSolver>.enableSpatialAdapt : boolean

Gets or sets whether the special adaptivity is turned on for the simulation. This feature is useful in deep water simulations, where detail is needed at the surface and edges, and lower resolution can be used everywhere else.

<MaxLiquidSolver>.deleteExceedingParticles : boolean

Indicates whether exceeding particles are deleted. These are particles in low resolution areas. This further reduces the number of voxels simulated, which can improve simulation performance.

Simulation Parameters Rollup

<MaxLiquidSolver>.transportStepAdaptivity : float

Gets or sets the transport adaptivity value, which determines the distance voxels can travel before additional transport phase substeps are calculated. This value can be in the range of 0.0 to 1.0, where:

<MaxLiquidSolver>.minSteps : integer

The minimum number of substep calculations to perform per frame.

<MaxLiquidSolver>.maxSteps : integer

The maximum number of substep calculations to perform per frame.

<MaxLiquidSolver>.transportTimeScale : float

Sets the speed of the particle flow, where values greater than 1.0 speed up the flow without introducing any new velocities or accelerations, and values between 0.0 and 1.0 slow it down.

<MaxLiquidSolver>.timeStepAdaptivity : float

Gets or sets the time stepping adaptivity value. This determines the number of iterations of the whole simulation per frame, including voxelization, pressure, and transport phases.

<MaxLiquidSolver>.minTimeSteps : integer

The minimum number of time steps to perform per frame.

<MaxLiquidSolver>.maxTimeSteps : integer

The maximum number of time steps to perform per frame.

<MaxLiquidSolver>.solidVoxelScale : float

Gets or sets the collision voxel scale, which is the multiplier applied to the Base Voxel size when voxelizing collider objects.

<MaxLiquidSolver>.forceVoxelScale : float

Gets or sets the acceleration voxel scale, which is the multiplier applied to the Base Voxel size when voxelizing accelerator objects.

<MaxLiquidSolver>.foamMaskVoxelScale : float

Gets or sets the foam mask voxel scale, which is the multiplier applied to the Base Voxel size when voxelizing foam mask objects.

Liquid Parameters

<MaxLiquidSolver>.dropletThreshold : float             

The threshold at which particles get converted to droplets. Values of 1.0 or above prevent droplet formation.

<MaxLiquidSolver>.dropletMergeBackDepth : float             

The depth (in voxel widths) within the liquid surface that a droplet must reach before it rejoins the liquid and is included in the fluid dynamic computations.

<MaxLiquidSolver>.surfaceBandWidth : float             

The width of the liquid's surface, in voxels.

<MaxLiquidSolver>.interiorParticleDensity : float             

The particle density of the inner volume of the liquid.

<MaxLiquidSolver>.surfaceParticleDensity : float             

The particle density at the surface of the liquid.

<MaxLiquidSolver>.vorticityEnable : boolean             

Enables the calculation of the vorticity channel.

<MaxLiquidSolver>.vorticityDecay : float

A value that is subtracted from the accumulated vorticity every frame.

<MaxLiquidSolver>.vorticityMult : float             

A multiplier for the magnitude of the curl of the current frame, before it is added to the accumulated vorticity.

<MaxLiquidSolver>.vorticityMax : float             

A clamp for the total allowed vorticity.

<MaxLiquidSolver>.surfaceTensionEnable : boolean             

Enables surface tension calculations.

<MaxLiquidSolver>.surfaceTension : float             

The surface tension value, which is an attractive force between particles on the surface. This causes a clumping effect.

<MaxLiquidSolver>.viscosity : float             

Controls the thickness of the liquid. Higher values are thicker.

<MaxLiquidSolver>.viscosityScale : float             

Smooths and dampens the liquid flow by blending the simulated velocities with the neighboring average. This is not physically correct, but can be used to mimic viscosity with very little computational cost. Values over 2.0 may produce unpredictable results over the duration of the simulation.

<MaxLiquidSolver>.erosionFactor : float

Controls how closely the fluid boundary gets shrink wrapped back to the particle positions, as a percentage of the particle radius. A value of 0.0 results in no erosion, while 1.0 erodes by the full particle radius.

<MaxLiquidSolver>.erosionFactorNearSolids : float             

Determines whether the fluid surface is eroded in regions that are close to collider objects, based on the normal of the collider surface. Whenever the surface is eroded, it is always eroded by the full factor amount.

Emitter Objects

Emitter parameters have "global" and "override" versions for each setting. The global parameters are applied to all emitters, except for those with override enabled. The override versions of parameters are arrays of values, with the index of the value affecting the corresponding emitter in the owning MaxLiquid.emitter_Meshes array.

Note: There are also some "generic" parameters that are not documented and are for internal use only.

Emitter Parameters Rollup

<MaxLiquidSolver>.emitterOverrideTab : boolean array

Indicates whether to override the global parameters for the corresponding emitter in the MaxLiquid.emitter_Meshes array.

<MaxLiquidSolver>.globalEmitterEmitType : int
<MaxLiquidSolver>.emitterOverrideEmitTypeTab : int array

Gets or sets the emitter type, where:

<MaxLiquidSolver>.enableEmission : boolean
<MaxLiquidSolver>.emitterOverrideEnableEmissionTab (OverrideEnableEmission) : boolean array

Indicates whether liquid emission is enabled for the emitter.

<MaxLiquidSolver>.globalEmitterDensity : float
<MaxLiquidSolver>.emitterOverrideDensityTab (EmitterOverrideDensity) : float array

The physical density of the fluid. Water has a higher density than oil.

<MaxLiquidSolver>.densityMap : texturemap
<MaxLiquidSolver>.globalEmitterDensityTexmap : texturemap
<MaxLiquidSolver>.emitterOverrideDensityTexmapTab : texturemap array

A texture map to use for density distribution.

<MaxLiquidSolver>.globalEmitterExpansionRate : float
<MaxLiquidSolver>.emitterOverrideExpansionRateTab (OverrideExpansionRate) : float array

Expands or contracts the liquid within the emitter. Positive values push particles out of the emitter in all directions while negative values pull particles in. A value of 0.0 neither pushes nor pulls.

<MaxLiquidSolver>.expansionRateMap : texturemap
<MaxLiquidSolver>.globalEmitterExpansionRateTexmap : texturemap
<MaxLiquidSolver>.emitterOverrideExpansionRateTexmapTab : texturemap array

A texture map to use for expansion distribution.

<MaxLiquidSolver>.globalEmitterStickinessStrength : float
<MaxLiquidSolver>.emitterOverrideStickinessStrengthTab (OverrideStickinessStrength) : float array

The amount that the fluid from this emitter adheres to nearby colliders.

<MaxLiquidSolver>.globalEmitterStickinessBandwidth : float
<MaxLiquidSolver>.emitterOverrideStickinessBandwidthTab (OverrideStickinessBandwidth) : float array

Sets, in world-space units, how close the fluid from this emitter must be to a collider in order for the stickiness to affect it.

Emitter Conversion Parameters

<MaxLiquidSolver>.emitterConversionOverrideTab : boolean array

Indicates whether to override the global parameters for the corresponding emitter in the MaxLiquid.emitter_Meshes array.

<MaxLiquidSolver>.globalEmitterMode : integer
<MaxLiquidSolver>.emitterConversionOverrideModeTab : int array

The emitter mode, where:

<MaxLiquidSolver>.globalEmitterCoarsenInterior : boolean
<MaxLiquidSolver>.emitterConversionOverrideCoarsenInteriorTab : boolean array

Sets the distance in voxel widths used to close (dilate and then erode) the solid voxels when the conversion mode is Solid (Robust). The internal minimum is 1.0 so that only greater values have an effect. Note that high values can create artifacts.

<MaxLiquidSolver>.globalEmitterOffsetSurfaceDistance : float
<MaxLiquidSolver>.emitterConversionOverrideOffsetDistanceTab (OverrideOffsetSurfaceDistance) : float array

The distance in voxel widths used to close (dilate and then erode) the solid voxels when Mode is Solid (Robust). The internal minimum is 1.0 so only values greater than that have an effect. High values can create artifacts.

<MaxLiquidSolver>.globalEmitterThicknessUnits : integer
<MaxLiquidSolver>.emitterConversionOverrideThicknessUnitsTab : int array

Sets whether thickness is in voxels or world-space units. When set to Voxels, the effective thickness depends on the Base Voxel Size of the simulation. Possible values are:

<MaxLiquidSolver>.globalEmitterThickness : float
<MaxLiquidSolver>.emitterConversionOverrideThicknessTab : float array

Sets the amount to thicken the mesh. For solid shapes that are already quite thick, you can use 0.0 for a precise boundary or even negative values to shrink along the surface normals. For thinner volumes and shells, you should use larger values to prevent holes.

<MaxLiquidSolver>.emitter_voxelScale : float
<MaxLiquidSolver>.emitterConversionOverrideVoxelScaleTab : float

Sets a scaling factor for the Base Voxel Size used to initially voxelize meshes that share this property.

<MaxLiquidSolver>.globalEmitterVelocityScale : point3
<MaxLiquidSolver>.emitterConversionOverrideVelocityScaleTab (OverrideVelocityScale) : point3 array

Controls the proportion of velocity that is inherited from the emitters' animated transformation and deformation by the fluid at the time of emission in each of the world X, Y, and Z axes.

<MaxLiquidSolver>.globalEmitterEnableAdditionalVelocity : boolean
<MaxLiquidSolver>.emitterConversionOverrideEnableAdditionalVelocityTab (OverrideAddlVelocityMult) : float array

Adds extra velocity to any existing velocity from other sources (such as velocity inherited from the emitter's animation).

<MaxLiquidSolver>.globalEmitterAdditionalVelocityMult : float
<MaxLiquidSolver>.emitterConversionOverrideAdditionalVelocityMultTab : float

Sets a multiplier to scale additional velocity uniformly across all axes.

<MaxLiquidSolver>.globalEmitterAdditionalVelocity : point3
<MaxLiquidSolver>.emitterConversionOverrideAdditionalVelocityTab (OverrideAddlVelocity) : point3 array

Sets the base velocity to add in world coordinates.

<MaxLiquidSolver>.globalEmitterArrowNode : node
<MaxLiquidSolver>.emitterConversionArrowNodeTab : node array

Holds an arrow helper object in the scene. The orientation of the arrow will adjust the direction of additional velocity.

Collision Objects

Collider parameters have "global" and "override" versions for each setting. The global parameters are applied to all colliders, except for those with override enabled. The override versions of parameters are arrays of values, with the index of the value affecting the corresponding collider in the owning MaxLiquid.collider_Meshes array.

Note: There are also some "generic" parameters that are not documented and are for internal use only.
<MaxLiquidSolver>.colliderConversionOverrideTab : boolean array

Indicates whether to override the global parameters for the corresponding collider in the MaxLiquid.collider_Meshes array.

<MaxLiquidSolver>.globalColliderMode : integer
<MaxLiquidSolver>.colliderConversionOverrideModeTab : int array

The collider mode, where:

<MaxLiquidSolver>.globalColliderCoarsenInterior : boolean
<MaxLiquidSolver>.colliderConversionOverrideCoarsenInteriorTab : boolean array

Sets the distance in voxel widths used to close (dilate and then erode) the solid voxels when the conversion mode is Solid (Robust). The internal minimum is 1.0 so that only greater values have an effect. Note that high values can create artifacts.

<MaxLiquidSolver>.globalColliderOffsetSurfaceDistance : float
<MaxLiquidSolver>.colliderConversionOverrideOffsetDistanceTab : float array

The distance in voxel widths used to close (dilate and then erode) the solid voxels when Mode is Solid (Robust). The internal minimum is 1.0 so only values greater than that have an effect. High values can create artifacts.

<MaxLiquidSolver>.globalColliderThicknessUnits : integer
<MaxLiquidSolver>.colliderConversionOverrideThicknessUnitsTab : int array

Sets whether thickness is in voxels or world-space units. When set to Voxels, the effective thickness depends on the Base Voxel Size of the simulation.

<MaxLiquidSolver>.globalColliderThickness : float
<MaxLiquidSolver>.colliderConversionOverrideThicknessTab : float array

Sets the amount to thicken the mesh. For solid shapes that are already quite thick, you can use 0.0 for a precise boundary or even negative values to shrink along the surface normals. For thinner volumes and shells, you should use larger values to prevent holes.

<MaxLiquidSolver>.collider_voxelScale : float
<MaxLiquidSolver>.colliderConversionOverrideVoxelScaleTab : float array

Sets a scaling factor for the Base Voxel Size used to initially voxelize meshes that share this property.

<MaxLiquidSolver>.globalColliderVelocityScale : point3
<MaxLiquidSolver>.colliderConversionOverrideVelocityScaleTab : point3 array

Controls the proportion of velocity that is inherited from the collider's animated transformation and deformation by the fluid at the time of collision in each of the world X, Y, and Z axes.

<MaxLiquidSolver>.globalColliderEnableAdditionalVelocity : boolean
<MaxLiquidSolver>.colliderConversionOverrideEnableAdditionalVelocityTab : boolean array

Adds extra velocity to any existing velocity from other sources (such as velocity inherited from the collider's animation).

<MaxLiquidSolver>.globalColliderAdditionalVelocityMult : float
<MaxLiquidSolver>.colliderConversionOverrideAdditionalVelocityMultTab : float array

Sets a multiplier to scale additional velocity uniformly across all axes.

<MaxLiquidSolver>.globalColliderAdditionalVelocity : point3
<MaxLiquidSolver>.colliderConversionOverrideAdditionalVelocityTab : point3 array

Sets the base velocity to add in world coordinates.

<MaxLiquidSolver>.globalColliderArrowNode : node
<MaxLiquidSolver>.colliderConversionArrowNodeTab : node array

Holds a reference to a helper object that determines the direction of additional velocity.

<MaxLiquidSolver>.globalColliderRefineNearbyFluids : boolean
<MaxLiquidSolver>.colliderConversionOverrideRefineNearbyTab : boolean array

Prevents the fluid resolution from being coarsened in regions that are close to the collider when spatial adaptivity is enabled on the liquid.

Kill Plane Objects

There are no additional parameters for kill plane objects. This part of the UI is reserved for future use.

Guide System

<MaxLiquidSolver>.enableGuiding : boolean
<MaxLiquidSolver>.guideEnableTab : boolean array

When true, self-collision and volume preservation calculations use foam particles in neighboring tiles. This increases simulation accuracy and eliminates visible boundary artifacts between tiles, especially in thick, static foam.

<MaxLiquidSolver>.computeGuideFromHighResLiquid: boolean

Computes a final guiding shape that takes the high-resolution liquid into account.

<MaxLiquidSolver>.guideVoxelScale : float
<MaxLiquidSolver>.guideMeshVoxelScaleTab : float array

A scaling factor for the Base Voxel Size that is used to voxelize the guide shapes.

<MaxLiquidSolver>.minSimulationDepth : float

Sets the depth to simulate below the top liquid surface in scene units. You may need to change this depending on the scale of the modelled scene.

<MaxLiquidSolver>.surfaceLayer : float

Sets the height of the simulated layer on top of the guide surface, in scene units. This can be useful for surface splashes.

<MaxLiquidSolver>.reseedParticleDensity : float

Controls the number of particles to add per voxel in air pockets.

<MaxLiquidSolver>.reseedGuideOverlap : float

Multiplies the Base Voxel Size to determine how deeply into the guiding shape and liquid shape to reseed.

<MaxLiquidSolver>.reseedLiquidOverlap : float

Multiplies the Base Voxel Size to determine how deeply into the guiding shape and liquid shape to reseed.

<MaxLiquidSolver>.minReseedAirDistance : float

Sets the minimum distance in scene units from the air-liquid boundary, below which particles are not reseeded. This prevents noise at the surface.

Foam Parameters

Foam Properties Rollup

<MaxLiquidSolver>.emissionRate : float

Sets the number of emission points generated per voxel per second. Increasing this value generates more foam particles.

<MaxLiquidSolver>.minLiquidSpeed : float

Sets the threshold to trigger foam emission, in meters per second, based on the velocity vectors of the liquid. Lower values generate more foam particles, while faster moving areas of the liquid emit more particles.

<MaxLiquidSolver>.minLiquidChurn : float

Sets the threshold to trigger foam emission, in meters per second, based on the rotational and angular momentum in the liquid. Set Min Liquid Churn between 0 and 2, with lower values emitting more foam.

<MaxLiquidSolver>.minLiquidCurvature : float

Sets the threshold to trigger foam emission based on curvature forming on the surface of the liquid. Lower values generate more foam particles. Liquid curvature refers to shapes on the liquid surface, such as those generated by rolling and cresting waves. Areas of the liquid with the steepest curves emit the largest number of particles. Liquid curvature refers to shapes on the liquid surface, such as those generated by rolling and cresting waves. Areas of the liquid with the steepest curves emit the largest number of particles.

Advanced:

<MaxLiquidSolver>.minLiquidDepth : float

Sets the top of the voxel region in the liquid, in voxels, that emits foam particles. A value of 0 sets the liquid surface as the top of the emission region.

<MaxLiquidSolver>.maxLiquidDepth : float

Sets the bottom of the voxel region in the liquid, in voxels, that emits foam particles. Positive non-zeros values set the bottom of the emission region below the surface of the liquid. Use a value of 3 for typical foam effects.

<MaxLiquidSolver>.maxSolidDepth : float

Sets the distance, in voxels, between foam emission points and closed boundaries such as collision objects. Use values between 0 and 1 to maintain a boundary between voxel emission points and collision objects. To emit foam under the liquid surface (bubbles), set Max Solid Depth to a negative value and Max Liquid Depth to a high value such as 10 or greater.

<MaxLiquidSolver>.emitFlatnessToSurface : float

Snaps particles to the surface of the liquid at the time of emission. This prevents particles from being emitted under the surface of the liquid.

When set to 1.0, particles snap to the liquid surface. When set to 0 the particles are not affected, which allows buoyancy to direct the particles' upward motion.

<MaxLiquidSolver>.microVortices : float

Creates fine structure in the foam when it is emitted by pushing the particles using vortices that are a few voxels in size.

<MaxLiquidSolver>.emitMotionStreak : float

Randomizes the particle positions along the velocity vector when they are emitted. Higher values may help to reduce banding but also may result in a noisier appearance.

Behavior Parameters Rollout

<MaxLiquidSolver>.evaluateNeighborTile : boolean

When enabled, self-collision and volume preservation calculations use foam particles in neighboring tiles. This increases simulation accuracy and eliminates visible boundary artifacts between tiles, especially with thick, static foam. You must set Preserve Volume to a non-zero value to compute this option. Enabling Evaluate Neighbor Tile increases simulation time.

<MaxLiquidSolver>.compressionModel : boolean

Enables the Compression Model solver method. Similar to smoothed-particle hydrodynamics (SPH), Compression Model uses incompressibility calculations to resolve overlapping foam particles. This method increases accuracy and realism of foam simulations in small-scale liquids. When the combined particle overlap density is less than the set Target Density value, particles attract each other. When the particle overlap density is greater than the set Target Density however, foam particles repel each other.

<MaxLiquidSolver>.targetDensity : float

Controls how the computations of the Compression Model method are applied to the foam simulation. Increasing this value allows more particles to overlap before they repel each other. For typical foam simulations, use values between 0 and 2. Values such as 10 can provide smoother distribution of particles. When using higher values, the Point Radius needs to be increased to compensate for the higher particle overlap density. This results in greater accuracy at the cost of longer computation.

<MaxLiquidSolver>.inheritLiquidVelocity : float

Applies acceleration to the emitted foam particles based on the liquid velocity. When set to 1, foam particles emit with a velocity equal to the liquid velocity vector. At values greater than 1, foam can shoot off the surface as spray; values of less than 1 will dampen the particle velocity.

<MaxLiquidSolver>.gravityMult : float

Sets a value that scales the liquid container's Gravity Magnitude and applies it to the foam particles.

<MaxLiquidSolver>.maskFalloffDistance : float

Sets a falloff region, in scene units, around the input mesh of a foam mask. Increase this value to soften the emission boundaries around mask.

<MaxLiquidSolver>.dissipationRate : float

Sets the rate per-second that foam particles lose density. Foam particles at and above the liquid surface will dissipate. Particles under the liquid surface do not dissipate.

<MaxLiquidSolver>.killDensityThreshold : float

Sets the Threshold Density value causing foam particles to be eliminated. Particles below the surface of the liquid have a density of 1 plus the Max Liquid Depth value. At the surface particles have a density of 1; above the surface they have a density of less than 1.

<MaxLiquidSolver>.buoyancy : float

Sets the upward acceleration of foam particles in m/s2. With turbulent, fast moving liquids, increase Buoyancy to force particles to the surface. This stops the particles from remaining under the surface as bubbles, which do not dissipate.

<MaxLiquidSolver>.collideKillDepth : float

Sets the distance from collision objects, in voxels, that triggers an additional dissipation effect on colliding particles. This is useful for eliminating particles that are trapped by collision objects and cannot rise to the liquid surface and dissipate. When set to 1, colliding particles dissipate at the set Dissipation Rate. When set to 0 or a negative value, particles dissipate at a rate greater than the Dissipation Rate. The relation between Collide Kill Depth and dissipation rate is non-linear. For example, when set to -0.5, dissipation increases by a factor of 10. Values greater than 1 do not noticeably affect dissipation as collisions stop particles from penetrating more that 1 voxel inside the collision object.

<MaxLiquidSolver>.foamSurfaceTension : float

Sets the amount of surface tension to apply to the foam particles. The attractive force pulling particles together works within the region set by Tension Radius. Use values between 0 and 0.1, and more typically in the 0.01 to 0.02 range. Values higher than 0.1 can cause foam particles to ball together. The effect is most noticeable in small-scale non-turbulent liquids. Foam Surface Tension works best with Compression Model and Evaluate Neighbor Tile turned on. You must set Preserve Volume to a non-zero value to compute this option.

<MaxLiquidSolver>.tensionRadius : float

Sets the active distance of Surface Tension in voxels. This distance is computed as a multiple of the Point Radius option, where a value of 2 corresponds to a distance that is two times the point radius.

Foam Volume Behavior Rollup

<MaxLiquidSolver>.snapToSurface : boolean

When enabled, causes particles to snap back to the surface each frame. Use this setting to keep foam on the surface of the liquid.

<MaxLiquidSolver>.surfaceOffset : float

Sets a distance, in voxels, between the liquid surface and the foam particles that are emitted at the liquid surface. When set to a non-zero value, the solver uses the Surface Offset option to determine whether foam particles are below or above the liquid surface.

<MaxLiquidSolver>.preserveVolume : float

Applies a repulsive force to particles when the distance between them is equal to the Point Radius option. Increase this value if you notice foam collapsing rather than dissipating as expected, or if particles are piling up and making the foam too thick.

<MaxLiquidSolver>.pointRadius : float

Sets the radius, in voxels, used by the repulsive force applied by the Preserve Volume option. Point Radius does not determine the size of simulated or rendered foam particles.

<MaxLiquidSolver>.overlapPruning : float

Deletes overlapping particles without affecting the overall density of the foam simulation. Use Overlap Pruning to reduce excessive foam particle counts in highly turbid liquids, such as at the bottom of a waterfall, where bursts of foam emission can occur. When set to 0, no particles are deleted. Values closer to 0 allow more particles to overlap before they are deleted. At a value of 1, one out of every two overlapping particles is deleted. The effect of Overlap Pruning intensifies with increasing Point Radius values. The density of the deleted particles is transferred to the remaining foam particles. This means that the foam object's emission and dissipation rates do need to change to maintain overall density of the simulation. Overlap Pruning does not apply when the Compression Model is on.

Foam Wind/Air Parameters Rollup

<MaxLiquidSolver>.airDrag : float

Applies a drag force to foam particles above the liquid surface, which slows down falling particles at a rate relative to their density. Lower density particles are most affected by drag, which causes them to hang in the air longer and behave like mist. Higher density particles are still affected by drag, but tend to be more affected by gravity and behave like spray.

<MaxLiquidSolver>.boundaryDrag : float

Applies a drag force that is strongest where foam particles are not colliding with each other and weakest where they are. This can help to break up clumps of foam above the liquid surface because particles on the outside of the clump experience more drag than particles on the inside. For this attribute to be effective, set Preserve Volume to a non-zero value and make sure Point Radius is large enough for particles to collide.

<MaxLiquidSolver>.foamWindMagnitude : float

Sets the amount of wind directed by the wind helper object.

<MaxLiquidSolver>.foamWindDirectionArrowNode : node

Holds a reference to an arrow helper object in the scene. The orientation of the arrow adjusts the direction of additional velocity.

<MaxLiquidSolver>.airTurbulence: float

Sets the magnitude of a turbulence field to be applied to the air velocity, affecting particles above the liquid surface. Note that this controls the speed of the air, while the Air Drag and Boundary Drag options control how strongly particles are affected by the air velocity based on their density.

<MaxLiquidSolver>.airTurbulenceFrequency: float

Sets the granularity of the turbulence. Higher values produce smaller, denser vortices.

<MaxLiquidSolver>.airTurbulenceSpeed: float

Sets the rate at which the turbulence pattern evolves over time.

Foam Mask Objects

<MaxLiquidSolver>.foamMaskConversionOverrideTab : boolean array

Indicates whether to override the global parameters for the corresponding emitter in the MaxLiquid.emitter_Meshes array.

<MaxLiquidSolver>.globalFoamMaskMode : integer
<MaxLiquidSolver>.foamMaskConversionOverrideModeTab : int array

Sets the foam mask mode, which determines how the foam mask is voxelized, where:

<MaxLiquidSolver>.globalFoamMaskEmitterCoarsenInterior : boolean
<MaxLiquidSolver>.foamMaskConversionOverrideCoarsenInteriorTab : boolean array             

Sets the distance in voxel widths used to close (dilate and then erode) the solid voxels when the conversion mode is Solid (Robust). The internal minimum is 1.0 so that only greater values have an effect. Note that high values can create artifacts.

<MaxLiquidSolver>.globalFoamMaskOffsetSurfaceDistance : float
<MaxLiquidSolver>.foamMaskConversionOverrideOffsetDistanceTab (OverrideOffsetSurfaceDistance) : float array

The distance in voxel widths used to close (dilate and then erode) the solid voxels when Mode is Solid (Robust). The internal minimum is 1.0 so only values greater than that have an effect. High values can create artifacts.

<MaxLiquidSolver>.globalFoamMaskThicknessUnits : integer
<MaxLiquidSolver>.foamMaskConversionOverrideThicknessUnitsTab : int array

Sets whether thickness is in voxels or world-space units. When set to Voxels, the effective thickness depends on the Base Voxel Size of the simulation. Possible values are:

<MaxLiquidSolver>.globalFoamMaskThickness : float
<MaxLiquidSolver>.foamMaskConversionOverrideThicknessTab : float array

Sets the amount to thicken the mesh. For solid shapes that are already quite thick, you can use 0.0 for a precise boundary or even negative values to shrink along the surface normals. For thinner volumes and shells, you should use larger values to prevent holes.

<MaxLiquidSolver>.foammask_voxelScale : float
<MaxLiquidSolver>.foamMaskConversionOverrideVoxelScaleTab : float array

Sets a scaling factor for the Base Voxel Size used to initially voxelize meshes that share this property.

Motion Field Objects

Not implemented.

Caching Tab

See the cache options for the MaxLiquid object.

Display Settings Tab

Liquid Settings Rollup

<MaxLiquidSolver>.displayTypeMode

Sets the way the liquid mesh is displayed in the viewport, where:

Mesh Settings

<MaxLiquidSolver>.meshing_dropletRevealFactor : float
<MaxLiquidSolver>.meshingDropletRevealFactorTab : float array

Creates and preserves detail around splashes when generating and smoothing the mesh. Lower values result in smoother meshes, while higher values give more small, higher frequency detail. The slots in the meshingDropletRevealFactorTab correspond to the setting for the index of the matching display type.

<MaxLiquidSolver>.meshing_surfaceRadius : float
<MaxLiquidSolver>.meshingSurfaceRadiusTab : float array

The radius of each particle blob used to create the surface, in multiples of the Base Voxel size.

<MaxLiquidSolver>.meshing_dropletRadius : float
<MaxLiquidSolver>.meshingDropletRadiusTab : float array

The radius of each droplet, relative to the Base Voxel size.

<MaxLiquidSolver>.meshing_kernelFactor : float
<MaxLiquidSolver>.meshingKernelFactorTab : float array

Controls the width of the surface smoothing kernel. Smaller values give sharper features and higher curvature in the resulting mesh. Larger values result in smoother features.

<MaxLiquidSolver>.meshing_smoothing : integer
<MaxLiquidSolver>.meshingSmoothingTab : int array

The number of smoothing steps performed on a mesh.

<MaxLiquidSolver>.meshing_resolutionFactor : float
<MaxLiquidSolver>.meshingResolutionFactorTab : float array

A scaling factor for adjusting the particle resolution before the mesh is generated. Higher values create more high-frequency detail at a cost of longer calculation times.

<MaxLiquidSolver>.meshing_holeKillThreshold : float
<MaxLiquidSolver>.meshingHoleKillThresholdTab : float array

Increase this value to eliminate meshed holes in the interior of the fluid. Such holes can occur especially when using high Resolution Factor values with spacially adaptive simulations.

<MaxLiquidSolver>.meshing_flipFaceNormal : boolean
<MaxLiquidSolver>.meshingFlipFaceNormalTab : boolean array

When true, flips the face normals of the mesh.

Particle Settings

<MaxLiquidSolver>.customNode : node

Holds the geometry node used as a custom node when the display type is custom.

<MaxLiquidSolver>.colorChannelMode : integer

Displays the specified color channel as a color ramp. This can be useful for previewing or diagnosing your simulation. Possible values are:

<MaxLiquidSolver>.staticColor : RGB color

Sets the channel color when the colorChannelMode is static.

<MaxLiquidSolver>.colorChannelMin : RGB color
<MaxLiquidSolver>.colorChannelMax : RGB color

Set the minimum and maximum color values for the color ramp.

<MaxLiquidSolver>.opacityChannelMode : integer

Uses the selected channel to control the fluid opacity in the viewport. Possible values are:

<MaxLiquidSolver>.staticOpacity : float

Sets the channel color when the opacityChannelMode is static.

<MaxLiquidSolver>.opacityChannelMin : float
<MaxLiquidSolver>.opacityChannelMax : float

Sets the minimum and maximum opacity values for the opacity ramp.

<MaxLiquidSolver>.sizeChannelMode : float

Uses the specified channel to control the size of the particles in the viewport.

Possible values are:

<MaxLiquidSolver>.staticSize : float

Sets the particle size when the sizeChannelMode is static.

<MaxLiquidSolver>.sizeChannelMin : float
<MaxLiquidSolver>.sizeChannelMax : float

Sets the minimum and maximum size values for the particle size ramp.

Foam Settings

<MaxLiquidSolver>.foamDisplayTypeMode : integer

The foam display type. Possible values are:

<MaxLiquidSolver>.foamColorChannelMode : integer

Specifies the data channel to use as the foam color channel. Possible values are:

<MaxLiquidSolver>.foamStaticColor : RGB color

Specifies the foam color when the foamColorChannelMode is static.

<MaxLiquidSolver>.foamColorChannelMin : RGB color
<MaxLiquidSolver>.foamColorChannelMax : RGB color

Specifies the minimum and maximum colors to use for the foam color ramp.

<MaxLiquidSolver>.foamOpacityChannelMode : float

Uses the specified channel to control the foam opacity in the viewport.

<MaxLiquidSolver>.foamStaticOpacity : float

Specifies the foam opacity when the foamOpacityChannelMode is static.

<MaxLiquidSolver>.foamOpacityChannelMin : float
<MaxLiquidSolver>.foamOpacityChannelMax : float

Specifies the minimum and maximum opacity values for the opacity ramp.

<MaxLiquidSolver>.foamSizeChannelMode : float

Uses the specified channel to control the foam particle size in the viewport.

<MaxLiquidSolver>.foamStaticSize : float

Specifies the foam particle size when the foamSizeChannelMode is static.

<MaxLiquidSolver>.foamSizeChannelMin : float
<MaxLiquidSolver>.foamSizeChannelMax : float

Specifies the minimum and maximum foam particle sizes for the size ramp.

Display

<MaxLiquidSolver>.viewportPercentAccessor  : float
<MaxLiquidSolver>.foamViewportPercentAccessor : float

Gets or sets the percent of liquid and foam particles visible in the viewport.

Render Settings Tab

Channels Rollup

<MaxLiquidSolver>.renderChannelMapIndex : int array
<MaxLiquidSolver>.renderChannelMapName : string array

These arrays contain the channel names and corresponding map channels to be rendered.

Liquid Settings Rollup

<MaxLiquidSolver>.liquidRenderType : integer

The object type to render the liquid as. Possible values are:

<MaxLiquidSolver>.liquidRenderSizeChannel : string
<MaxLiquidSolver>.liquidSizeChannelType : integer

Specifies the name and type of the size channel for rendering.

<MaxLiquidSolver>.liquidRenderStaticSize : float

Specifies the liquid particle size when the liquidRenderSizeChannel is static.

<MaxLiquidSolver>.liquidRenderSizeMin : float
<MaxLiquidSolver>.liquidRenderSizeMax : float
<MaxLiquidSolver>.liquidRenderSizeMinDomain : float
<MaxLiquidSolver>.liquidRenderSizeMaxDomain : float

Specifies the minimum and maximum size and size domain for rendered liquid particles.

<MaxLiquidSolver>.liquidCustomRenderNode (LiquidRenderCustomNode) : node

Holds the scene node used for rendering liquid particles when the liquidRenderType is custom.

Foam Settings Rollup

<MaxLiquidSolver>.foamRenderType  : integer

The object type to render the foam as. Possible values are:

<MaxLiquidSolver>.foamRenderSizeChannel : string
<MaxLiquidSolver>.foamSizeChannelType : integer

The name and index of the channel used to determine foam particle size in the renderer.

<MaxLiquidSolver>.foamRenderStaticSize : float

The rendered foam particle size, when foamRenderSizeChannel is static.

<MaxLiquidSolver>.foamRenderSizeMin : float
<MaxLiquidSolver>.foamRenderSizeMax : float
<MaxLiquidSolver>.foamRenderSizeMinDomain : float
<MaxLiquidSolver>.foamRenderSizeMaxDomain : float

Sets the minimum and maximum size and size domain for rendered foam particles.

<MaxLiquidSolver>.foamCustomRenderNode (FoamRenderCustomNode) : node

Holds the custom scene node used as rendered foam particles when the foamRenderType is custom.

Arnold Surface Liquid Render Parameters

These parameters are available when the liquidRenderType is Arnold Surface:

<MaxLiquidSolver>.arnoldSurfaceType : integer
<MaxLiquidSolver>.arnoldRenderComponentType : integer
<MaxLiquidSolver>.arnoldDropletRevealFactor : float
<MaxLiquidSolver>.arnoldSurfaceRadius : float
<MaxLiquidSolver>.arnoldDropletRadius : float
<MaxLiquidSolver>.arnoldResolutionFactor : float
<MaxLiquidSolver>.arnoldHoleKillThreshold : float
<MaxLiquidSolver>.arnoldFilteringDilate : float
<MaxLiquidSolver>.arnoldFilteringSmooth : float
<MaxLiquidSolver>.arnoldFilteringSmoothMode : integer
<MaxLiquidSolver>.arnoldFilteringSmoothIterations : integer
<MaxLiquidSolver>.arnoldFilteringErode : float
<MaxLiquidSolver>.arnoldMeshSubdivisions : integer
<MaxLiquidSolver>.arnoldMeshSmoothing : boolean          
<MaxLiquidSolver>.arnoldImplicitStepSize : float
<MaxLiquidSolver>.arnoldImplicitSamples : integer 

Arnold Point Foam Settings

The following parameters are available when the foamRenderType is Arnold Point:

<MaxLiquidSolver>.arnoldPointRadiusChannel : integer
<MaxLiquidSolver>.arnoldPointRadius : float
<MaxLiquidSolver>.arnoldPointStepSize : float
<MaxLiquidSolver>.arnoldPointChunkSize : integer

Arnold Surface Foam Settings

The following parameters are available when the foamRenderType is Arnold Surface:

<MaxLiquidSolver>.arnoldFoamSurfaceType : integer
<MaxLiquidSolver>.arnoldFoamDropletRevealFactor : float
<MaxLiquidSolver>.arnoldFoamSurfaceRadius : float
<MaxLiquidSolver>.arnoldFoamDropletRadius : float
<MaxLiquidSolver>.arnoldFoamResolutionFactor : float
<MaxLiquidSolver>.arnoldFoamHoleKillThreshold : float
<MaxLiquidSolver>.arnoldFoamFilteringDilate : float
<MaxLiquidSolver>.arnoldFoamFilteringSmoothMode : integer
<MaxLiquidSolver>.arnoldFoamFilteringSmoothIterations : integer
<MaxLiquidSolver>.arnoldFoamFilteringErode : float
<MaxLiquidSolver>.arnoldFoamMeshSubdivisions : integer
<MaxLiquidSolver>.arnoldFoamMeshSmoothing : boolean
<MaxLiquidSolver>.arnoldFoamImplicitStepSize : float
<MaxLiquidSolver>.arnoldFoamImplicitSamples : integer          

MaxLiquidSolver interfaces

Interface: MaxFluidLiquidSolver

Properties:

Methods:

<boolean>RunSolve()

Runs the current solve.

<boolean>PauseSolve <boolean>wait

Pauses the current solve, if it is running. If wait is true, the call waits to return until the solver has actually paused. This parameter should always be true.

<boolean>StopSolve <boolean>wait

Stops the current solve, if it is running. If wait is true, the call waits to return until the solver has actually stopped. This parameter should always be true.

<boolean>IsSolveRunning()

Returns true if the solve is running.

<boolean>ExportSolve <integer>startFrame <integer>endFrame <string>filename

Exports the current solve settings and sets the start and end frames to the specified file. The file is saved to the current path if an absolute path is not specified.

<boolean>ImportAndRunSolve <string>filename

Imports and runs the solve settings from the specified file.

<boolean>RenameSolve <string>name

Renames the solve to the specified name.

<void>ClearCaches <boolean>liquid <boolean>foam <boolean>mesh

Clears the caches for those caches specified as true.

<void>ClearStaleCaches()

Clears any stale caches. Any cache with a timestamp older than the liquid cache is considered "stale", since all cache states depend on the liquid cache, and should be calculated after it has been created.

<boolean>GetCacheMesh <integer>frame <&mesh>meshOut
meshOut is In and Out parameter

Gets the cache mesh for the specified frame.

<boolean>GetDynamicMesh <integer>frame <enum>meshOrFoam <&mesh>meshOut
    meshOrFoam enums: {#liquid|#foam}
    meshOut is In and Out parameter

Gets the dynamic mesh for the specified frame for either liquid or foam, specified by the meshOrFoam parameter.

<boolean>ImportSolveTest <string>filename

Imports a test file and runs the solve. This is for internal use only.

<Interface>GetParticleCache <enum>type
    type enums: {#liquid|#foam}

Gets the particle cache for the specified type, liquid or foam. See ParticleCache for the properties and methods implemented by this interface.

<void>AddMeshChannel <string>name <integer>mapChannelIndex

Adds a channel to the simulation's render settings, using the given name and map index. Note: the name must match an existing channel type, which is one of:

<void>DeleteMeshChannel <string>name

Deletes the channel from the simulation's render settings with the matching name.

<boolean>FrameStatus <integer>frame

Returns true if there is simulation data for the specified frame.

Actions: