Hi there,
I am working on an archiviz project (quality over performance) and need to find a way to force UE4 to always use the maximum shadow quality. I’ve tried changing some values in the BaseEngine.ini file, but to no effect.
I’m new to UE4, so I am a bit confused by the terminology. Lightmap/Shadowmap/Mip-Map/Streaming. I might be using the wrong term here, but please have a look at this screengrab and you’ll understand:
Thanks a lot,
Hi ,
Have you tried adjusting the values in the Directional Light Source under the Cascaded Shadow Maps category?
These allow you to adjust how the quality in the cascades are distributed over further distances. For example, if you’re using a movable directional light the default value is 20000 units (200 meters) which is more than is needed if you don’t need that far of a view distance. I would suggest moving it to a lower value like 3500 - 5000 meters (35 - 50 meters), which can be good or more than enough for most small to moderate sized areas. Then you can increase the Num Dynamic Shadow cascades to 4 and the adjust the distribution exponent to be a lower value. This will adjust how the cascades are distributed. Smaller values allow you to retain more detailed quality further away, but sacrifice some of the quality when closer to the camera. You need to find a good balance that works.
I hope this helps.
Tim
Hi Tim,
thank you very much. I am using a template called “BP_LightStudio”, which appears to only have a SkyLight in it, and I can’t find the options you mentioned.
I will try to rebuild that template using a Directional Light Source and report back. Thanks again.
That’s Blueprint is probably not the best way to look and familiarize with how the Directional light works. The BP_LightStage is mostly meant for placing an actor and just using it more for showcasing than actual level development. The Sun in that is being added via the construction script which may not have some of the properties that are in the Direcitonal Light Source actor exposed that I was talking about in the initial reply.
Checking on a few of the nodes it does look they are exposed, but for best practice it would probably be more beneficial to check it out in a new or existing level by just adding a Directional Light actor and then once you know how the settings work go back in the BP_Lightstage, if you wish, and expose those as sliders to the BP for adjustment.
I’ve been trying to replace BP_LightStage with:
- Directional Light (static)
- SkyLight (for cubemap based lighting)
- Static Mesh SkySphere (to see the cubemap)
Is there a way to visualize the cubemap in the SkyLight itself, so that I can see its rotation? I’m asking because I had to rotate it in the material for the SkySphere.
Now… after replacing BP_LightStage with a directional light, I have this problem:
Do I have to replace all BSPs with static meshes?
The strange thing is… in the BP_StageLight I can’t even see a Directional Light… or is it hidden somewhere?
Seems like it had to do with the BSPs.
I just replaced a floor BSP with a static mesh and cranked up the lightmap resolution to 2K and now it looks much better.
Even at 4K lightmap resolution it looks a little “stepped” but, after all, it’s a 8x4m floor element, so I guess I have to set the lightmap resolution even higher to completely get rid of the steps on the shadow edges.
Or is there different setting I could tweak?
With BSPs they are a bit different than static meshes with their lightmap resolution. To get higher quality lightmap resolution with BSPs you need to go down in resolution value. As an example you can see the difference in my Wiki Lighting Troubleshooting Guide here.(You may have realized this, but just for clarity)
The biggest thing when looking at shadow resolution for what’s baked is considering how much UV space the UV island gets for the lightmap bake. In the example for the chair, it’s getting a higher lightmap bake at a lower resolution because it is it’s own mesh and get’s more space to store the lighting information in the texture. Whereas something like a large floor will loose resolution quality, even with extremely high lightmap resolutions, just because there isn’t enough space for its size to get a higher quality bake. For floor surfaces it’s better to break the mesh up into pieces that can be assembled to get the best bake and keep the Lightmap resolution lower.
So the main takeaway with this is that with lightmap bakes, it’s sometimes better to break the mesh up into smaller pieces for something like large ceilings, walls, and floors to get better lightmap bakes. A high resolution will not always save the light bake and make it perfect.
I wouldn’t recommend this for typical games, but if this is just archvis you can usually afford sacrificing a little bit of performance for better quality.
In the World Settings > Lightmass Settings > Uncheck Compress Lightmaps. This will give you the full resolution of them but it will increase the memory usage by 4x’s.
Thanks for the tips!
I’ll do exactly that. Create smaller static meshes.