Giter Site home page Giter Site logo

Comments (13)

Ayfel avatar Ayfel commented on July 19, 2024

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.

jacksandham-va avatar jacksandham-va commented on July 19, 2024

Thanks for your quick reply.

  1. Yes at scale 1 object is lit correctly (after changing lights to fit scale 1)

  2. 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).

  3. 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.

Ayfel avatar Ayfel commented on July 19, 2024

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.

jacksandham-va avatar jacksandham-va commented on July 19, 2024

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.

Ayfel avatar Ayfel commented on July 19, 2024

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.

jacksandham-va avatar jacksandham-va commented on July 19, 2024

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.

jacksandham-va avatar jacksandham-va commented on July 19, 2024

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.

jacksandham-va avatar jacksandham-va commented on July 19, 2024

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.

jacksandham-va avatar jacksandham-va commented on July 19, 2024

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.

Ayfel avatar Ayfel commented on July 19, 2024

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.

jacksandham-va avatar jacksandham-va commented on July 19, 2024

Yes I agree, I'll working on getting two sample projects for this in both Unity Versions.

from prefablightmapping.

Ayfel avatar Ayfel commented on July 19, 2024

Awesome, thank you

from prefablightmapping.

Ayfel avatar Ayfel commented on July 19, 2024

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)

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.