Jump to content

Color into smoke from combustion


Dave Rand

Recommended Posts

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
Link to comment
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. 

Link to comment
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

Link to comment
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!

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...