Giter Site home page Giter Site logo

Comments (3)

Ayfel avatar Ayfel commented on July 19, 2024

Does it bake other shadows? I see some shadows in that asset and some others that are missing. What are your lighting settings?

from prefablightmapping.

LethalHonor avatar LethalHonor commented on July 19, 2024

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:
LHE - 04 - Black sprites shadows - No baked

This is after Asset - Bake prefab lightmap:
LHE - 04-2 - Baked map

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.
LHE - 04-3 - Removed and added again - Not baked lights

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:
LHE - 04-4 - The info is fine

  • This is the lighting settings:
    LHE - 05 - Lighting settings

More info:

  • I have one specific scene for that prefab (called Lightmap_Combat_VS_02A)
  • The prefab is a GameObject with the PrefabLightmapData at its root.
  • There is only one directional light, static and set to mixed. There are other lights, also set to mixed.
  • All 3d elements are static and contribute to GI.

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:
LHE - 06 - Closed scene - Baked light

But when I remove the prefab and add it again to the same scene (or instantiate in-game in real-time), I see this:
LHE - 06 - Closed scene - Removed and then deleted - Not working some lights

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:
LHE - 07 - Indoors scene - Lighting settings

Any ideas on how to proceed??

Thanks a lot!

from prefablightmapping.

Ayfel avatar Ayfel commented on July 19, 2024

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?

from prefablightmapping.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.