Steamed tapa


A while ago I worked in a nice project where the main effect was vapor steam flowing along streets in a city.
Back then I did some tests with Maya fluids and scarily enough they seem to work just fine...see the problem with Maya fluids is that it is an awesome tool made ahead of its time, when it came out there simply was not a powerful enough computer to make a good use of dynamically simulated 3D fluids,so it was conceived with mainly 2D simulations in mind. still it was awesome.

that was then, but this days things have changed a lot,the speed and amount of memory of computer has enormously increased so we gave Fluids the go and used them as main tool for the project. Now the job was a success , but the production itself was Hell,as a result i found myself looking for better options. and i think this has a lot to do with how fluids inside maya have evolved during this years.... or... barely evolved.... I wont convert this little tapa into a tantrum for all those lost late nights in front of computer (and booze) all I will say is there are some key areas that must improve with the new releases of Maya from my humble Spanish point of view...

My main critics in the process of simulate and render a very detailed 3D fluids are:

1- OpenGl display.... yes,it is true that if you use it properly, you may even have the final image for the rendered simulation, it can look THAT good, but has several problems,mainly the internal use of a light source and of course the SPEED.

2-simulation stage: be very careful if you decide to go for the high detail velocity solve option in a very detailed fluid and have some collisions with geometry at some point in the sim. It most probably become unstable if the speed of the fluid is high compared to the size of the voxels. You will end up in literally snow storm of grainy puffs. Autodesk apparently says its not a bug,but from my point of view it is, just for the fact that i have tested exactly the same simulation colliding with the fluid boundaries and also with geometry planes snapped in the same position as those boundaries and with the boundaries everything works fine.

here is a gif showing the problematic area, notice how the vectors grow and become unstable


and here is the quicktime result ,its christmas time! :

3- cache: OMG ,OMG OMG did I said OMG?no more comments,well yes ,just one, we used maya 2008 for the job.I REALLY hope that with N-cache things have improved by million times..

4- The workflow to get Hi res detailed sims out of mid-lo res tests.

5-Mentalray.: well "aparently"no complain can be complete without a comment about the integration of Mentalray in maya... PLEASE , i dont care if FG spits and hates fluids (actually ,it would be nice if it worked...)just give us Deep shadows (AKA Detail shadows) working with fluids.

Anyway, for the process of creating steam with fluids,I went with a very simple setup.Start with a very irregular and procedurally animated shape that emits huge amounts of density,then place a volume axes field animated erratically just behind the source and pushing it with a very strong amount of force,just trying to simulate a very high pressured steam gun.

Because of the nature of the simulation in maya,whenever you test something at a resolution, dont expect the same kind of global movement with just more detail once you crank up the number of voxels for final renders.A workaround I use: make a cross section of almost a 2D container placed at the middle of where the final container will be and look for a good resolution that gives enough interest and movement, then lock those values and get the third dimension value from the fact you will want fully square voxels (I prefer sticking to them)now once you have defined your final fluid size, the simulation will be really slow to simulate,edit the container size and make it much smaller focusing in the areas where the source is but always keeping the voxel size the same as the original final container size.Think of this as if you have a room in a space and its divided in a grid of cubes,next to one of the walls of the room there is the source of the steam, because the steam will take very long to run across the room, just get rid of all the cubes that are way too far and keep only the ones that wrap your source . this way you can simulate quickly at those voxels resolutions, and once you fill back the whole room with the cubes the simulation wont change from your tests, it will just continue further.

Start simulating and play mainly with the damp ,swirl,turbulence and buoyancy values till you get something you are happy with.Also try to simulate as if it was shoot with a high speed camera, speeding up is MUCH easier than slowing down a fluid simulation....its good habit in case the client wants everything a bit slower..

Here is a quicktime with the slowed down simulation:

Shading is not difficult, make a good opacity cutout so the fluid fluffs out a bit, then if you have enough detail voxels, you wont need more detail from the noise textures, but if this is not the case, you can add some , try to make it only carve the lower density of the steam , never overdo it or wont look good with the simulation. then play a bit with the self shadows opacity values,Steam scatters most in the direction of the light,you need to simulate this effect, and as far as i know there is still no scatter phase in Maya, so an array of point lights (with no shadows and with big decays) can do the trick...

Finally for rendering, bear in mind that mentalray is Ubber fast with negative antialias sampling and fluids wont look that bad,this is great for quick tests, also be careful to have segmented shadows selected and check the volume trace size compared to the size of your container.

Now as I wrote at the beginning I had a bad time with this project,and i believe fluids in maya need a new and solid production ready workout.

I did look around for better solutions,found Houdini, and its latest Pyro tools which I think are an awesome assets.

Features I like: Compressed caches, SDF ,Up-res Fluids from lo-res,deep shadows,uniform fluid scale value,great Fast and detailed opengl previews (with one light ;) ) great and customizable particle advection from cached(via vops) or non cached fluids ,open platform to add and tweak the fields you need, great and fun pyro shader, particle scattering,scatering phase...

here is a quicktime test done for fun,again at half speed:

my workflow: just same kind of emitter as in maya ( in houdini by default you get a noise breaking the sources density,so simple primitives could also do the trick), add the velocity in CHOPS with a noise function,make the desired container boundary sizes.There is no need to worry about voxel sizes,just aim for good detail , later we will up-res for extra detail conserving the main body of the fluid.Play with the fluid solver values (buoyancy,damp,...) once you are happy with the sim cache it then, go for the up res version tweaking a bit the turbulence values,this process is FAST compared to what in maya took to sim the same size container.

here is a quicktime showing both caches,Lo res on the left and Hi res on the right:

next is tweaking the pyro shader; play with density values and create several modifiers one for fluffiness and maybe one for edge noise, change the scatter phase to a positive value,light using old school 3 ambient+key+deep shadows, they work great with fluids and are fast!Finally you can render in separate colors ,make the key red for example and the ambient rig blue so you can tweak them separate in post.

The process of course is still complex, the difference is that it just works and was fun.

next i will test how it behaves with geometry collisions... finger crossed it wont be as bad as in Maya.

Also I want to play with the scatter attribute of the pyro shader, by shooting points from an hemisphere to the volume and loading this point cloud as a fire cloud in the scatter attribute i am thinking i could get a really detailed and realistic ambient light.

This is what i like about houdini, there is always space to improve as you work :)