Fake Simulated Heat Distortion in Blender

Blender 2.91 got a new modifier called Volume to Mesh. By using that modifier and some shading tricks you can now create a simulated heat distortion effect.​​​​

Comparison without and with:

Short tutorial:

  1. Create a smoke+fire simulation. Disable the adaptive domain feature because of T79711. Set your cache type to OpenVDB and Bake the simulation.

  2. Import the volume that you just simulated using the volume import object type. Align it to the original simulation (check location and time).

  3. Create an object which will be used for the heat distortion. Add a few modifiers to it: Add the Volume to Mesh modifier and type in the appropriate grid name. Then add a displace modifier if you want to expand the effect. After that use the voxel remesher to remove any self-intersections and lastly use the smooth modifier. In my example, I also used the boolean modifier to remove clipping.

  4. If you’re using Cycles select your heat distortion object and disable every ray visibility except for the Camera (this is just for a bit of a performance boost).

  5. Create a new Heat distortion material. The material has to mix between transparency and glass. Distortion caused by refraction is only manipulated by the IOR value of the glass shader (1.000 means no distortion). Using the Facing input you can mask out the edges to keep a clear transition. You can also use a noise texture to add more detail to the distortion. It is also worth experimenting with the roughness value of the glass shader.

  6. Render and that is it!

I hope that you find this tutorial useful and maybe even improve the technique!

Updated shading setup:

This version is more efficient (done in 3.4 in the year 2023)

You can download the shader blend file:
heat_distortion.blend (861.1 KB)

9 Likes

Another example using one of the free Embergen simulations:

2 Likes

I am not sure that you need to mix transparent shader with the glass one since you have the refraction shader that already has no reflections, so don’t you think it will be better than the glass shader do mix with the transparent one?

Great technique! Loved it.

2 Likes

Yeah you’re right :slight_smile:

I now switched from using the layer weight to control between glass and transparent to
switch between the 1.02 IOR (glass) and 1.00 IOR (still glass but because there is no distortion the same as transparent) BTW I need the mixing because I need to smooth/blur out the edges otherwise it looks a bit funky

Thanks!

1 Like

Yes, i got it. The problem was not the mix itself, but the shader you chose. The problem with the glass shader are the reflecions. If what you needed from the glass shader was the refraction without reflections, then the refraction shader is more what you need.

With the glass shader you need to care about the roughness because of that, but that doesn’t happen with the refraction shader.

1 Like

Oh I didn’t even know that the refraction shader existed

1 Like

Yes, everyday we find something new or that we did not know existed. Lately I am in love by the ambient occlusion node.

1 Like

Sample Scene

This is for anyone who needs a more hands-on approach. The simulation is a lower resolution and only 20 frames. To use it you just need to unzip it and open the blender file.

So I may not be the most savvy Blender user, especially in regards to simulations. While running your simulation, the 20 frames in viewport mode, I clearly see what should be happening, at least with the VDB. Switching over to Cycles or Eevee, I don’t see any changes occurring in the scene at all. I’m probably missing something obvious here, but I figured I’d ask first. Basically I see an engine cone and a checkered backplane.

As an aside, the simulation video for your afterburner is great and something I’m looking to duplicate, or at least mimic - moreso for clean rocket exhaust rather than jet engine exhaust. All attempts so far have been failures, outside of overlapping meshes presented as volumes. Anyhow, I’m open to learning and suggestions if you have any.

Attached is an example of where my scene is, but not where I’d like it to be…

1 Like

First I need to ask which Blender version you’re using because that might potentaly solve a problem. (I’m using 2.91.2)

First, so that we can understand each other better:
Fire Simulation = simulation domain which you bake
Heat Distortion = baked and then imported fire simulation using the volume object type which then also has the volume to mesh modifier

What do you mean by:

When you add the Heat Distortion to your scene you need to delete the volume shader that is automatically added to it. Also, don’t forget about the 4th step:

Also which render engine are you using? I think it should work on both but I’ve only really tested this in cycles. It would be also helpful if you shared screenshots of your scene settings (the outliner, shader editor) so that I can see any potential errors :smiley:

Ah. That helps, thank you. Updated to 2.91.2 and I see your work perfectly now. Still not fully comprehending it, but I think I’m getting there…

Interesting. I wasn’t aware of a volume to mesh modifier. That might have made my attempts at converting a VDB into a refracting object much easier.

‘Overlapping meshes’ for the flame/shock diamonds in the photo attached.

I’ll attach some of what I’m experimenting with. As for what I’m using - ECycles 2.90, and now 2.91.2

As you can see… I’m kind of frankensteining this whole thing together. Modeled in Zbrush, decimated in Blender, texture in 3D Coat, rigged in Blender, and now I’m attempting to animate this monstrosity. It’s not fun… but then again it was never really designed to be animated, but rather put on poseable display. =[

Edit< :: I just started experimenting with your material against an embergen VDB and I can see in the newest version of Blender the modifier you mentioned… the results are essentially exactly what I’m looking for. I think this simplifies what exactly I’m trying to accomplish.

  1. I need to figure out how to simulate flames that look like the pinkish exhaust flames in the image below.
  2. Take that simulation and do as you described to get the heat shimmer to play alongside/with the flame.

Well… It isn’t perfect, but I kinda figured out how to roll out the VDB heat shimmer thing. Feels a bit slow, especially compared to the alternative rocket exhaust method I used.

1 Like

Nice example but: I feel like the gas should move faster and that it would also need to dissolve faster to avoid a super long trail

Yep, it definitely isn’t cheap when it comes to performance… The other thing about the method I don’t like is that currently motion blur isn’t supported for it :confused:

Yup. I fully agree. The effect for the rocket cones works quite well, but I just couldn’t get it to scale up to the VDB section you commented on without the edges of the mesh creating a defined outline. I tried all sorts of tricks…

I think it might be possible to fix the primary exhaust velocity by tripling the speed of the VDB in the animation, but I don’t know how to do that or I already would have done it =p