Comments (13)
Is it just the scale that causes the issue?, if you set a different scale things work well?
Just to make sure, the lightmap is being applied in the build just not properly? (as in the lightmaps shaders are not stripped in the build , look in the readme).
Also can you reproduce it with a different object? let's say a cube at scale 100 as well?
from prefablightmapping.
Thanks for your quick reply.
-
Yes at scale 1 object is lit correctly (after changing lights to fit scale 1)
-
Yes checked your readme and have tried various Custom settings for lightmap shader stripping. I can see the lightmap on the object (it just doesn't look right).
-
I've tried a simpler object and can reproduce as well at scale 100 with slightly different behaviour. Lighting looks different than in editor still but looks almost just like ambient lighting. Whereas my other object you could see the incorrect mapping.
I'm trying a few different things with other light types and scales.
from prefablightmapping.
Ok thanks for the info. One last question, this only happens on a build correct? Meaning that in the editor everything looks correct in play mode?
It would be interesting if you could share some pics or a repo project for me to look at too.
Also I wonder if this happens regardless if you try simply lightmapping normally with Unity...
from prefablightmapping.
Yes only in build, in play mode it looks good regardless of scale and even in another scene.
Actually even at scale one with the other object it still doesn't look the same (think it was false hope) on iOS.
So I think it's an iOS build issue. I've just generated lighting normally with Unity and that's fine. Strange!
from prefablightmapping.
mmm, this definitely sounds like an IOS build issue, try doing uncompressed lightmaps, but it is very strange since you mention that you baked normally with unity and it worked. Let me know if you can provide a repo for me to check
from prefablightmapping.
Yes these are uncompressed. I think we didn't have this issue in 2019.2 and LWRP 6.9.2 but I will confirm as well.
I will try sort a demo scene for tomorrow.
from prefablightmapping.
Another note, I can make the editor and iOS behave the same by applying a scale to the lightmap scale parameter. Not sure why...
from prefablightmapping.
I've now duplicated behaviour in editor by having a duplicate of the model in the scene. I'm going to try replicate this in the sample scene.
from prefablightmapping.
Okay I've found a workaround setup. For the baking side we had to have the original FBX for the model in the scene we're baking, marked as static but without the script. We were original trying to bake onto a prefab that had that fbx in it. Secondly we had to include the scene that it was baked in, in the build settings. Not sure if this was required before as we didn't do it but it seems obvious given it has the lighting data in it.
from prefablightmapping.
I am glad you found a workaround. I would still like to understand and reproduce the issue in case there is something off. Did you figure out if this was something only happening in the newest 2019.3?
Including the scene in the build would make those stripping shaders to always be included, that's what it sounds like at least.
from prefablightmapping.
Yes I agree, I'll working on getting two sample projects for this in both Unity Versions.
from prefablightmapping.
Awesome, thank you
from prefablightmapping.
I have now tested this on URP in 2020.3.5f1 at different scales and in different devices and I cannot seem to reproduce, also in HDRP. Closing for now
from prefablightmapping.
Related Issues (20)
- Baking lightmaps break decals until affected materials are Reimported. HOT 2
- Clarification of Light Probes HOT 4
- 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
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.