Mantaflow - Making a small flame and make it survive fast movements

Hi !
I’m making a little animation exercise, directly inspired from this video:

Reference video

And here’s my current state:

Current Result

As you can see, I tried to get the fire in shape, and this is where I manage to get so far. I was limited by a deadline so I couldn’t make this better, but now I need some help solving the following issues I tried to solve in this project:

The fire size

It seems quite obvious to me that in the reference, they used a sprite of a quite big fire, then scaled it down and tracked it onto the actor’s thumb in video editing.
What I want to do is basically a fire simulation but in a scale that’s more in the line with my character’s scale. I try to aim for something a little midway between the flame of a cigarette-lighter and a small wooden-stick-torch (but the size of a thumb, huh).
Right now, I have a fire that’s smaller than the default quick smoke result, but it’s not small enough, doesn’t have the kind of fire I want, and look more like a blurry mess than a fire or even a flame.

Making tests with too little resolution for the domain seemed to make the simulation unstable, the fire would “jump” from one cell to another like a small object rendered on too few pixels. So I tried with higher resolutions, as much as my deadline allowed. But still not enough IMHO.
To manage the scale of the flame, I tried to play with the domain’s Reaction Speed (panel settings > fire) and the emitter’s surface emission (panel settings > flow source). But it wasn’t enough, and making it smaller with these accentuated the resolution issue, as well as the following big issue I have.

Fast movements

My animation have some fast movements. Nothing fancy, yet enough for the fire to extinguish for some frames.
Playing with the resolution, reaction speed and surface emission would completely change how many frames wouldn’t be lit, but anyway I never achieved to find the right settings in order to have a small but detailed fire and that remains lit up all the time.

Fire shape & quality

I guess this is mostly solvable by more divisions in the domain settings & noise, but if there’s more to it or if you have some tips to share, I’d like to know.

I’m working on Blender 2.82 stable, using the new mantaflow system.
And here’s a lightweight version of my scene for you to play with:

So I solved the fast movements issues:
Apparently I’m doing things right, but there’s currently a bug (T61432) with substeps not working. It has been partially fixed for 2.83, now substeps work except with objects moved via relations of any kind (parents, armature deforms, constraints, …). It seems that for now, Mantaflow can’t access the position of the emitter between frames if the object itself isn’t transformed in worldspace, like there’s no interpolation possible.

So, as a way around, I need to turn the armature-deform-based animation (which is a modifier-based relationship that moves vertices inside an object) into an object-based keyframe animation in world space (which relies on no parenting). Therefore the substeps of the simulation will be able to interpolate its position, rotation & scale between frames when baking the simulation.
It’s annoying to be forced to work on a daily build and to do this fix each time I want to update my animation, but it is how it is…

So here’s the procedure:

  1. Duplicate the armature deform modifier of the emitter and apply it as shapekey so non-destructively store the “bind” position of the mesh
  2. Hide the Armature deform modifier from viewport and render, and set the previously created shapekey to 1. Now your emitter is a static object.
  3. Select the emitter in object mode, then an adequate bone in pose mode and hit Shift PParent to Bone, and check the “keep offset” in the options popup. Now the emitter object is correctly animated as an object in the world space.
  4. Hit F3 and search for “Bake Action”, just verify your start/end frames and check the “parent” option so that the parent relation gets removed once the baking is done, and hit Bake.
  5. Once the emitter’s animation baked into keyframes, your can rebake the smoke simulation.

I messed with a few properties and went through the trouble of rendering it out… but can’t upload it as I’m a new user here.
It looks like it let me upload an animated gif !? animation|690x388

The important changes were to the ReactionSpeed, timescale and Fuel settings. I’m sure you can fine tune it and get it performing better yet. You might also want to play with the vortex setting.

Domain changes:
ReactionSpeed 1.5 -> 2
Timescale -> 0.1
FlameSmoke -> 0.12

Sampling Substeps -> 10
Fuel -> 0.13
Initial Velocity: all to 0, set Z to 15

I also set the Vertex Group to one which included the top 4 faces of the mesh.

It’s a little fast… but looks ok? Lowering the initial velocity might be better yet.

It does make things better indeed, thansk!

I’ll need more testing, though it’s quite hard considering the instability of mantaflow right now. I’ll share my discoveries here for sure.

After some more testings, bug reportings (T75755 and T75883), I finally got something that looks quite nice:


Rescaled closer to needed space, allowing lower resolution for same effect but faster baking times.

Fluid > Settings:
Resolution division : 200
Time scale : 0.08
CFL Number : 10

Fluid > Adaptive Domain:
Add Resolution : 0
Margin : 10

Vorticity : 0.2

Gas > Noise
Upres Factor : 2
Strength : 0.10
Scale : 10
Time : 0.1

Gas > Fire:
Reaction Speed : 2
Flame Smoke : 0.12
Vorticity : 0.95

Data File Format: Uni Cache
Noise File Format: Uni Cache
DO NOT use OpenVDB, it is currently bugged and corrupts baking results (see bug links above).


Fluid > Settings
Sampling Substeps : 6
Fuel : animated from 0 to 0.05 on four frames for a better lighting-up effect. For bigger flame I’d suggest a longer animation and with an overshot.
Vertex Group : none

Fluid > Flow Source
Surface Emission : 1.5
Volume Emission : 0

Fluid > Initial Velocity
Initial Z : 15

Now all that remains is shading tweaks. Shouldn’t be a huge task, I already done most of the work with previous renders:

1 Like