Open LethalHonor opened 3 years ago
Does it bake other shadows? I see some shadows in that asset and some others that are missing. What are your lighting settings?
Hello there!
Not, it doesn't bake any shadows at all. The shadows you see are black sprites we use to simulate shadows. For example, this is the scene with no light baking:
This is after Asset - Bake prefab lightmap:
Then, if I remove the prefab from the scene and add it again, it should reload the lightmap info from the script but... it doesn't.
The PrefabLightmapData script in the prefab is filled and fine, but It seems not to apply the lightmap info when added to the scene or instantiated in-game:
More info:
Additional info for other scenes:
In other scenes, the lightmap script works for some lights, but it doesn't work (all lights are set exactly the same). Or maybe the problem is a misplacement?
For example: For an indoors scene If I bake the lights, I get this result:
But when I remove the prefab and add it again to the same scene (or instantiate in-game in real-time), I see this:
It looks like it has something to do with not getting the information right when it comes to loading the lightmap info...
These are the lighting settings for this scene:
Any ideas on how to proceed??
Thanks a lot!
First I recommend including the light in the prefab, just in case you don't already as the script should keep track of the lights in order to apply the mixed ones in the proper way. This is an issue of mixed lights mainly. Let me know if that solves your issue, otherwise we can look at it in a bit more detail and try to replicate the issue.
Another question for reference, what renderer pipeline are you using?
Hello there.
I have a problem with baking a prefab and I don't know how to proceed.
I have added the script to a prefab with some models and terrains. When the baking process is over, you can see the effect on the terrain: the objects cast shadows in the terrain.
But if I remove the prefab from the scene and add it again, it should show the same lightmapping as before, but in this case, they are removed:
If I play the game and instantiate that prefab in another scene (the purpose of the asset), the shadows are gone too.
What am I doing wrong? Thanks a lot for your time!!!