Emission maps?


#1

So when you’ve got a fireball texture, made of both smoke and fire, what techniques do you use to get the fire to glow but not the smoke?

I’ve come up with my own solutions, but I’ve felt like it’s probably not the most efficient way to do it. I’ll just have two separate textures, one for the fire, the other for the smoke.

The two problems I have with this are, 1: I’m having to use two full size flipbook textures, and 2: I have to choose whether my particle color node drives the color of the fire or the color of the smoke. I usually choose fire, though it’d be nice to have full control over both.

I’ve seen a whole bunch of different ways that people approach this; gradient maps, different texture channels, HDR trickery in the material, etc.

I’m interested in seeing how other artists solve this common problem. What do you do, and what advantages/disadvantages come with the technique?


#2

You can pack several textures into a single RGB mask texture, something like R = Smoke Diffuse, G = Emissive Map, B = Opacity. Next step would depend on your setup, whether or not you want to use a Dynamic Parameter channel (or if you have a spare available), or control everything through the Particle Color node.

Dynamic Parameter available: You could have your particle color RGB control the diffuse color of your smoke channel, append all three channels of your dynamic parameter (not ideal) to control your emissive color.
Second option is to control the RGB of either your smoke diffuse or fire emissive with Particle Color, and have a single scalar param from your DP drive the intensity of the other. If you want more color variation in your fire emissive, you could use a color look up table (LUT) for your greyscale fire emissive.

Particle Color Only: Same as second option for DP, but you’re just using separate channels of your particle color to control the intensity of each texture channel, and use color LUTs for the color of each texture.

Does any of that make sense?


#3

Like Travis said, have the temperature map in a separate channel of your texture. Pipe that into the UVs of your color ramp, and pipe the result into your Emissive slot. Next-gen graphics ezpz!


#4

Just today what I tried is using a smoothstep to control the values of my smoke map and then I pipe that into a lerp and lerp between my smoke color as well as my explosion color.

I controlled these with a dynamic parameter and then I used the same set up to control the opacity.

I hope this helps.


#5

This. I cannot stress how much this helps. To give you an idea, if you look back on the Skull&Bones gameplay video from E3 2018, the largest “Diffuse Color” texture used in VFX was 16px by 128px. Everything else is just channel packed masks.

As a bonus, the same texture then can be used for different things.

For example:

From there, we use 2 ramp textures. Very small ones. The first ramp is an albedo ramp and the 2nd one an emissive ramp. For an explosion it would look like this:
Albedo Ramp: DXT1, 16x16 px
5

The reason this is not a simple vector color picker in material is so we can easily edit the tone of the smoke in our explosions across the game by opening this small texture in photoshop and changing the level of gray. This way, we don’t have to edit each effect individually and we maintain uniformity of colors when using more than 1 animated texture in a given fx, so they blend better together. A very small cost to pay to keep an easy pipeline.

Emissive ramp: BC7 128x16 px
RGB: Emissive Color
7
A: Emissive Pre Multiply
7

Basically, we directly assign the albedo ramp into the albedo term, but for the emissive ramp, we sample it using: UV = float2( 1.0 + (-animatedTextureMask2.r), 0.5); So the Mask2’s animated R channel animates the balance of smoke and fire.

Basically, you can skip the part about the smoke gray if you encode the lighting directly in your texture… and just do the emissive bit. Bit of advice, you should use your emissive mask to blend some black in your albedo (which is going to be covered by what you send into emissive) else your emissive color will be affected by lighting and your fire color might not be what you want depending on the sun color / time of day.

More detail about the process here: Smoke Lighting and texture re-usability in Skull & Bones


#6

Is there a reason your texture is 16 px thick, vs 4 or 2 px?


#7

Yeah, I wanted a bit more room on the y axis as (not pictured above) am using the y gradient to adjust the color and saturation across time of day.


#8

Oooh that’s brilliant, thanks! It’s going to take me weeks to sort through and take notes on all the great stuff you’ve shared on here, I really appreciate all the info.