Have a problem with my lighting, and I’m not entirely sure what’s causing it.
When I use a static/stationary light to light up my scene it looks fine, until I build it. Afterwords it either doesn’t cast shadows at all, or it doesn’t look proper. If I change the light to mobile, it works fine!
I would use the movable lights, but it seems sort of silly to take such a performance hit on what is actually a static light.
This is, more or less, what I would like it to look like:
I have recreated a test project and I will attach a screenshot of what I have created. I used BSP brushes instead of static meshes but the effect still translates. Currently Point lights are not supported by lighting functions. Therefore what you get when you build lighting with a point light is a flood of light that can cast shadows on say the whole static mesh but it will not focus in on your maps. My recommendation is to use a directional, or for less flood a spot light, and then mess around with the settings to achieve the affect you want.
Hard for me to send screenshots, but I have the exact same results with a spot light, the direction light doesn’t really seem to do what I want at all. The spot light does work initially when rendered in the editor, but the second I build the lighting it goes away completely now. No crappy shadowing - just none at all. I think it’s doing the same for my point lights now. I’m sorry, I feel like such an idiot working with UE4, the learning curve just seems so steep.
If static mesh, make sure it has valid lightmap UVs set up. Find the asset in the content browser and double click it. You need to make sure it has a valid index set for “lightmap coordinate index”. If your UV 0 channel is uniquely unwrapped it can be set to 0 otherwise it should be set to 1. Then you should be able to preview the UV 1 channel to make sure it shows up OK.
If this is BSP there may be a bug with the lightmap resolution view. Try increasing the lightmap resolution via the surface properties.
It is a static mesh. I just used a cube and put my material on it. Should I consider using BSP instead? I’m not 100% sure I understand the difference, but I want to use what’s best.
Okay so I played with it a bit, and I’m not going to lie I’m royally confused. I made a duplicate of the cube and applied my material that I am using(note that I am using materials based off of textures that I baught ages ago). Then I messed with the settings, and it didn’t really do anything. When I previewed UV channels 0-2, it shows different wireframes but it looks nothing like the bunch of tiny holes. Should I be making special meshes for these based off of my materials? I feel like I’m just not getting something here.
So, went back and did some more experimentation. Found out that if you are using a standard black and white image for your opacity for your material essentially what you are doing is giving the opacity map too much information. Despite the fact that the image is black and white the RGB channels still have information in them and the opacity channel doesn’t know what to do. What I would like for you to do is take the Green channel of your alpha map and plug it into the opacity channel and let me know what happens. If you do see shadows or the light come back then the issue lies within the alpha map that you have.
Ok, send me a screenshot of how you have everything hooked up inside of your material editor. It may be hard but my suspicion is that it has to do with your alpha channel itself and not the lights. This way I can trace it back to the root and then worry about the lights.
At my PC now so screenshot is not a problem. I wouldn’t be surprised if I had something messed up - I played with these for a couple days before getting them to look normal. Of course I just realized I can map my alpha channel to the alpha mask as well.
So this is what I have for you. Except for a few things I didn’t make because you have a specific bump offset and lerp I basically recreated what you have with a fourth texture node that acts as a mask for the opacity mask channel. Attached is a screenshot. Anything black will be transparent and anything white will be solid. I would recommend taking the far left texture sample and duplicating it. Then plug it’s green channel into the opacity mask.![alt text][1]
So in that materials screen under the details on the left side scroll down to lightmass. Under the lightmass setting tab there will be a check box that says Cast shadow as masked. Check to see that that is check on and then rebuild the lighting.