Jump to content
Dave Rand

Color into smoke from combustion

Recommended Posts

Curious about other's workflows getting color into smoke from a volume source or otherwise from combustion. Coloring moke alone is pretty straightforward. I'm wondering how others are getting color into smoke derived from combustion. Thanks!!

Share this post


Link to post
Share on other sites

Hi Dave!

I just did some colored smoke, like last week. Sadly, it was a dumb straightforward solution. I'm sure there must be some clever way to extract the burn or heat fields, noise them up and then emit Cd from them.

First I created my fire sim. Got it the way I liked. Then used the same source geo with some Cd noise and emitted colored smoke from that in another separate sim. Then I used the velocity field from the first sim. I figured that gave me the most control. I did use an offset noise from the fuel/burn/temperature emission in the original sim because otherwise the colors would be pretty bland as they would exactly correspond to the burning. The key in comp was to use the fire_mask from the original fire sim as the Cd will continue off far longer into space and not look like fire at all.

However, I did find a sneaky little gotcha that chewed up a few hours of frustration. Do not, under any circumstances, add Cd to the Gas Resize Fluid Dynamic DOP in the Extra Resize Fields or the Reference Field. Why? From what I understand the internal blurring in the Cd field means that if it can it will greedily expand and take up more and more volume every step with minimal or no actual color value in it. You'll end up with a monster box. And not in a good way.

 

  • Like 1

Share this post


Link to post
Share on other sites

Thanks!  I'd love to find a way to get it all in one sim. Looking inside the solver I can see the color nodes but no hook up to smoke generated from heat. Thanks for the tip on color resize also!

Share this post


Link to post
Share on other sites

Visually, what are you trying to accomplish?

If we generated a Cd field from a scalar field (heat, temp, burn, etc) I'm sure it'd be monochrome.

Share this post


Link to post
Share on other sites

Fire and smoke the way nature works. Based on the source material the burn colors change and are advected from the flame to smoke. For now flames can remain kelvin based but the smoke would reflect the material being burned. Tires emitting black smoke. Gas, dark grey, various wood material browns to white. 

Share this post


Link to post
Share on other sites

In DOP from a Gas Field Wrangle, you can add some value into the Alpha and in post-sim use the "volume ramp" node. You will be able to remap your scalar into vector color.

 

In the Gas Field Wrangle your code would look like that:

 

float temperature_temp = fit(clamp(@temperature, 0, 10000000), 0, 4, 0, 1);

float burn_temp = clamp(@burn, 0, 10000000);

@Alpha += (temperature_temp*burn_temp);

 

 

Hope it help

Share this post


Link to post
Share on other sites
17 hours ago, Dave Rand said:

Fire and smoke the way nature works. Based on the source material the burn colors change and are advected from the flame to smoke. For now flames can remain kelvin based but the smoke would reflect the material being burned. Tires emitting black smoke. Gas, dark grey, various wood material browns to white. 

I think that'd be a shader thing with a switch and bunch of hand tuned Material SOPs. And then have the same switch controlling which of several pyro solver gets output.

That's what I'd do if it were one setup per burning material/solver.

Several burning materials in one solver? I'd have switches pumping in different emission volumes into the solver too.

Not a trivial exercise, sounds like fun!

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×