> ## Documentation Index
> Fetch the complete documentation index at: https://www.renderjuice.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Using Fluid Simulations with Render Farms

> Fluid simulations with Mantaflow are fully supported. Learn how to bake caches, set relative paths, and upload correctly.

## Status: ✅ Fully Supported

Fluid simulations, including those created with Mantaflow, are fully supported on Renderjuice and should work as expected out of the box 🎉 without much hassle.

**Key Requirements:** The key requirement is that you bake your fluid simulations and include the cache files when uploading your scene. Since fluid simulations rely on cache data that isn't automatically embedded in the `.blend` file, you must zip your fluid caches along with your scene before uploading.
If you're seeing `E:/` or similar in your cache path, you've not set the path correctly and it is still absolutely linked.

Here's an incorrect and absolutely linked example:

<Frame caption="Incorrect and absolutely linked cache path">
  <img src="https://mintcdn.com/renderjuice/LAVdNoNpZYyOHLg8/images/examples/fluid-simulations/incorrect-pathing.png?fit=max&auto=format&n=LAVdNoNpZYyOHLg8&q=85&s=3fafab8ee8877b94963b79b4219b2e0c" width="633" height="201" data-path="images/examples/fluid-simulations/incorrect-pathing.png" />
</Frame>

## Example Files

Below are example `.blend` files demonstrating the correct and incorrect setups for fluid simulations.

<CardGroup cols={2}>
  <Card title="Unbaked Example Incorrect ❌" icon="download" href="https://public.storage.renderjuice.com/docs-example-files/fluid-sim-incorrect.zip">
    Unbaked `.blend` file with fluid simulation
  </Card>

  <Card title="Baked Example Correct ✅" icon="download" href="https://public.storage.renderjuice.com/docs-example-files/blender-fluid-sim-correct.zip">
    Zipped `.blend` file with baked fluid simulation cache
  </Card>
</CardGroup>

The examples feature a simple fluid simulation setup, showcasing how baking affects the simulation during rendering.

## Instructions

To use fluid simulations with Renderjuice (and likely other render farms), you need to bake the simulation and include the cache files when uploading. The most common mistakes here
are forgetting to `Save` after hitting `Free All` and `Bake All` or forgetting to make sure the cache paths are relative. In the case that your paths are incorrect,
we may either try to automatically fix them or your render might just miss the fluid simulation so be careful!

<Steps>
  <Step title="Set Up Your Fluid Simulation">
    Create your scene with the fluid simulation. This might involve setting up a domain, inflow objects, and configuring the simulation settings as desired.
  </Step>

  <Step title="Bake the Fluid Simulation">
    After setting up your simulation, you need to bake it.

    To bake the fluid simulation:

    1. Select the domain object.
    2. Go to the **Physics Properties** panel.
    3. Under **Fluid** settings, navigate to the **Settings** section.
    4. Click on **Bake All** or **Bake Data** (depending on your Blender version). Or **Free All** in the case that you've already baked.

    <Frame caption="Physics Tab (1) Cache Path - note the `//` in the path. (2) Free All and Bake All Button (3) Bake Path Folder Icon">
      <img src="https://mintcdn.com/renderjuice/LAVdNoNpZYyOHLg8/images/examples/fluid-simulations/physics-tab-diagram.png?fit=max&auto=format&n=LAVdNoNpZYyOHLg8&q=85&s=987aa143924f1d7dea7f230276c33d3c" width="2507" height="2425" data-path="images/examples/fluid-simulations/physics-tab-diagram.png" />
    </Frame>

    In this diagram we point out the following:

    1. the `//` is Blender's way of saying "relative to the current file", you may either type in your path here using `//my-cache-folder-name` or use the folder icon to navigate to the cache location. If you have a drive like `C:\` or `D:\` here you've not set the path correctly and it is still absolutely linked.
    2. Click on **Free All** and **Bake All** to bake the simulation.
    3. You can use the folder icon to navigate to the cache location (which we elaborate on below).
  </Step>

  <Step title="Choose Cache Storage Location">
    <Warning>
      By default, Blender will pick a random temporary directory for you if you haven't saved your `.blend` file yet which we don't want!
    </Warning>

    * **Verify the Cache Directory:** In the **Fluid** settings under **Cache**, verify the **Cache Directory** path. It should be set to a folder that you can include when uploading.
    * **Ensure Cache Pathing is Correct:** You should Free and Bake as needed so that the cache files are generated. Then **make sure to save** your `.blend` file. The last save ensures the pathing is persisted into the `.blend` and the bake step writes the cache out to the disk.

    You can do this by either:

    * Typing in the path using `//my-cache-folder-name`
    * Using the GUI folder picker by pressing the folder icon (3 in the diagram above) to navigate to the cache location.

    <Info>
      The name you set here does not matter, we only care that the path is relative.
    </Info>

    When using the folder icon (via GUI), you should see something like this, note that you have to click on the Cog Icon to display the option to make the pathing relative.

    <Frame caption="When using the folder picker GUI, you *must* click on the Cog Icon to show the option for 'Relative Path'">
      <img src="https://mintcdn.com/renderjuice/LAVdNoNpZYyOHLg8/images/examples/fluid-simulations/cog.png?fit=max&auto=format&n=LAVdNoNpZYyOHLg8&q=85&s=c799ff08c828e3a481440c6489300764" width="1684" height="196" data-path="images/examples/fluid-simulations/cog.png" />
    </Frame>
  </Step>

  <Step title="Save Your Scene">
    After baking, make sure to save your `.blend` file. The baked simulation references are now part of your scene.
  </Step>

  <Step title="Zip Your Scene and Cache">
    Zip your `.blend` file along with the cache folder.

    * **Ensure the Cache Folder is Included:** The cache folder typically has a name like `cache` `blob` or similar and contains the baked simulation data.

    If you prefer not to assemble the archive by hand, [Blend Project Packer](https://www.renderjuice.com/blender/renderjuice-extensions/blend-project-packer) can help collect detected project dependencies and baked cache folders into a portable project zip.

    Your zip file should have a structure similar to this, where your file is included in the `zip` with your selected cache folder. Note that these extensions may vary from case to case.

    ```markdown theme={null}
    your_project.zip
    |-- your_scene.blend
    |-- cache/
        |-- fluid/
            |-- [simulation cache files].vdb
        |-- config/
            |-- [cache config files].uni
        |--mesh/
            |-- [simulation cache files].bobj.gz
    ```
  </Step>

  <Step title="Upload and Render">
    Upload your zipped file to Renderjuice and start your render.
  </Step>
</Steps>

## Checklist

* [x] Did you bake your fluid simulation?
* [x] Did you save your `.blend` file after baking?
* [x] Did you include the cache folder when zipping your project?
* [x] Is the cache directory path in Blender set correctly?
* [x] Are all necessary objects included in the bake?

## FAQ

<Accordion title="Why do I need to bake fluid simulations?">
  Fluid simulations in Blender are not automatically included when rendering on a render farm. The simulation data is stored externally in cache files. Baking the simulation ensures that the fluid behavior is calculated and saved, and including the cache files ensures that the render farm can access this data to render your scene correctly.
</Accordion>

<Accordion title="Can I pack the fluid cache into the `.blend` file?">
  No, Blender does not support packing fluid simulation caches into the `.blend` file. You must include the cache files separately by zipping them along with your `.blend` file.
</Accordion>

<Accordion title="How do I make sure the cache path is correct?">
  In the **Fluid** settings under **Cache**, ensure the **Cache Directory** is set to a relative path. Ideally, it should be a folder next to your `.blend` file. This way, when you zip the `.blend` file and cache folder together, the simulation can find the cache files.
</Accordion>

<Accordion title="I'm seeing my simulation, but it's the old version!">
  If you're seeing your simulation, but it's the old version, you've likely not saved your `.blend` file after baking. Make sure to save your `.blend` file after baking. As a reminder, baking writes the cache out to the disk, saving ensures your pathing is updated inside your `.blend` file to point to the baked information you just made.
</Accordion>

<Accordion title="Do I need to bake other types of simulations?">
  Yes, other simulations like smoke, fire, and particle systems also require baking and including their cache files when rendering on a render farm, but it's usually the same process! We are looking into ways to make this a little easier in the future.
</Accordion>

<Accordion title="Can I use the 'Replay' cache type for fluid simulations?">
  Sometimes, but it's not recommended. Instead use the **Modular** or **Final** cache type rather than **Replay**. The **Replay** cache is intended for interactive playback in the viewport and more for iterating on the simulation in the viewport and not necessarily for final renders. The Replay option basically bakes for you *as* you work on your scene, but if you make changes and Blender hasn't baked, then your changes won't be persisted.

  <Frame caption="The Replay Cache Type">
    <img src="https://mintcdn.com/renderjuice/LAVdNoNpZYyOHLg8/images/examples/fluid-simulations/cache-type.png?fit=max&auto=format&n=LAVdNoNpZYyOHLg8&q=85&s=89bf1e6e16fd0ccc3512b427b32e4a58" width="1014" height="308" data-path="images/examples/fluid-simulations/cache-type.png" />
  </Frame>
</Accordion>

<Tip>
  Having trouble or something doesn't seem right? Just chat with us—we're happy to help and respond quickly!
</Tip>


## Related topics

- [Why It Works Locally But Not On Renderjuice](/docs/renderjuice-101/works-locally-not-on-renderjuice.md)
- [Learn by Example: Demo Files and Render Setups](/docs/rendering-with-blender/learn-by-example.md)
- [Using Rigid Body Simulations with Render Farms](/docs/rendering-with-blender/rigid-body-simulations.md)
- [Using Simulation Nodes with Render Farms](/docs/rendering-with-blender/simulation-nodes.md)
- [Using Composite Node File Outputs with Render Farms](/docs/rendering-with-blender/composite-nodes.md)
