Giter Site home page Giter Site logo

LightMaps are Misplaced about prefablightmapping HOT 22 OPEN

ayfel avatar ayfel commented on July 1, 2024
LightMaps are Misplaced

from prefablightmapping.

Comments (22)

Ayfel avatar Ayfel commented on July 1, 2024

Does your instantiating as prefab work when you make a build? It does sound like the shader stripping (look at ReadMe) or some setting in your project. Let me know.

from prefablightmapping.

sagarmicronixsystem avatar sagarmicronixsystem commented on July 1, 2024

No i have check it they are not working in builds if i instantiate that prefab , they are just working in editor after baked prefablightmap i am building it for windows

from prefablightmapping.

Ayfel avatar Ayfel commented on July 1, 2024

Cool, so that means it is just your settings, once you fix those it will be fine. Check the readme for the stripping modes

from prefablightmapping.

sagarmicronixsystem avatar sagarmicronixsystem commented on July 1, 2024

tried messing with lightmap modes to custom but not worked

from prefablightmapping.

Ayfel avatar Ayfel commented on July 1, 2024

Does you prefab still have the static flag on?

from prefablightmapping.

sagarmicronixsystem avatar sagarmicronixsystem commented on July 1, 2024

after building lightmap should i remove all flags?
i am just keeping batching static of

from prefablightmapping.

Ayfel avatar Ayfel commented on July 1, 2024

If you leave the batching static flag it will combine meshes and mess the UVs, that's the only one you should be careful with

from prefablightmapping.

sagarmicronixsystem avatar sagarmicronixsystem commented on July 1, 2024

what should i do should i keep batching static flag on or off

from prefablightmapping.

Ayfel avatar Ayfel commented on July 1, 2024

You should turn it off so it doesn't combine meshes together. Let me know if that fixes it since it still might be something else

from prefablightmapping.

sagarmicronixsystem avatar sagarmicronixsystem commented on July 1, 2024

i have tried in that way too nothing works

from prefablightmapping.

sagarmicronixsystem avatar sagarmicronixsystem commented on July 1, 2024

Should i share my URP with you so that you can test it....

from prefablightmapping.

sagarmicronixsystem avatar sagarmicronixsystem commented on July 1, 2024

its just a simple test project with some baked cubes from probuilder

from prefablightmapping.

sagarmicronixsystem avatar sagarmicronixsystem commented on July 1, 2024

i have made a test on very small project
the same project works in standard pipeline very well no issues in build
but not working Properly in URP
tried messing with all settings no luck

from prefablightmapping.

Ayfel avatar Ayfel commented on July 1, 2024

You need to bake (as in create actual meshes and not dynamic meshes, not bake as in lighting) your probuilder meshes or you will have issues in builds. It is a known issue with probuilder (maybe just in URP though).

Did you try including your prefabs inside your scene? In some cases this has shown if the issue persists.

Feel free to send me the test. I have done tests myself with URP and no problems so I would suspect is the probuilder assets

from prefablightmapping.

sagarmicronixsystem avatar sagarmicronixsystem commented on July 1, 2024

okay i have created one new simple scene with one plane one cube and one point light using default unity objevcts it works well for them . my question is should my mesh have separate uv channel for lightmapping because unity generate lightmap uvs dont work properly with this script for the external objects as i think so..................

from prefablightmapping.

Ayfel avatar Ayfel commented on July 1, 2024

I use generated lightmap uvs from unity all the time, that makes no difference for the script or the lightmaps. What I understood was that you were using probuilder meshes which will have issues, but if you transform them down to regular meshes it should be ok

from prefablightmapping.

sagarmicronixsystem avatar sagarmicronixsystem commented on July 1, 2024

i have exported that mesh and after that tried
generate lightmaps uv but that case doesnt work for me.......

from prefablightmapping.

Ayfel avatar Ayfel commented on July 1, 2024

Can you share the mesh thats giving you issues?

from prefablightmapping.

sagarmicronixsystem avatar sagarmicronixsystem commented on July 1, 2024

https://we.tl/t-sPjcixnOfA

there are 2 meshes i also provided texture just check once if they works fine for you

from prefablightmapping.

sagarmicronixsystem avatar sagarmicronixsystem commented on July 1, 2024

this meshes aRE EXPORTED FROM PROBUILDER

from prefablightmapping.

meedo2009 avatar meedo2009 commented on July 1, 2024

You need to bake (as in create actual meshes and not dynamic meshes, not bake as in lighting) your probuilder meshes or you will have issues in builds. It is a known issue with probuilder (maybe just in URP though).

Did you try including your prefabs inside your scene? In some cases this has shown if the issue persists.

Feel free to send me the test. I have done tests myself with URP and no problems so I would suspect is the probuilder assets

hey, how do i bake probuilder meshes, does that mean i have to not use probuilder at all?

from prefablightmapping.

Ayfel avatar Ayfel commented on July 1, 2024

You just need to use the "Export" to save the mesh/3d object in your project so its not a dynamic "probuilder" object and UVs are proper and good for this to work. Otherwise probuilder won't save properly to the prefabs you create.

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.