Home Technical Talk

Flowmap Generator: Create flowmaps using a fluid simulation

polycounter lvl 11
Offline / Send Message
Synthesizer polycounter lvl 11
Flowmap Generator is a tool for creating flowmaps for use in shaders using a fluid simulation. Flowmaps can be difficult to create, especially on a large scale. Several tools exist for hand painting the velocity vectors, but this can be time consuming and if the geometry changes it is necessary to repaint the flowmap. Flowmap Generator lets you set up a simulation that can be easily edited and resimulated when needed.

Right now it exists as a plugin for Unity but I do have plans for making a stand alone version, which would also include all features that normally require Unity Pro.

[ame="http://www.youtube.com/watch?v=gEV7TxZQIsY"]Flowmap Generator Features - YouTube[/ame]

Features:
-Control the simulation using fields placed in your scene, such as directional, vortex, and calm.
-Calculate foam accumulation based on the velocity of the fluid in the simulation.
-Dynamically updating flowmaps let your flowmap react to changes in the scene. Add and remove fluid, change the scene geometry and move fields around.
-Render heightmaps from your scene so your geometry will be used in the fluid simulation (Unity Pro only).
-Import textures as heightmaps, including support for 16bit .raw textures.
-Support for simulation fluid flowing on surface, which can also be used for other types of flowing substances such as snow and sand.
-GPU accelerated (Unity Pro only) and multithreaded simulations.

Several example flowmap shaders are included and many more are available on the Asset Store. I've included a quickstart guide to get you up and running fast as well as a full reference describing all the parameters. Works with Unity 3.5.7 or higher and tested on Unity 4.


Web demo

Website

Documentation

Purchase on Asset Store

Thread on Unity's forums

Replies

  • Ace-Angel
    Offline / Send Message
    Ace-Angel polycounter lvl 12
    Nice! It would be indeed pretty awesome to have a standalone version.

    Any ideas if in that case, it would be GPU process or CPU? How will/would the performance fare for real time results of the map?
  • Synthesizer
    Offline / Send Message
    Synthesizer polycounter lvl 11
    The stand alone would use the GPU. The GPU acceleration isn't supported in Unity free as I'm using render textures which aren't supported there.

    For real time do you mean the dynamic updating? That will only be supported in the Unity plugin version, and really only works when GPU acceleration is enabled (ie. only with Unity Pro). It takes up about 1-2ms per frame on my computer.
    If you mean seeing the progress of baking the flowmap, the GPU simulation is much, much, faster than CPU. Simulating a 512x512 flowmap usually takes less than a minute on my computer, with an nvidia 580gtx.
  • Synthesizer
    Offline / Send Message
    Synthesizer polycounter lvl 11
    I've been working on a stand alone version of Flowmap Generator for people who don't use Unity. Most of the work has been making a scene editor to handle all the stuff that I relied on the Unity editor to handle, like moving objects, undoing, importing meshes, etc. All the features that normally require Unity Pro such as GPU acceleration and rendering heightmaps from the scene will work in this version. There are a few small fixes and then a UI pass that's left to do. Since I'm using Unity to build the stand alone application I've got builds working for Windows, OSX, and even a webplayer version (which might be useful for a demo). A Linux build might come later if I get around to installing that for testing.

    FlowGeneratorStandalone_01.jpg
  • Synthesizer
    Offline / Send Message
    Synthesizer polycounter lvl 11
    I've now released the first version of the standalone program. You can now create flowmaps for any game engine and use features that the Unity plugin version requires Unity Pro for, such as GPU acceleration and interacting with scene geometry. There's a 30 day trial, just download the program and you can start the trial. The output is limited to 256x256px, but all other features are enabled. Purchasing a license removes that limitation and gives you access to all future updates.

    I've mostly been testing the newer features on my Macbook, so let me know if anything looks odd in Windows.

    Download now

    Standalone_v1.jpg
  • Synthesizer
    Offline / Send Message
    Synthesizer polycounter lvl 11
    I've been working on some new features, focusing on fluids flowing on surfaces. Two of the features are residual fluid, which causes the fluid to be attracted to where there's been fluid previously and support for outputting a mask that records the normalized time a pixel first receives fluid. This can be used to animate the fluid's opacity.

    Here's a short video showing these features in action:
    [ame="http://www.youtube.com/watch?v=R8B1e8SqVd0"]Surface Flow Features - YouTube[/ame]

    The output that I use for the blood splatter looks like this:
    SurfaceFluidMasks_01.jpg

    All the animation is done in the shader. The flowing effect was created by adding a directional force field that covered the entire simulation area. The fluid was pushed in that direction, simulating gravity.

    Tiling across the simulation bounds is now supported. This can be used to create a generic tiling raindrop mask for example.

    Another upcoming feature will be presets, so you can save and share settings easily. I've also started work on improving the stand alone application, adding support for editing multiple objects at once using the inspector.
  • tharle
    Offline / Send Message
    tharle polycounter lvl 9
    looks really awesome! now if only i was working on a game that supported flowmaps...
Sign In or Register to comment.