Search Unity

Bug Lightmaps go weird when using some meshes

Discussion in 'Global Illumination' started by BruceKristelijn, Nov 14, 2022.

  1. BruceKristelijn

    BruceKristelijn

    Joined:
    Apr 28, 2017
    Posts:
    107
    Hi there!

    So I am using these meshes generated from the following asset. But I baked the meshes and generated a lightmap using different meshed in the same scene. But when I include these meshes my lightmaps go all weird:
    upload_2022-11-14_23-40-22.png
    But when I bake the lighting without these meshes active i get a somewhat workable result.
    upload_2022-11-14_23-42-49.png

    I converted one generated rock from .asset mesh to FBX and it resulted in the following: Download
    I feel like this could be entirely on the asset but I have the feeling I am handling the mesh wrong. One mesh shouldn't cause this many trouble right?
     
  2. kristijonas_unity

    kristijonas_unity

    Unity Technologies

    Joined:
    Feb 8, 2018
    Posts:
    1,080
    I don't know how that asset generator works, but it is entirely possible for an object to negatively influence lightmaps in such way. The asset in question might have open faces that cause invalid texel artifacts. Or perhaps, it might contain some geometry that is not supported by the lightmapper.
    Since you have the asset on hand, please report a bug so that we could investigate.
     
    BruceKristelijn likes this.
  3. BruceKristelijn

    BruceKristelijn

    Joined:
    Apr 28, 2017
    Posts:
    107
    Will submit, is there some processing I can do on the mesh to make it suitable for lightmapping?
     
  4. kristijonas_unity

    kristijonas_unity

    Unity Technologies

    Joined:
    Feb 8, 2018
    Posts:
    1,080
    I suppose the most straightforward thing to do would be to export the mesh as a .fbx file, and tweak it in a DCC tool, such as Maya, Blender, or 3ds max. You'd want to make sure that you have no open faces, and properly authored lightmap UVs. Check out these chapters in the troubleshooting guide for assistance:
     
  5. kibrituss

    kibrituss

    Joined:
    Aug 15, 2021
    Posts:
    2
    baking light must be end of possess, if you add new mesh after baking the light, yes it should be weird because it takes data from the scene whatever includes... Fist step create all your asses that you need in your scene. second step add lights where ever you want to place them.. last step bake the light..
    sincerely.

    World's most power full Cloud Render Farm Kibrit Creative Solutions
     
  6. BruceKristelijn

    BruceKristelijn

    Joined:
    Apr 28, 2017
    Posts:
    107
    My issues occured after every clean bake so that is not the issue. I managed to fix it however by creating a new scene sith complete new lighting settings
     
    kibrituss likes this.