Jesper Green Jensen
Jesper Green Jensen

Reputation: 75

Unity 3D - Baked light is too dark

So I am baking Subtractive light in my VR build. I have the models set to static, generated UV's for all of them and played a lot with the lighting settings.

The problem is that the sigle baked directional light looks too dark and "burnt" after baking.

How can I keep the brightness of the pre-baked scene after baking?

Posting images of before/after baking and settings below:

enter image description here

enter image description here

enter image description here

Upvotes: 1

Views: 19847

Answers (5)

Liam Blah
Liam Blah

Reputation: 1

Since you are using Directional Light, Try adding a Bakery Skylight into your scene. That fixed the burnt shadows problem for me after baking. Shadows are more lighter now.

Upvotes: 0

Talisman Skulls
Talisman Skulls

Reputation: 31

Change Direct Samples to 32, Indirect samples to 512, Environment size to 256, and change lightmap size from 512 to 1040. Make sure also that any emission materials are changed from Realtime to Baked along with of course having such objects set to static. That should take care of some of the lighting and illumination issues. Also double check that these materials are all checked for GPU instancing.

Upvotes: 0

Simon Edis
Simon Edis

Reputation: 9

Another option is to create a copy of your directional light so that you have two directional lights in your scene. Then assign one light mode to 'Realtime' and adjust the intensity to get the scene brightness looking the way you want and assign the other light mode to 'Baked' and change the intensity to get the baked shadows looking better.

Upvotes: 0

Tomasz Juszczak
Tomasz Juszczak

Reputation: 2340

Baked light should always be the same (or better) brightness under direct lighting conditions.

There can be a multitude of issues in your scene, and why it's giving you this effect.

Please check the following in this order:

  1. Does your models have proper UV maps
  2. Does your models have enough scale in lightmap (small lightmaps can create faulty shadow effects)
  3. Does your scene has enough reflection probes for indirect lighting (not enough light from the shadowed side can "shadow" the lit side.
  4. Do you have ambient occlusion enabled? Maybe you need to fiddle with the values there.
  5. From experience "Baked Indirect" gives better results than "Subtractive"
  6. Are your settings in URP or HRDP or LRP are correct?
  7. Is your "Sun" the right brightness?

What you should expect with "good settings" enter image description here

Example lighting settings that the result above were achieved: enter image description here

Upvotes: 0

Aviuss
Aviuss

Reputation: 26

To increase the brightness of shadow you can change "Intensity" parameter in your directional light settings. This "burnt" effect looks kinda pixelated so to fix this you could in your lightmapping settings increace lightmap resolution or lightmap size. If it didn't help, you could increase "scale in lightmap" in mesh renderer.

Upvotes: 1

Related Questions