I am attempting to make indoor levels with dark lighting. I decided to use ProBuilder for prototyping the level. So I have made a cube, scaled that cube accordingly so it has a size of a room, flipped normals and cut out piece of a roof to get some light inside. And then of course marked the room as static since I want to save some performance by using baked lights as much as possible.
Then I removed directional light from the scene because it felt better without it for my purposes and then set Enviromental Lighting to Ambient Color.
And after baking the lights, I immediately saw strange artefacts (banding?) in the areas, where the light is becoming very dark. It feels like resolution of lightmaps is extremely low.
I tried to experiment with light settings… I tried to set Lightmap resolution, padding, indirect samples, lightmap size and other settings to huge values but nothing really helped. I basically touched everything in lighting settings but without a success.
My guess is that problem is with scaling of the lightmap. In the second image, I added a small cube to the scene … artefacts are much smaller on the cube but it still looks very ugly. But I cant find a way to increase resolution of a lightmap per object to test it out.
I also tried both Forward and Deffered render modes, enabling HDR on the camera and setting color space to linear. Nothing helped.
Out of curiousity I added another light source to the scene - sphere with emissive material but result was also extremely poor so I guess its related issue.
(btw: I know that banding (if this even is a banding) can be reduced by using Dithering in Post processing but the resulting noise is very visible in dark scene and I dont even think that its the correct solution for my problem)
Can someone help me please ? Lighting is still quite mysterious to me.
If you need any additional info about my settings, let me know.
I increased Indirect Samples up to 6000, it took 10 minutes to bake the scene and it barely helped… I just cant believe that I would have to bake such a simple scene for hours just to get one decent light. There has to be something obvious that Iam missing.
Have you tryed to remove compression on the lightmaps? Also we don’t have yet importance sampling for emissive surfaces using area light is gonna be better for the same sample count.
I am starting to think that it might not be problem with lights or lightmapping but with camera/quality/graphics settings ???
But as I said, I tried to use both Deffered and Forward rendering path, enabling and disabling HDR on camera and in quality settings I am using that “Ultra” preset
If you happen to see banding in your lightmaps, then this is due to lightmap texture compression. Seeing that you have Compress Lightmaps flag unchecked, I don’t think this is the problem your are experiencing.
The banding that you are seeing is simply a 8bit per channel limitation in realtime rendering. All game engines suffer from this. This issue becomes more apparent in dark backgrounds, as you have experienced yourself.
You seem to have found the solution to your problem in your original post. Dithering is the best way to solve this issue. Unity’s Post Processing Stack comes with dithering in-built, so there’s no need to look for custom solutions.
As I said, I tried dithering before and I didn’t liked the noise it was producing but it was older version of Post Processing stack from asset store. Then I tried newer version from Package manager. But to my surprise, dithering option wasnt even there. Later I realized that dithering is turned on by default there (without option to turn it off apparently (but guess its a good thing anyway)). And I think that they somehow improved that dithering because it looks much better now.
So Iam finally happy with the results.
Also thank you @kristijonas_unity for the link. I will definitely read it. I can also recommend this great video from GDC conference, where authors of INSIDE are talking (among other interesting subjects) about dithering as well