Solved - 6-way Lightmap Smoke in Unreal

Hello! It’s been a while since I have posted in the forum :sweat_smile:
I’m currently trying to follow this post - https://twitter.com/Vuthric/status/1286796950214307840 on lightmapped smoke using Houdini and Unreal. Got the smokeRGB sprite from Houdini into unreal but doesn’t give the desired result. I tried swapping the R and B inputs/outputs to match the light setup in Houdini but no luck :frowning: Can someone please help me know where I’m going wrong? Thank you!
Here is the material editor nodes - Smoke Lighting posted by anonymous | blueprintUE | PasteBin For Unreal Engine
Texture I’m using -


Result in Unreal -
Houdini Light setup -

2 Likes

Since I can’t see the texture you’re using in the opacity, I’d say check that first, it’s unusual that you have an RGB value multiplied to the particle color for the opacity, but if the texture is correct, this should not cause any problem. Might want to set your texture to HDR and remove sRGB if you have it enabled. I’m also not sure about this part, I don’t actually know this function, I assume it’s basically a component mask for rgba then adds all the results, but just make sure thats what it does. image

If all of this doesn’t work, your Houdini export might be wrong. Let me know if you find anything

Thanks for the input! I did change up the texture sheet to HDR and removed sRGB, but it just removed the transparency. I did change the opacity input to directly take RGB from texture. The Add component is just adding the whole RGBA together, rather than just going ((R+G) +B)+A. Though nothing worked. I’m going to look into the Houdini export, probably that’s my best bet :sweat_smile: image

I’d check this thread. I followed along with it (in 4.24) and it worked pretty well

yes! I did go through that one and didn’t get the result :frowning: Either I’m doing something really stupid or I’m just dumb :see_no_evil:

I mean, even in the material node setup it looks like you’re only using one texture? Plus in your material setup I can’t tell what textures you’re using in your texture nodes. One of them you’re multiplying the RGB of a texture sample by Particle Alpha and inputting that into Opacity. As far as I can tell you’re not using a separate texture/channel for both your Front and Back lighting setups either.

This is my setup right now. Still tweaking some things, but it’s mainly the same as Nate’s

Oh! :hushed: I thought both the textures are same. So what texture is used for the T_Lightmap_02? I was using the below texture

And why are the color so prominent in your texture? Did you make any adjustment’s in houdini?

My _01 is
R: Right
G: Left
B: Top
A: Alpha

My _02 is
R: Bottom
G: Back
B: Front
A: Emissive

If the image isn’t expanding, you can right click on it and open in a new tab and that should show it at full resolution.

The texture compression I’m using adds an alpha channel (and its included cost) by default, so I opted to add in a separate emissive map that I can color and erode out separately from the alpha channel that is handling opacity. The smoke cloud I’m using is the same for texture 1 and 2, just lit from different directions (hence the name, 6-way light map). I used Embergen for this texture, before they added the 6-way lighting feature, but even now I still manually render out each individual light pass, and then I adjust the levels in photoshop and then combine the textures into their respective channels. I also do this individually, because the Embergen 6-way textures have light direction textures in different channels than the setup I copied from Nate. So keep that in mind when looking at my setup. I may have different direction textures in different channels than you do.

1 Like

This is my “Front” texture in the blue channel of my Texture_01. Your front is basically like your base for your particle; it’s pretty much what you would normally use for a standard unlit particle cloud. Think of your other directional maps as highlights that are added on top of this texture, since the color for this is entirely emissive, so they shouldn’t have much value on the other side of where your lights are hitting. Hence why mine are basically black on either side, which makes the color of my packed textures look so vibrant and saturated. My “Back” lighting texture is basically a soft ring edge of the smoke texture with mostly solid black in the middle, since anything back lit would just get a soft rim light from it.

Smoke_6Way_Front_TEST

2 Likes

i did some tests with that as well and i’m not sure if it’s the best way but here is my setup. hope it helps. I’m using two textures for my test:

T1.R Right
T1.G Left
T1.B Top
T1.A Alpha

T2.R Front
T2.G Back
T2.B Bottom
T2.B Not used (later maybe emissive?)

REmxp9U3W9

Blueprint sends the light direction into a material param collection:

Material chooses the correct channel

p.s. I think it’s necessary to convert to Tangent Space like shown here: https://twitter.com/Vuthric/status/1286804964287721473/photo/1

15 Likes

Simon are you using the same texture for both there? I get nothing if I use both as the same, and …something… if I use the 6point light texture on the top, and a regular albedo texture on the bottom, but it isn’t affected by the lighting (which I’d expect given that all 3 vectors are involved).

no, it’s TWO textures.

T1.R Right
T1.G Left
T1.B Top
T1.A Alpha

T2.R Front
T2.G Back
T2.B Bottom
T2.B Not used (later maybe emissive?)

1 Like

Yep, apologies, I realized this after reading more carefully. For some reason I’m still getting just a black square (the flipbooks were rendered from Embergen). On the plus side I’ve begun to actually understand what’s going on in the material setup (I tried both yours and Nates), but something isn’t right. Seems to be so many ways to make it work!

So it’s not rendering at all? Hmmm

@Travis It renders as black on the quad. I was able to get -something- to appear using your setup actually, with the flipbook node in the material, so that was part of it. Though it keeps the black around the actual sim instead of making it translucent (material is set to translucent/unlit). And light still doesn’t seem to affect it. Still figuring it out.

@Travis Could you post your entire material setup if possible? I’ve tried everyone’s setups so far and all I get is a black render… very, very annoying. I know I’m missing something simple.

Can do! I’ll try and get that up and on here in a few hours

1 Like

So testing it out, I need to double check my inputs because I have some stuff backwards, but it still renders. The AtmosphericLightVector node works off of Directional lights in the scene, so if you don’t have any directional lights, it probably won’t work.

3 Likes

Thanks much Travis, very appreciated! I’ll give this a go later today and see how it turns out. I assume that MF you have there is custom? I haven’t seen that in the libraries natively.