Search Unity

Discussion I NEED HELP WITH LIGHTMAPS AND IMPORTED OBJECTS

Discussion in 'Global Illumination' started by criskywalker17, Nov 3, 2022.

  1. criskywalker17

    criskywalker17

    Joined:
    May 24, 2018
    Posts:
    5
    I am getting completely crazy with lightmaps and .fbx objets imported to the scene.

    I modelled a 3D object in Autodesk Fusion 360 which is a room where the avatar is going to walk through and whatever, it has like 18 objects in total. I exported from Fusion 360 to a .fbx file. Then, I imported that fbx into blender and I made the UV lightmap packs of every body like this.

    upload_2022-11-3_17-31-51.png

    I exported the resulting object and its lightmaps to another .fbx, which I imported into unity.

    In Unity I imported the .fbx and I generated the Lightmap UVs (I think that step was not necessary since I already did it in Blender but I tried also the other way and it was also S***), I applied the right materials to all the bodies and generated the lightmaps. The settings are:

    upload_2022-11-3_17-35-29.png

    The quality was S***, a lot of artifacts, so I mannually changed the lightmap compression to High Quality for all the lightmaps:
    upload_2022-11-3_17-37-23.png

    After changing the Compression to High Quality nothing changed, this is what I obtanied:

    upload_2022-11-3_17-38-36.png


    And when I play the scene looks completely horrible,

    upload_2022-11-3_17-41-36.png

    I have spent so many many many hours in this, it is exhausting, sorry if this has been explained in other page but I have not found anything, I have tried all.
     
  2. kristijonas_unity

    kristijonas_unity

    Unity Technologies

    Joined:
    Feb 8, 2018
    Posts:
    1,080
    For a complex object such as this one, you'd need to author lightmap UVs manually. Auto UVs will not cut it.
    Also, check out the troubleshooting guide if you haven't already.
     
  3. criskywalker17

    criskywalker17

    Joined:
    May 24, 2018
    Posts:
    5
    Thanks for the reply, how can I do that? after importing it to unity I create two UV maps in Blender for each of the bodies, the first one is a lightmap pack UV and the second one the object UV, getting also a very bad result... I also checked the troubleshooting guide and I could not fix the problem.
    I know this is a complex object but I have other simple objects with awful awful results, like this:
    upload_2022-11-9_15-8-2.png
    upload_2022-11-9_15-10-9.png
    The second one is a simple cylinder
    This is the lighmap of a completely flat wall:
    upload_2022-11-9_15-13-3.png
    There is a lot of weird things in the middle like random wrinkles and lumps.
    upload_2022-11-9_15-15-53.png

    This is the shaded view of a flat wall with a lot of random lumps:
    upload_2022-11-9_15-16-37.png
     
    Last edited: Nov 9, 2022
  4. kristijonas_unity

    kristijonas_unity

    Unity Technologies

    Joined:
    Feb 8, 2018
    Posts:
    1,080
    First UV channel (UV0) should be reserved for diffuse/albedo UVs. Overlaps are not a problem here.
    Second UV channel (UV0) should is used for lightmaps. You can't have overlapping UVs there. If you are supplying your own lightmap UVs authored in Blender, make sure to uncheck Generate Lightmap UVs in the Mesh Importer settings, otherwise Unity will overwrite them.
     
  5. criskywalker17

    criskywalker17

    Joined:
    May 24, 2018
    Posts:
    5
    No, Generate Lightmpat UVs in the Mesh importer is unchecked. Models were created in Fusion 360 of Autodesk, exported in FBX, can be this causing the problem? Why I have this result? The material applied to the walls and floor is a simple white material made in unity
     
  6. kristijonas_unity

    kristijonas_unity

    Unity Technologies

    Joined:
    Feb 8, 2018
    Posts:
    1,080
    If you are referring to seams in the lightmap, then you might have overlaps in your lightmap UVs, or not enough padding between them. If the issue is the blotchy artifacts, then please see my response in the other thread you've created.