Comments (17)
Can you share your light settings? Baked shadows is one of the main applications of this, so maybe your light settings are not in the right setup. Do you get indirect lighting?
from prefablightmapping.
Sorry my bad. The question was wrong actually. It works for baked lightmaps. The issue is, there are patches over the object everytime I bake lightmap. In the editor, it looks fine. But when I take a build for my iPad, there are irregular shadows and black patches all over the object. I checked the closed issues and found out that disabling static flag will solve this issue. However, still this issue exists. Screenshots are below for your reference.
from prefablightmapping.
Things to check:
-check shader stripping the graphics settings (see the readme of this repo), this affects builds
-try with non compressed light maps
-make sure in the editor that instantiating these objects work fine
-If nothing works I would recommend going as far as creating a scene with instantiated objecs just for testing in device to eliminate the possibility that there is something else in your project affecting the lighting (I see you are in AR so doing a non AR scene with the prefabs simply to check)
from prefablightmapping.
- Tried the shader stripping in both custom and automatic. No luck !
- Tried uncompressed and compressed lightmaps. Both didn't work
- Created a new scene to instantiate the same prefab in the editor. Worked fine.
- Tried the same scene in the build, but didn't work. Screenshots below,
First image is taken from my iPad. I cleared the bake data and reset my lighting tab settings and tried this. Still didn't work.
from prefablightmapping.
Thanks for doing those. What Unity version are you at? Can you send me a minimal project to check? Just that simple scene and prefab and I can check the issue.
from prefablightmapping.
Thanks for doing those. What Unity version are you at? Can you send me a minimal project to check? Just that simple scene and prefab and I can check the issue.
Sure. I will share you the link. I guess I have to share you the entire project, so that you can have a look at the graphics and lighting settings. Is that ok?
from prefablightmapping.
Sure no problem
from prefablightmapping.
Here is the link to the entire project. This is a temporary link, so download it as soon as possible. I am using Unity 2019.4.10f1.
Xcode version 12.3. If you need any other information, let me know. Thank you for your help in this.
from prefablightmapping.
Ok I got it, but what scene am I checking? There is one called PrefabTest but it doesn't instantiate anything
from prefablightmapping.
Also
I noticed that your chair and table prefabs are disconnected (the one in the scene you had and the one in your Assets have different lighting data so that might be messing with it). I recommend substituting the one in Assets with the one in your scene that works. Drag and drop from the scene into the assets prefab and substitute the prefab, if you are instantiating the prefab in assets that had the wrong data
from prefablightmapping.
Sorry. The scene that we have to check is 'FurnitureAR'. Also, the scene 'PrefabTest' is having a button at the left corner to instantiate the prefab.
I checked the prefabs again. It was rightly pointing at the lightmap data. So, to double check this, i did the following.
- Cleared the baked data of the scene 'FurnitureAR'
- Clicked on the Assets>>Bake Prefab Lightmaps.
- After baking is complete, got the new Baked lighting data and automatically assigned them to the prefab.
- Created a new original prefab by dragging and dropping the existing prefab in the scene hierarchy to the assets folder. Assigned those new prefabs to the instantiate script.
- Built and checked. No luck :(
from prefablightmapping.
I am on a trip right now, but I will check when I get back to my pc. I might need to build to IOS to confirm, but I will get back to you if you haven't fixed it by then
from prefablightmapping.
I am on a trip right now, but I will check when I get back to my pc. I might need to build to IOS to confirm, but I will get back to you if you haven't fixed it by then
Sure. Thank you so much :)
from prefablightmapping.
Update: Tried with a different model, to check if the issue is with uv of the model. Still having issue with the new model. Created an empty scene, didn't bake light for the new scene and used the existing prefab. Issue still exists.
from prefablightmapping.
Ok so I have reproduced this issue succesfully in Android. Now the funny part, if I have those two models in the scene already then there is no issue and lighting works properly, also with any new models that I place after
I wonder if there is something funny in those URP shaders...
from prefablightmapping.
I have the feeling its related to URP , looks at this other issue #9
from prefablightmapping.
A very simple workaround seems to be to include those objects in your scene (enabled) really far away or super small. That solves it. Not a permanent solution but that will make it work for now. Still trying to figure it out.
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.