Contribute GI via Light Probes

The objects I have selected to Contribute GI via Light Probes the baking system still creates a lightmap for them. I think this is a waste. Is there any way to disable to render lightmaps for these objects?

1 Like

Hi there, if you have a renderer with Contribute Global Illumination enabled and Receive Global Illumination set to Light Probes, you shouldn’t be seeing a lightmap for it. To clarify, is that the behavior you are seeing? And could you post a screenshot of the inspector for your renderer if so?

Hi. I just cleared the cache, lightmaps and baked again to be sure.

I selected set Receive Global Illumination via Light Probes

But when I switch it to LightMap it shows a lightmap:

I don’t want to bake any lightmap for the objects I set to Receive GI via LightProbes

As it says here: Static Lighting with Light Probes | Unity Blog

With this newly available functionality in Unity, optimizing away problematic small objects and thin objects is straightforward: Simply set the Receive Global Illumination field on Mesh Renderers to Light Probes. With this setting, the objects will no longer take up space in your lightmaps, meaning these texels will no longer make the lightmapper busy unnecessarily.
A key beneficial side effect of using Light Probes is that they don’t need proper UVs, which can be time-consuming to unwrap. If you have a dynamic object that looks great with Light Probes but that never actually moves, rotates, or is otherwise modified, you can now choose to flag it with Contribute Global Illumination. The object can then influence surrounding lightmapped objects without increasing the bake time. This speed means an increase in productivity while reducing memory usage.

1 Like

Could you please click on the Open Preview button, and make sure that the object in question is there? Its wireframe should appear as yellow if it has space allocated to it in the lightmap.

Also, is Auto Generate enabled? If it is, changing Receive Global Illumination enum will rebake your lightmaps.

I don’t get your point

The preview:

Auto Generate is not enable.

My question is why these objects get a lightmap when I have set them to receive GI via Light Probes?

And just to make sure, you baked your scene while the renderer had Receive Global Illumination set to Light Probes, right? If that is the case, I’d consider this a bug, and suggest you file a bug report.

Yes, I cleaned every lightmap, check that the object didn’t have one and then rebaked with Receive GI set to Light Probe. After baking it was there.

I can confirm this still happens in 2022.2.3f1. Setting Receive Global Illumination to Light Probes still creates a lightmap for that mesh. Setting Scale in Lightmap to 0 fixes this, but then the mesh does not contribute to GI at all, neither to other meshes nor to light probes.

My Lighting settings:

In this example, I’m using cube objects to block light in specific areas (LightBlockers). Obviously these objects don’t need lighmaps as they won’t appear in the scene, but I still want them to affect the GI for the other static objects and light probes. But this only happens when they have Lightmap selected in Receive Global Illumination and more than 0 in Scale in Lightmap.

9158390--1273898--upload_2023-7-19_22-29-30.png9158390--1273901--upload_2023-7-19_22-29-36.png
Light Probe with LighBlocker`s Scale in Lightmap set to .01 (left) and 0 (right)

According to your Lighting settings, you’re using Realtime Global Illumination (Enlighten). Not light probes.

According to the documentation, they should work together (and they are, as you can see on the first image where the probe is getting darkened by the LightBlocker object)