Sometimes, there are scenes that require you to have a burning, moving object. Having so usually means you need to setup a very large grid – which then leads to very slow, memory heavy simulations.
Here are a few ways to tackle this…
(Updated: March 06, 2011 – Added methods 5 & 6)
*** Created/Tested on FumeFX 1.x ***
1. Large Static Grid
One way to simulate the fire is to create a very large grid which would encompass the boundaries of it’s movement.
You could download a free script by Allan Mckay at ScriptSpot called Create Animation Bounding Box.
Here’s a short description from the site:
The idea is that I wanted to roughly work out the entire dimensions of a characters animation, so a bounding box – of the entire animation.
Also note the reply by Anubis for his version, which seems be much simpler and faster.
2. Isolate Bounding Box Script
This next one also uses a very large grid, but it will need to use a script inside FumeFX to isolate only the voxels inside a bounding box object.
Here are some requirements:
- An object (Preferably a Box) to be used as the bounding volume.
- The box can be linked/animated to follow the object you want to burn.
- The box shouldn’t have any rotations whatsoever.
Download the script FumeFX – Object Bounding Box Script, and assign it to FumeFX.
Press Edit and replace the contents of the original script with the script provided above. You will then need to edit the encircled parts of the script:
$'BBox' (in red) to the name of your bounding box object.
Lastly, set the
$'FumeFX01' to the name of your FumeFX object.
note: You could skip setting the name for the FumeFX object, just comment out line 26 of the script, and uncomment line 25. I did that because I had some problems with the script where the built-in ffx variable didn’t return the proper FumeFX object, so a direct assignment of the node by name was the safer approach.
Here’s a preview of the resulting simulation.
You can take a look at the Log window being generated by fume as it simulates, look for the ones with “–>”. These are infos generated by the script.
If you then try to not use the script and simulate the scene in a 32bit Windows environment, you will likely get a crash as I did.
Essentially, whenever doing simulations, it is largely recommended to do it on a 64bit environment, as you’ll be able to better maximize your memory usage.
Some pros with this method aside from being able to simulate with very large grids is that you will most likely always get a constant simulation speed per frame. Looking at the FumeFx Log image above shows that the isolation time is a constant 7.0 per second.
The drawback is that the voxels outside the Box volume will definitely get deleted. So this method is obviously not suitable for large pluming smoke sims.
max 2009: fume-bbox.zip
3. Grid Lock
This method also makes use of a script, and in way, is similar to method #2 above.
The Idea was to be able to directly animate the FumeFX grid object itself.
You start off by animating or linking the FumeFX grid object to an animated object.. as with the Bounding Box method, you’re not allowed to have any rotations for the animation.
As an example, I linked the FumeFX grid to a Point Helper that is linked to the animated object. I used a Point Helper to help center the pivot of the FumeFX grid, since the grid always has it’s pivot at the base.
I then used this Baking Script called Tera Bake Transforms which has an option to retain a constant grid alignment even if it’s moving around the 3d space.
This script simply bakes any object animation into keyframes.
A special option that it does is called the Snap Positions. Using this option when baking, you can snap the animation positions to values that are divisible by the specified amount.
(The resulting comparison image below might better explain what this option does.)
The Get button is a special button to quickly get the Spacing value of the selected FumeFX Grid.
Here’s the result after baking using this script, with and without the Snap Positions checked:
Notice the seemingly non-moving grid with the Snaps ON.
With the positions snapped to the spacing value, we could then proceed to assigning a script to offset the voxel data based on the grid emitter movement.
Download the script FumeFX – Grid Lock and place it to your FumeFX maxscript section.
Now we can proceed with the simulation…
Here’s the result using the same scene from the method #2 above:
This method took a bit longer to simulate compared to method #2 for this scene.
Including doing other tasks while simulating in the background (300 frames):
- method #2 – 37 mins
- method #3 – 47 mins
max 2009: fume-grid_lock.zip
This method can be found in the Afterworks forums. It also uses a script to delete voxel data that falls below a specified user threshold. I think it is also available in the CGFluids website.
5. Void Src
If you have FumeFX 2.x, you can make use of a new FumeFx Helper called the Void Source. It essentially works like methods #2 & #3 above. But with the convenience of it being a non-scripted approach, plus you’re allowed rotations.
6. Script by lutteral @ CGTalk
Also worth noting is a script done by lutteral which was based on the Isolate Bounding Box Method above (#2).
Click here for the link to the Thread.
The script can be found on the 3rd post.