← All ideas

Fireball scatter

What and Why?

I want to duplicate the density/flame/fuel/temperature volume grid and blur it so that I can use that as a mask for fire intensity in the shading.

Current-Proposal-Explosion.png

Using only Blender tools it is currently Impossible to create realistic/good-looking fireballs (When it comes to shading. The shape is a whole other problem). With an additional scatter grid that would be created as a post-process effect, more appealing fireballs would be possible. The peaks of the smoke bubbles should be colder while the intersections of the smoke bubbles should be hotter.

before-after.png

This is a comparison of a regular Mantaflow simulation straight from Blender and a Mantaflow simulation that was edited in Houdini. These are just very basic settings that would need some more adjustments to look better but I hope you get the Idea of What I'm looking for. Also, ignore the artifacts and lack of noise in the simulation (I'm using the 3.0 alpha).

Video processing...

youtu.be/jRDRoxFThmo (Use this link if video is broken)

How to do it in theory?

You can achieve this by blurring/eroding voxels/volumes.

2D-grid.png

How to do it in theory inside of Blender?

Sorted options in order of best to worst in my opinion:

A) With GeometryNodes

  • Dynamic
  • Slow to preview unless cached to disk
  • A lot of work to code
  • It would bring a powerful voxel/volume workflow into geometry nodes (volume booleans, volume growth, volume erosion, volume math like add, subtract, multiply, average,...)

B) Inside of the noise/upress panel

  • Not Dynamic
  • Fast to preview
  • Fast implementation (I think)

C) With shader nodes

  • Dynamic
  • Slow to preview (no caching)
  • Might be harder to do because it would need to support not only Cycles CPU but also Cycles GPU and Eevee
91.7%

Development Status: Open

Upvote 11 Downvote 1
koko_ze
8 Oct 2021

9 Comments

nubnubbud

TL;DR, it's totally possible, just, it takes a sort of deep understanding of blender's shaders, blender's simulations, and explosions, to simulate an explosion and give it an appropriate material. imgur.com/a/Sdd893r and there are multiple ways to do it. here, I just plugged density into temperature with some math and a backwards colorramp to make a bunch of burning, floating gas, like in hollywood explosions. one is flame only. I had the resolution a bit high, so the "bubbling" is a bit dense.

you're probably looking for a fireball shader. A proper one can often remap temperature attribute values, giving you more subjectively pleasing results. you can "erode" a volume sim if you have a good one, and a colorramp already... though it usually ends up just a little blocky because of the nature of the simulation.

in your description of what you expect to happen, "The peaks of the smoke bubbles should be colder while the intersections of the smoke bubbles should be hotter." is often incorrect- it just comes down to the fuel, burn rate and so on- and mantaflow isn't a super advanced simulator- so it doesn't make assumptions or let you choose fuel types/have proper fuel voxels at all. Luckily, hollywood explosions are just dirty mixed petrol/diesel explosions, so you can just say "it's hottest on the inside".

Hollywood explosions aren't realistic- they're a tailored look that just happens to be a tradition in how simple it is. Combine the right fuel burn speed and a shader that just links temperature to density and you get this!

1
koko_ze Author

Yes, it is possible to a degree but still limiting. You come close in a way. Your example feels too harsh to me since you're crushing your values. Your example seems like the first few frames of the explosion before the dense smoke is created.

What are your reference images? And yes I'm looking for the gasoline type of explosions since they're the most appealing.

Look at these: imgur.com/a/LapBXgk

nubnubbud

well that's just it... I gave you 3. and I can give you more, by adjusting the shader. That was just changing a single slider- and yeah, it was the initial fireball since I didn't care to simulate more than 50 frames.

I'm referencing the same basic ones for yours, but for mine, personally, I prefer to reference footage from remote ammo and arms factory detonations, as well as slow motion footage of incendiary and explosive ordinance.

hmm, after a lot more experimenting I see what you mean... but this isn't a shader issue.

push it forward as a simulation issue. More accurate thermal/oxygen availability simulation for fire would give you what you wanted. you WILL be able to do that on your own once sims are brought into geometry nodes. I think there's lots of issues with the current smoke sim- it seems largely voxel-constrained, while it makes more sense to base it off particles, and translate it to voxels- like other fluids. that would also be able to simulate pressure and inflow more accurately.

I would say at the moment the system just makes assumptions and is better built to benefit common fires over explosions. I wouldn't say asking for a new shader or volume workflow is the right path to go- that's asking for a convenient workaround, where you've actually found something that could be better at its base level

1
koko_ze Author

Yeah, it isn't a shader issue but I want to "hack it" with shaders, or more precisely I want to manipulate the simulated grids after simulation and before the shading which isn't the most accurate thing. But to be honest there is a lot of hacks in most parts of CGI because simulating real-world physics isn't very practical :/

In a way having accurate simulations is good because you get realistic results without any work but you usually have less controllability with that approach. Also, Mantaflow is really slow already, and adding more calculations would only make it slower. In a way, I want more features while the core isn't even finished yet.

Before this gets implemented I would like to see:

  • Stable vorticity at high speeds/high timesteps
  • Noise/Upress that properly dissolves
  • Sparse Volumes
  • Adaptive OpenVDB cache not being broken
  • motionblur
  • and probably a few more things that I can't think of right now just regarding the Gas part of Mantaflow.

So in conclusion, if nothing else this is a problem (good looking fireballs/gas explosions) that needs to be solved because I'm tired of seeing bad simulations being praised as top-notch stuff since that just makes people think that its perfect already and it doesn't need any attention. I would love for the next Blender Animation Studio project to be more simulation orientated since that is really the only way to "force" developers to work on it. And lastly, the Geometry nodes seem like the best time to tackle the cleanup of physics.

nubnubbud

I can't vote for this at the moment, because I feel a "hack" or "workaround" should not become a primary feature.

However, I would vote for this if it was simply a "volume blur" node, that applies a gaussian blur in 3D. That would give you exactly the intended effect, be altogether more useful in more shaders, and align with blender's "less presets, more freedom and utility" node selection

I would also vote for this if it included adding high energy physics/air pressure/oxygen availability to volume sims

also, physics cleanup is happening- but maybe in a different way than you realize! physics are being compartmentalized into nodes and node transformations. This means the ability to add multiple physics systems(dust sim vs smoke sim, both volume fluid sims of the same type), or to "inform" one physics system with another (like using suspended particles to generalize air pressure, then applying their density to volume to allow for shockwaves and supersonic flows)

bestelix

I must say that I'm confused about what are you trying to get and what is wrong. Do you want to have softer/ less dense blobs?

1
koko_ze Author

Look at the image and the video. The effect that I want is to have less fire at the peaks of the bubbles and more fire at the intersections of the bubbles. I'll try to do another image example pointing that out more. Tell me if you understand it more now.

bestelix

I'm not a specialist but I think that, idealy you would need some vector passes like normals to use in a compositor to map a gradient. Maybe an AO pass will work if you can get it. Not sure what you can get directly from the shader.

koko_ze Author

Doing it in comp is impossible because volumes don't have any of those passes.

Maybe if the AO node from the shader editor would support volumes in Cycles and Eevee it could be possible. But currently, Eevee doesn't have a working geometry-based AO node so I doubt a volume version would be possible.

But the A) technique with geometry nodes is roughly (I'm proposing a simplified option) how Houdini people do it and they are well-established/experts for simulations.

1