Comments (10)
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.
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.
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.
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.
unity uses lightmap data asset in play mode too, without it - shading looking another
from prefablightmapping.
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.
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.
That looks like a real time light affecting the prefab or the scene environment lighting, etc.
from prefablightmapping.
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.
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)
- Light probes in Interior scenes HOT 1
- Baking lightning on a prefab overwrite other prefabs lightmaps HOT 2
- URP AssetBundle lighting corrupted HOT 5
- "IndexOutOfRangeException: Index was outside the bounds of the array." on MaterialPostprocessor. HOT 5
- As I bake new prefab the old lightmaps gets deleted even they are moved in separate folder
- About Android HOT 2
- Baked lighting is broken upon instantiating from Asset Bundle HOT 25
- Baked light probes
- Baked lighting doesn't work in the build version if Screen Space Shadows is enabled
- Lightmap breaks in the build on a single prefab HOT 1
- lightmaps in the build aren't mapped correctly HOT 2
- Not working on unity 2022.2.13 HOT 4
- I try to bake but it has already taken about 4 and half hours HOT 1
- Transparency in Build HOT 13
- Trying to set shader on a Material Variant HOT 3
- Lightmaps Too Bright on Android Bundle HOT 2
- Incorrect light maps being assigned on instantiation HOT 2
- Prefab only baking/loading one light HOT 1
- Normal maps not showing properly on instantiated prefab HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from prefablightmapping.