UDK: building lighting breaks light transmission, backface lighting

Please note: This is regarding UDK/UE3, not UE4 or UE5. I tried posting in the Legacy section of the forum, but I keep getting the error “You are not permitted to view the requested resource.” This is tagged UE4 because UE3 is not an option. Sorry.

@Coldscooter @CobaltUDK @O_and_N
Are you able to get color transmission to survive a lighting build? I have never been able to get this to work, and I think something has been broken from the start and I’m only now knowledgeable enough to say with certainty that this is bugged. Take a look with me.

First, we are going to make a very simple material.


All this two-sided material does is check to see whether the front of the polygon is facing the light, or the back of the polygon is facing the light. If the front of the polygon is facing the light, then the front of the polygon is white and the back is black. If the back of the polygon is facing the light, then the back is white and front is black.

This is what the material looks like before building lighting:


What you see there is four squares. In the top group, the front of one and the back the other are lit. In the bottom group, the front of one and the back of the other are shadowed. If you were to move the camera to the other side, the top group would be shadowed and the bottom group would be lit.

This is what happens after building lighting:


Now you only see one lit face. In the top group, the face of one square is lit and the back of the other square is dark. If you were to move the camera to the other side, you would see that in the bottom group, the front of one square is lit, and the back of the other square is dark.

I’ve been experimenting all day with this, and I think this is the simplest demonstration of the problem. Expanding from here, all of my materials show color transmission correctly before I build the lighting, and they all are too dark after I build lighting. It doesn’t matter if I try using the built-in Phong lighting model with a transmission mask and transmission color, or if I try making my own custom lighting model that uses its own diffuse and/or emissive based on the face or backface pointing toward the light. In every case, the backface ends up being too dark.

I’m going to get back to work dissecting UDK’s sample materials. I’m pretty sure they are not actually doing real light transmission, and they are all smoke and mirrors.

Have any of you successfully made a material that uses transmission? Does it continue working after you build lighting? How did you do it?

@Nathaniel3W

I’m not sure if this will help, as I don’t bake lighting in my game due to having purely dynamic lighting and day/night cycles:

Have you tried turning on PerPixelCameraVector in your material?

UDK documentation: “Per Pixel Camera Vector - If true, the camera vector will be computed in the pixel shader instead of the vertex shader. This can improve the quality of reflections and also allows the VertexColor expression to be used with the Transform expression.”

Btw, I’m also still unable to create new posts on the UDK forum. I get the same error “You are not permitted to view the requested resource.”

I’ve sent messages to @Amanda.Schade, but the bug is still present and preventing us from posting.

Just an update that Epic has just fixed that issue with not being able to post new discussions. So we can discuss these issues back on the UDK sub forums again.

Thanks for the suggestion about “per pixel camera vector,” but that didn’t work. Instead, I’m going the full dynamic lighting route like you. I had always thought that UE3 just wasn’t meant for DX11 and dynamic lighting. But I’m spawning lots of dynamic lights during gameplay and running the game in DX11 and it seems to be doing just fine on modern hardware.

And that’s good that they got the legacy subforum working again. At least that’s some good news for now. If I have more questions I’ll head back down there.