Feed

MiikaHweb Blog -> Archive


Blender smoke subframes

May-17-2013    27 Comments

No subframes testOne of the remaining "easy-to-fix" issues with Blender smoke simulator has been that you can't have fast moving objects emitting smoke. At least not that easily or smoke flow would leave behind a bunch of disconnected dots instead of continuous flow of smoke.

Now I have committed subframes for smoke flows. That means you can define how many additional time samples will be taken between each simulation frame. Below is an example of a fast moving particle with multiple subframes and no subframes:



One thing to notice is that this is a flow setting, not domain one, for couple of reasons. First of all, subframes are applied only in the emission phase. Simulation itself won't calculate additional time samples, so there will be no change in behavior of the fluid and you can use very high subframe counts with only minor performance drop. Also this allows you to enable subframes only for smoke flows that move fast enough to benefit from it.


Another new thing is ability to define size of flow particles. Previously it was common issue that when you increased domain resolution for final bake, particles became way too small. Now you can just increase particle size if needed.



These new size based particles are also compatible with my previous "full sample" high resolution update. So no more blocky particles either. Besides, this allows using smaller than "low res cell" sized particles, so you can have detailed tiny particles without having to increase simulation base resolution up to several hundreds like before. It's enough to just increase high resolution divisions. :)


Here are couple of renders from my subframe test scenes:



These new features are available in Blender trunk builds of revision 56884 and higher.

Posted by MiikaH at 17:43

Category:Blender, Development
Tags: Blender, Smoke, Fire



(Comments, questions or discussion about this post.)

Bigfan
May-18-2013 07:36
Amazing!!! :D
Internet Explorer
May-18-2013 11:11
Thanks for your excellent work! Very useful and much appreciated.
Tiago
May-22-2013 16:29
Great job, but it looks like the result was different between the new version and the old version :

Old : https://vimeo.com/66743866

New : https://vimeo.com/66744827

why this happens ?
Jeff
May-24-2013 02:57
Awesome!
Google Chrome
May-24-2013 06:54
StarStarStarStarStar
I have been waiting for this feature for a long time... way to go Miika Hämäläinen!
Kirill
May-25-2013 13:41
StarStarStarStarStar
Yes! That's a great change! Thank you, Miikah! Now it looks that we can simulate almost everything that is related with smoke&fire in Blender!
Felix41
May-27-2013 00:23
StarStarStarStarStar
Great improvements! My only feature request would be to make the Smoke Domains ‘time scale’ value go to zero (instead of just 0.2), so we can easily do some smooth freeze frame effects (and super slow motion!).
Luke9748
May-28-2013 01:21
StarStarStarStarStar
For some reason ‘initial velocity’ for smoke particles doesn’t work with the current build…
MiikaH
May-28-2013 08:11
@Luke9748

Thanks for reporting, its now fixed in r57070.
InigoT
Jun-07-2013 21:43
StarStarStarStarStar
Awesome improvements! However, there seems to be a bug in the current build of blender where a single voxel of smoke will appear in the corner of the domain. You can see an example of this happening in Jonathan Lampel’s new explosion tutorial (at 14:31):

http://youtu.be/B_0gb5cJ0DE?t=14m30s

MiikaH
Jun-08-2013 07:24
@InigoT

I'm pretty sure I fixed that already last week. That tutorial was released around same time, so I can assume he was using older build back then.
InigoT
Jun-09-2013 02:04
StarStarStarStarStar
@MiikaH

Oops, I just realized I had a slightly outdated build of blender.
Guest
Jun-09-2013 02:13
StarStarStarStarStar
Wow! I just realized that the new smoke ‘subframes’ option also applies to particles! Thank you Miika Hämäläinen!!!
Matthew Merkovich
Jun-14-2013 19:15
StarStarStarStarStar
This was exactly what I needed for the shot I am working on in which a guy shoots a smoke grenade. One thing I'd have liked to see is also subframes on collision objects. Then I could have the projectile properly penetrate the initial smoke cloud coming from the grenade launcher. Its a good start.
Matthew Merkovich
Jun-14-2013 20:42
StarStarStarStarStar
I meant to write, "It's a good start though." (I really need to proof-read before hitting the "send message" button.)
Tiago
Jul-09-2013 06:01
I think I found a bug in Subframes, simulation changes when the subframes is bigger than zero.Please take a look at this.Thanks.
MiikaH
Jul-09-2013 11:26
Please report this to Blender bug tracker or mail me a blend file in which this bug happens.

Anyway, if the flow isn't moving then there shouldn't be any change in the simulation behavior regardless of subframe count. However, if the flow is moving then simulation obviously changes as well. Otherwise subframes would be useless, right? :p
Taiago
Jul-10-2013 17:42
https://vimeo.com/69985787
MiikaH
Jul-10-2013 17:58
@Taiago

Sorry, I need a .blend file. Video tells me nothing about the issue or cause.

If those are particles, have you tried baking them first? Sometimes subframe calculations mess up particles if they are calculated at the same time.
Taigo
Jul-11-2013 01:38
Download .blend file : http://www.mediafire.com/?6v0qkjgp6f90gg0
kilbeeu
Nov-18-2013 01:41
StarStarStarStarStar
If i have rigid bodies simulated with bullet physics engine, this subframe feature doesn't work right?
I know i can bake rigid bodies to frames, but would be cool if it worked for simulated objects as well.
Do you think there is a chance to get it working for physics simulations? Or it's not worht the trouble?
Konstantins
Nov-21-2013 07:18
It might be something else, but in simulations of fast moving short (like, living for 5 frames) flame, one can see boundaries of flame created at different frames.
High sub-sampling creates a smooth flame across the motion path, but it disappears in chunks depending on which frame it was created.
It is masked in noisy flame, but is clearly visible if flame is smooth.
Like a streak of flame, that is segmented by intensity.
Konstantins
Nov-21-2013 07:50
A sample file. Hit bake, then render.
http://www.visnevskis.com/fileadmin/fire.blend
It seems chunks of flame have "integer" density, thus separating on boundaries.

Thanks a lot for this wonderful capability of Blender.

Please reply if you think this can be considered an issue and should get attention. I'm currently on a project with flame, and it'd be great to know if anything might change.
kilbeeu
Nov-21-2013 19:37
Yes, what Konstantins said is true, i have the same results with fast moving objects. Subframe spawned chunks disappear with the "parent" frame. But same goes with spawning, "child" subframes have size of the parent, which is clearly visible when you have really fast moving objects
MiikaH
Nov-21-2013 20:12
@Konstantins:
As far as I can tell that is caused because subframes don't change how often the simulation step happens. Only how often brush is sampled for the next simulation frame.

Your fast moving object of high initial velocity gets emitted in correct place, but is moved on the simulation step by the initial velocity and therefore is out of place.

Only solution I could think of would be to allow setting true subframes for the simulation. But based on my earlier tests, lower simulation step (at least with the simulation algorithm Blender uses) causes simulation to drastically lose detail. So it's definitely not something suitable as a generic option as in "more substeps = better quality"... :(

If you really need this, you can try making that scene over double duration and use domain "time scale" of 0.5. Then playback the result double speed.
Konstantins
Nov-21-2013 22:44
Thanks a lot for advice! Somehow didn't figure it myself.
Though It looks more like I'll have to multiply simulation length about 5x, to get even flame :) - It's a footage of a girl waving a ring, that has to light on fire.

I changed motion to linear and it looks practically the same, so I guess it's more like quantization of "voxel age" or fuel or heat that produces this effect.

I'm purely speculating here, but can't "voxel's age" (or fuel) go in simulation steps, like animation subsampling, not in whole frames? Animation steps are is cranked all the way to 50 and the flame generation is smooth as silk, it's only the reaction stage quantization (or of the heat?) that seems to cause this.

Thanks anyway!
Jerryno
Jan-08-2014 15:06
Hi Miika,
when I have flame emitter object parented to bone in animated armature, the subframes seem not to work(burning torch in hand). It also doesnt work when the motion is a shapekey(like fast flapping burning flag). Cant tell if its a feature or bug:) thx.

Write a comment:
Name: *
Site:
Language:
Review:
Verification Code: *verification image (?)
Message: *

By: Miika HämäläinenLast update: Nov-07-2014 14:18 MiikaHweb | 2003-2019