Alright, I’m using UE 4.11 and when I go to build the lighting in my level, it’s always very wrong. I don’t know what I’m missing.
I use the ‘production’ lighting build just in case
I have a light mass importance volume
I have one direction light
Most of my objects cast shadows (except the books)
I set all of my lights to static so that the rendering speed and baking is maximized
It seems that EVERYTIME I build the lighting, certain lights get turned off. If I nudge them even a little bit, the light shows up again in the scene until I build the lighting again. This only happens with static lights.
When I build the lighting, I expect it to bake shadows from static lights into the scene and expect the scene to look a lot better. Yet, the opposite happens. Some meshes should be very well lit, but they don’t show any lighting info. It also seems that a mesh is just given an average lighting constant rather than gradiated lighting values based off of light distance and light type.
This seems to be a very basic question, but just in case. What size did you set for the Lightmap resolution on your meshes? As far as I’m aware every mesh has it set to 64 by default, so you might want to crank it up.
I’m asking because that screenshot with the skull makes it look like the shadow on the table has a very low resolution.
I hadn’t thought of that. Adjusting these values helps a lot.
****. I spent a lot of time creating a blueprint which tiles the walls by dynamically creating static mesh components. Each tile is 500x500 and has 5 different LOD’s. I looked at the static mesh component in the engine and it looks like the UPROPERTY for bOverrideLightMapRes and OverridenLightMapRes are set to BlueprintReadOnly. Since I dynamically create my tiles in a construction script and not during runtime, I think I should be able to modify the light map resolution via blueprint, right? I’d just have to modify the engine slightly and rebuild it.
Does anyone know why these properties were set to blueprint read only?
I’m not exactly sure, but I think since you’re using blueprints to place those wall meshes you would need to use instance static mesh so that it combines the meshes, if possible. Otherwise, lightmass processes the meshes separately and there will be slight variations in color in the lightmap which will make the meshes stand out from each other, the effect is more prominent if it receives more indirect lighting.
Instanced static meshes are not “welding” the meshes together. All instancing does is it tells the CPU, “This is the template for the mesh I want to draw, and I want to draw a thousand of them!” and then GPU will then use its massive parallelized processing power and draw the same mesh a thousand times, all in ONE draw call. If you have a thousand static meshes, which all happen to be the same static mesh and you don’t use instancing, then you’re going to have 1,000 draw calls instead of 1. Instancing is great for batching up draw calls on things which there are a lot of. I’m sure that behind the scenes, the foliage tool takes full advantage of instancing.
I think what you’re trying to recommend is ‘welding’ the meshes together so that the GPU treats them as a seamless mesh. I’ll look into that and give it a try. I think auto-welding might be enabled by default though.
No, it doesn’t need to be a seamless welded mesh, it just needs to process all of the instances on the same thread when it runs lightmass, if it processes them separately then the lighting won’t be consistent across the meshes. I’m not sure how lightmass will treat instanced static mesh blueprints so that’s the question.
You have directional light but missing a Skylight to set the base GI lighting. Also if you set, uncheck, your point lights inverse shadow to off you will gain a much more easier to manage lighting solution and use fewer light elements in the process.