Giter Site home page Giter Site logo

Comments (20)

Ayfel avatar Ayfel commented on July 19, 2024

Check the readme about the shader stripping etc as this is the most common cause for what you describe.

from prefablightmapping.

justinmelillo avatar justinmelillo commented on July 19, 2024

I tried changing the shader stripping to custom but the issue persists...any other ideas or suggestions?

from prefablightmapping.

Ayfel avatar Ayfel commented on July 19, 2024

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.

justinmelillo avatar justinmelillo commented on July 19, 2024

image
This is what it looks like in browser

image
And this is what it looks like in editor

from prefablightmapping.

justinmelillo avatar justinmelillo commented on July 19, 2024

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:
image

Our core app is set up to load the assetbundle prefabs over the web

from prefablightmapping.

Ayfel avatar Ayfel commented on July 19, 2024

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.

justinmelillo avatar justinmelillo commented on July 19, 2024

Here are the graphics settings:
image
image

from prefablightmapping.

justinmelillo avatar justinmelillo commented on July 19, 2024

And yeah this is in play mode:
image

from prefablightmapping.

justinmelillo avatar justinmelillo commented on July 19, 2024

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.

Ayfel avatar Ayfel commented on July 19, 2024

Are you baking directly from the menu of the Script or just normally?

from prefablightmapping.

justinmelillo avatar justinmelillo commented on July 19, 2024

I just ran a test baking directly from the menu of the script...it's just Assets-Bake Prefab Lightmaps, right?

from prefablightmapping.

justinmelillo avatar justinmelillo commented on July 19, 2024

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.

justinmelillo avatar justinmelillo commented on July 19, 2024

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.

Ayfel avatar Ayfel commented on July 19, 2024

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.

justinmelillo avatar justinmelillo commented on July 19, 2024

Yep! The top level prefab "Space" has the script on it:
image

And yes, I un-nested all of those planes (and the point light) to place them directly under Space

from prefablightmapping.

dong6344 avatar dong6344 commented on July 19, 2024

Did you solve this problem ?
I have exactly same situation

from prefablightmapping.

Ayfel avatar Ayfel commented on July 19, 2024

I'll need to do a test myself, I will report back once I have checked webgl

from prefablightmapping.

Ayfel avatar Ayfel commented on July 19, 2024

Yep! The top level prefab "Space" has the script on it: image

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.

Ayfel avatar Ayfel commented on July 19, 2024

I just tested in Unity 2020.3.5 with URP (and without) and in WebGL and it is working fine
image

from prefablightmapping.

Ayfel avatar Ayfel commented on July 19, 2024

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
image

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.