RSS< Twitter< etc

Stoke MX Mesh To Field Modifier

Available in Stoke MX 2.0 and higher. Last Edited on May 1, 2014.


The Stoke Mesh To Field Modifier employs the OpenVDB libraries to convert 3ds Max geometry to field data on the Modifier Stack. It is implemented to support the asynchronous approach typical for other Stoke components, allowing the user to continue interacting with 3ds Max while the mesh to field conversion is running in a background thread.

The modifier supports all 3ds Max geometry types including EditableMesh (a.k.a. TriMesh), EditablePoly, gPoly, EditablePatch and NURBS.

The resulting field(s) will be passed up the modifier stack and can be modified by other Stoke Field modifiers like Stoke SimpleFluid and Stoke Field Display, and used as Field source anywhere a Stoke Field is supported, including Field Magma, Field Simulator, Field Texmap and so on.

User Interface

Stoke Mesh To Field Rollout

Output Type drop-down list

  • This drop-down list controls the type of the field to be created.
    • Level Set (default) - creates a narrow-band level set field.
    • Density Field - creates a scalar density field.

Include CPT Field checkbox

  • When checked, the modifier will generate an additional Closest-Point-Transform vector field which describes the position of the closest point on the mesh surface relative to the sample point.

Grid Spacing > Grid Spacing value spinner and presets button

  • This value defines the voxel size to use during the conversion from mesh to field.

Grid Spacing > Bandwidth value spinner and presets button

  • This value defines the "thickness" of the field around the mesh. 
  • The narrow-band level set only includes voxels that are close to the surface and skips areas that are far away from it (deep inside or far outside the mesh volume). This value controls the bandwidth of the narrow band.

Viewport Display > Reduce value spinner and presets button

  • This value controls the manual viewport display reduction level.
  • When set to 0, the viewport will either display all samples as large dots, or it will use the auto-reduction level if the samples are too many and would affect performance.
  • When set to a higher value (up to 999), a reduction limit will be set and if the auto-reduction has not kicked in yet, only every Nth sample will be drawn. 
  • If the auto-reduction value is determined to be higher than the requested manual reduction, the automatic value will be used instead.
  • For example, if the auto-reduction determined that a level of 5 is needed, but a value of 3 was specified in the UI, the higher value of 5 will be used. In the same case, setting the UI to 7 will enforce the hgiher value of 7 over 5.


Modifier Creation Workflow

The Stoke Mesh To Field modifier can be applied to scene objects using several workflows:

Using the Stoke Menu

  • The Stoke menu is installed automatically with the product and provides shortcuts to all major components.
  • Select one or more geometry objects in the scene.
  • Click the Stoke menu in the 3ds Max Main Menu bar.
  • Select the "Add a MESH TO FIELD Modifier to selected object(s)" entry.
  • An individual modifier will be added to each selected valid geometry object.
  • Invalid objects will be filtered out automatically.
  • If a single object is selected and the 3ds Max command planel is active and the modifier stack selection is not the top modifier, the new Mesh To Field modifier will be inserted above the current selection.
  • If multiple objects are selected, the new Mesh To Field modifiers will be added to the top of the respective modifier stacks.

Using the 3ds Max Modify Tab in the Command Panel

  • You can also use the regular 3ds Max workflow for modifier creation.
    • Activate the Modify tab of the 3ds Max Command Panel
    • Select the object you want to convert to a field.
    • Select the modifier stack level you want to add the modifier to (default is top of the stack).
    • Select "Stoke Mesh To Field" from the Modifiers list.

Using MAXScript

  • You can create a Stoke Mesh To Field modifier and add it to the first object of the current selection by executing the following code:
theMod = Stoke_Field_From_Mesh_Converter()
addModifier selection[1] theMod 
  • To insert the modifier into the existing modifier stack selection (assuming the Modify panel is active), you can use 
modPanel.addModToSelection theMod
  • To check whether the first selected object is a valid target for the new modifier, you can call
ValidModifier selection[1] Stoke_Field_From_Mesh_Converter