Giter Site home page Giter Site logo

Comments (10)

Ayfel avatar Ayfel commented on July 22, 2024

You can simply move your lightmapped textures after each bake, they don't need to be in the default folder unity puts them (which is why you are losing them I think), and that is all you need to be able to light your prefabs. So baking and moving the textures should be good for your usecase.

from prefablightmapping.

dimbodek avatar dimbodek commented on July 22, 2024

Beside textures unity also generates lightmapping data asset which some how also involve on shading visual and only one such asset can be applied to scene, so this is reason why i can bake separete prefabs.

from prefablightmapping.

dimbodek avatar dimbodek commented on July 22, 2024

Bakary do not generate such asset, i think it's just different lightning models, but unity does after each bake and such asset can be applied only to scene

from prefablightmapping.

Ayfel avatar Ayfel commented on July 22, 2024

The lightmap data asset is not used by this code at all, its only used by Unity "while" baking and in the settings. This script only references the lightmap textures when instantiating, etc. So simply moving them in your assets like I mentioned before should fix your issues.

from prefablightmapping.

dimbodek avatar dimbodek commented on July 22, 2024

unity uses lightmap data asset in play mode too, without it - shading looking another

from prefablightmapping.

Ayfel avatar Ayfel commented on July 22, 2024

This script (PrefabLightmapData.cs) doesn't, so I am not sure what your point is. I am going to close the thread as clearly there is not a bug or an issue and we are just discussing a point that is not relevant to the functionality of the code in this repo.

Here is the documentation so you can read about it https://docs.unity3d.com/Manual/LightmapSnapshot.html the only thing that the lightmap data asset has extra is information on probes, which are not supported in this script (although there is an alternative way we provide in LightProbeRuntime.cs to use them)

from prefablightmapping.

dimbodek avatar dimbodek commented on July 22, 2024

1
2
with assets and without, is shoud this plugin handle this in some way? you can see that light map asset affects on png lightmap and make it darker, in both screens same lightmap img, may be it's does gamma corection, i do not know

from prefablightmapping.

Ayfel avatar Ayfel commented on July 22, 2024

That looks like a real time light affecting the prefab or the scene environment lighting, etc.

from prefablightmapping.

dimbodek avatar dimbodek commented on July 22, 2024

yep, you are right, when remove this asset unity starts applyed mixed subtractive light(which i used for bake) like realtime directional, sorry i have't find normal docs about this lighting asset and i'am confusing what is it real does, now i see that it save information about mixed lights which was used for bake.

from prefablightmapping.

dimbodek avatar dimbodek commented on July 22, 2024

it's little bit distracted that when u use baked prefabs in another scene, unity applies mixed subtractive lights to them

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.