Save the current state of a fluid

You can save the grid property values for a fluid at any frame in a simulation and then add the saved state to another fluid container.

To save the current state of a fluid

  1. Add the property values to the fluid container. See Add properties to fluid containers.
  2. Play and stop the simulation at the frame with the fluid property values you want to save, if necessary.
  3. Select the fluid container.
  4. Select Fluids > Fields/Solvers > Initial State > Save State As Example.

    The Save window opens to:

    (Windows)

    drive:\Program Files\Autodesk\Maya Creative<version>\presets\fluids\initialStates

    (Mac OS X)

    /Applications/Autodesk/Maya Creative<version>/Maya/Contents/presets/ fluids/initialStates

    (Linux)

    /usr/autodesk/Maya Creative<version>/presets/fluids/initialStates

  5. Expand the folder where you want to save the fluid state in Visor and then select a subfolder:
    • If the fluid is a 2D fluid, select the 2D folder.
    • If the fluid is a 3D fluid, select the 3D folder.
      Note:

      You can save to any directory with write permissions accessible in Visor.

  6. Type the name of the current state file in the File name box and click Save.

    Maya Creative does the following:

    • Creates a cache file (.mfci extension) in the following location:

    (Windows)

    <drive>:\Program Files\Autodesk\Maya Creative<version>\presets\fluids\.mayaData

    (Mac OS X)

    /Applications/Autodesk/Maya Creative<version>/Maya Creative/Contents/presets/ fluids/.mayaData

    (Linux)

    /usr/autodesk/Maya Creative<version>/presets/fluids/.mayaData

    (If, in step 5, you browsed to a location not under the Maya Creative installation directory, Maya Creative creates a .mayaData directory in that location and creates the cache there.)

    • Creates a MEL file in the Visor location you selected. The MEL file simply packages the current state cache file so you can access it from Visor.
    • Assigns the default Maya logo swatch to the current state icon in the Fluid Initial States tab in Visor.

    You can now add this current state to any fluid container that has the same dimension (2D or 3D) as the container the current state was created from. For details, see Add predefined initial states to fluid containers.

    Note:

    The default tabs in Visor are saved in your preferences. The Visor tabs point to directory structures in the Maya installed location but if you run Maya from two different install locations, the preferences from the first run dictate the locations for the Visor tabs displayed in the second run. Visor suggests a location in the running cut's install location, so it's possible you could think you're saving it in the right place, only to have Visor completely ignore the just-saved preset. Selecting Tabs > Revert to Default Tabs in Visor will fix this.

To create a custom swatch in Visor for a saved current state

  1. Render the example in Render View.
  2. In Render View, select View > Grab Swatch to Hypershade/Visor.
  3. Drag a square to select the part of the image you want as your swatch.
  4. Open Visor and on the Fluid Initial States tab, open the folder where you saved the current state.
  5. With the middle mouse button, drag the selection onto the current state swatch. The swatch is saved in the .mayaSwatches subfolder of the folder where you saved the state. For example:

    (Windows)

    <drive>:\Program Files\Autodesk\Maya Creative<version>\presets\fluids\initialStates\Miscellaneous\2D\mayaSwatches

    (Mac OS X)

    /Applications/Autodesk/Maya Creative<version>/Maya.app/Contents/presets/ fluids/initialStates/Miscellaneous/2D/.mayaSwatches

    (Linux)

    /usr/autodesk/Maya Creative<version>/presets/fluids/initialStates/ Miscellaneous/2D/.mayaSwatches