Flow map painting script/plugin for 3D Studio Max 2012 x64 and up - download
This hybrid of maxscript and plugin for 3D Studio Max 64 bit and up, is a project that I have been working on for a while. As of yet, it is still unfinished, but a great deal of the essential functionality has already been created, most importantly the actual painting part, and the code behind it.
Below is a video of the script in action, and footage captured inside UDK of the flow map being used to simulate lava flow. Of course, flow maps can be used for various other things, such as the distortion of maps to simulate effects like wind and hair.
Flow maps are a fairly new technology, having only been applied in a handful of games. A good example is left 4 dead 2, where Valve used flow maps to simulate the flow of water in a level-wide river, guiding the player around the generally confusing level. To create their flow maps, they created a custom plugin for Houdini, allowing them to literally "sculpt" their flow maps using fields of vectors, and then baking them out. However, this method requires not only the plugin for Houdini, but also a highly tesselated mesh.
I saw their tech demo on this and wanted to try out flow maps myself. However, since I did not have access to the Houdini plugin Valve created, I was faced with the problem of creating the flow maps; without a sort of technology like Valve's plugin, creating them is next to impossible, since painting software does not allow for painting with vectors. So, I decided I wanted to create my own version of Valve's technology. I was quickly faced with the problem of performance, though: requiring a highly tesselated mesh, the normal sculpting method severely limited the amount of detail the flow maps could contain. Since I wanted to push flow map creation to the next level, I opted for pixel painting instead. So, I started working on a hybrid script that used plugin code to calculate and apply the calculated vectors in real-time, allowing the user to paint in the viewport, on their low poly mesh. The biggest advantage to this is that a highly tesselated mesh is not necessary, and pixel painting is highly performant, even though 3D Studio Max isn't exactly built for it.