Giter Site home page Giter Site logo

Comments (12)

Ayfel avatar Ayfel commented on July 19, 2024

That looks like when an object it's set static and batching makes a combined mesh messes with uvs. Is this windows platform? Is there a way you can isolate this issue and instantiate the prefab in an isolated scene to test that in a build? Play mode works I assume? Last resort you could send me a repo project and I can check it

from prefablightmapping.

Pawlik12 avatar Pawlik12 commented on July 19, 2024

Thank you for fast reply!
So I used new models and saw few things:

  1. it bakes perfectly when there is just room and light in scene. (which obviously isn't possible to be used in game)
  2. "UV Overlap" displays that there is no overlap in scene with models before baking, but after baking there is a lot of overlapping stuff, and after putting prefab in different scene (it was only one in the other scene as I made a new one) there is again no overlap dispplayed

from prefablightmapping.

Pawlik12 avatar Pawlik12 commented on July 19, 2024

Also yes, this is windows build, and play mode works perfectly

from prefablightmapping.

Ayfel avatar Ayfel commented on July 19, 2024

Did you try to "generate lightmap uvs" from the fbx import settings? You can try there and see if it makes a difference. Also do you disable the static flag of the prefab objects after baking?

from prefablightmapping.

Pawlik12 avatar Pawlik12 commented on July 19, 2024

No, I don't disable it, and I used generate lightmap Uvs before, and there wasn't that much of a difference really

from prefablightmapping.

Ayfel avatar Ayfel commented on July 19, 2024

Disable the static flag, otherwise it will batch and mess up the uvs

from prefablightmapping.

Pawlik12 avatar Pawlik12 commented on July 19, 2024

Oh my god! Thank you! It fixes it! :D
I'm so sorry for trouble, and again thank you!

from prefablightmapping.

Ayfel avatar Ayfel commented on July 19, 2024

Great 😊 no problem

from prefablightmapping.

Pawlik12 avatar Pawlik12 commented on July 19, 2024

Hi! Sorry I know that you closed the thread, but that's the only way I know how to contact you, hah.
So my question is - do lightprobes work with lightmaps generated by your script?
Or maybe should they work? Cause our first attempt made each light in scene realtime instead of baked for some reason (but that might be fault of my friend), Anyway - on every other attempt the lightprobes don't react oon our players

from prefablightmapping.

Ayfel avatar Ayfel commented on July 19, 2024

Lightprobes cannot be baked in prefabs due to on how they work in Unity. However there is a method to have a functionality similar to that that I am working on adding to the project in the near future

from prefablightmapping.

Pawlik12 avatar Pawlik12 commented on July 19, 2024

So,.. do you have any ideas how could we light our models? Lightmapped prefabs would help us a lot, cause our maps are modular anyway, and now we just have black models walking around (it's a multiplayer game so we can't really bake everything, not players deffinitelly)

from prefablightmapping.

Ayfel avatar Ayfel commented on July 19, 2024

Try using mixed lights, with shadowmask baking mode or similar. then your light will shine only on non-static objects not part of your prefab. To do this properly make sure to include the lights as part of the prefabs you bake

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.