Comments (20)
Check the readme about the shader stripping etc as this is the most common cause for what you describe.
from prefablightmapping.
I tried changing the shader stripping to custom but the issue persists...any other ideas or suggestions?
from prefablightmapping.
Can you share a picture of what it looks like? (to check if its a wrong application of the lightmap or something else) Also what Unity version, light mode and render pipeline are you using?
Also changing to Custom are you including all modes?
from prefablightmapping.
This is what it looks like in browser
And this is what it looks like in editor
from prefablightmapping.
Using Unity 2020.3.18f1
We have a core app using Unity3D (testing in editor) and the asset bundles we're building from a template file we created in a URP project, but we deleted the URP pipeline settings so everything is using standard shaders in the prefab.
These are the settings in our prefab assetbundle file:
Our core app is set up to load the assetbundle prefabs over the web
from prefablightmapping.
Yes that definitely looks like the lightmaps are not being applied. Can you share a picture of your graphics settings under Project Settings? And also have you tried just putting that prefab by hand in a scene after play mode? That looks like the light is baked regularly and is not in play mode (I also notice that it looks like nested prefabs which don't work great, better to have a top prefab for this baking).
Also I recommend removing the static flag from the prefabs after having baked them, so they don't get distorted in play mode (because of mesh batching etc)
from prefablightmapping.
Here are the graphics settings:
from prefablightmapping.
And yeah this is in play mode:
from prefablightmapping.
I just tried moving the floor meshes directly under the root "Space" and re-baking. Then changed all meshes back to not-static, but having the same issue.
from prefablightmapping.
Are you baking directly from the menu of the Script or just normally?
from prefablightmapping.
I just ran a test baking directly from the menu of the script...it's just Assets-Bake Prefab Lightmaps, right?
from prefablightmapping.
Could it be something with WebGL needing lightmaps to be Non-Directional? Is there a way to specify that in your script settings?
from prefablightmapping.
Also - idk if you're free but I'm on discord if it's easier to hop on a quick call / screenshare: https://discord.gg/Ad7hBzCqwV
from prefablightmapping.
Yes, can you show me the object with the script that is the prefab? I am looking for the lightmap information in the script. Also did you try making it not a nested prefab?
from prefablightmapping.
Yep! The top level prefab "Space" has the script on it:
And yes, I un-nested all of those planes (and the point light) to place them directly under Space
from prefablightmapping.
Did you solve this problem ?
I have exactly same situation
from prefablightmapping.
I'll need to do a test myself, I will report back once I have checked webgl
from prefablightmapping.
Yep! The top level prefab "Space" has the script on it:
And yes, I un-nested all of those planes (and the point light) to place them directly under Space
Did you try without assetbundles? Not that it should make a difference but just trying to gather info
from prefablightmapping.
I just tested in Unity 2020.3.5 with URP (and without) and in WebGL and it is working fine
from prefablightmapping.
When using AssetBundles you need to be careful that the project that creates the assetbundle has the same settings for the lightmaps as the one that opens it, specially this
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.