PrefabLightmapping icon indicating copy to clipboard operation
PrefabLightmapping copied to clipboard

Light probes?

Open adnanel opened this issue 3 years ago • 8 comments

Hello

I'm using this script for prefab lightmapping, and it works really well. But one thing that I noticed is that light probes don't seem to work in the instantiated prefab instances. However, in the scene where I bake my prefab, they work very well.

Is this a known issue/limitation? Any way to get them working?

adnanel avatar Aug 08 '21 14:08 adnanel

I have found a related issue https://github.com/Ayfel/PrefabLightmapping/issues/19 where this was discussed.

Any news on this script where probe lights are calculated at runtime?

adnanel avatar Aug 08 '21 15:08 adnanel

Hi , I have a version for lightprobes but I need to integrate it. Let me see if this week or next I can finish and include that in the project

Ayfel avatar Aug 09 '21 15:08 Ayfel

Hi,

We've just started using this tool as well and it's a lifesaver! I was wondering if you had any chance to work on getting the light probes to work with instantiated prefabs.

Thanks.

Delaquarix avatar Feb 22 '22 23:02 Delaquarix

I have a script for it, I think I might upload it on its own repo. But I will make an announcement here with what the "final" version of that is, hopefully very soon.

Ayfel avatar Feb 22 '22 23:02 Ayfel

Thanks for the swift response!

Delaquarix avatar Feb 22 '22 23:02 Delaquarix

We started to use the tool too. It's very helpful so any news about light probes? )

Apoll0 avatar Feb 25 '22 14:02 Apoll0

Any news about lightprobes support? )

Apoll0 avatar Mar 08 '22 07:03 Apoll0

Ok I am adding a new script to the repo, it works as follows:

-The only setup you need is to create light probes in the scene you will instantiate your rooms in and then do an "empty" bake in that scene. Then this script (LightProbeRuntime.cs) will be in that scene where you instantiate prefabs, and it will wait a frame to calculate the light volume contribution from the lights in the scene (so for this to work properly you need to have those lights be a part of the prefabs rooms/assets you bake, so this script finds the lights and adds their "would be" contribution to the probes). You can easily tweak this to call it at will if you prefer to recalculate probes at different times.

Ayfel avatar Mar 08 '22 16:03 Ayfel