Baking Direct lighting?

Hi there,

From what I can tell, baking is only meant for indirect lighting, weather on HDRP or any other render pipeline?

Does HDRP bake direct lighting? Or is this not a thing because direct lights are very cheap to render already?

Thank you!
Dave

Cheap depends on whether or not shadows are cast from the DL, and updates in realtime or not, that’s where the expense is usually.

For your main question though, all lighting can be baked if you want.
All light sources, reflection sources, objects, shadows (2021+), can have mixes of direct or indirect lighting baked, which direction you choose for that largely depends on your projects scope and target hardware / resource limits/

For Direct Lighting, to switch it to baked
head to its inspector and change its mode
8454878--1121996--upload_2022-9-21_10-45-5.png

You can find out more about light mode here

1 Like

How does one bake direct lighting? The lighting tab for the scene only gives check boxes to bake indirect light.

Once your light source is set to baked, the lighting contribution of a light direct and indirect lighting is calculated into light maps.

if you bake a scene with a directional light set to baked and then after - move the light, you should see this.

Yes, but the baking does nothing at all, unless I check on “Baked Global Illumination”.

The thing is, my game doesn’t utilize GI due to its stylized lighting.

So when I hit bake without checking on “Baked Global Illumination”, nothing gets generated.

So it basically wont bake direct lighting unless I bake GI, is what the case seems to be.

Either my understanding is wrong about baking, or Unity just has a confusing lighting window?

BUMP: can anyone answer this part?

I guess you should look at some basic tutorial about lighting first.
If you want baked lighting, you need to bake lighting. That’s what baked GI is for. You can mix with real-time lighting. This is what mixed setting of lights is for.

I understand you can have baked GI… my question is, can you have baked direct lighting only? If you CAN, then why doesn’t that option present itself in the lighting window?

You can by having your direct lights set to baked and having 0 bounces for indirect.

1 Like

Thank you. That is a good idea. Will try this.