Search Unity

Sketchup models and Scale in Lightmap defaults

Discussion in 'Global Illumination' started by pablo102, Dec 6, 2018.

  1. pablo102

    pablo102

    Joined:
    Jul 19, 2012
    Posts:
    10
    Hi there,

    I am learning Unity to use it for architectural visualizations. I have building models saved as a sketchup files, imported to Unity. I want to keep the link live, to implement changes to the model when needed and reimport to Unity scene.
    Every time I reimport the Scale in Lightmap setting is reset to 1, overriding whatever settings I have set before.
    I wonder if there is a way to keep the scale as set in Unity after reimporting sketchup geometry?

    Thanks for help!
     
  2. kristijonas_unity

    kristijonas_unity

    Unity Technologies

    Joined:
    Feb 8, 2018
    Posts:
    1,080
    Hey! Creating a mesh prefab should help. Once you have your model imported and visible in your scene, select the said model in the Hierarchy panel and drag it into the Project window. This in turn should create a prefab with all your settings. More info about prefabs can be found here -
     
  3. pablo102

    pablo102

    Joined:
    Jul 19, 2012
    Posts:
    10
    Last edited: Dec 20, 2018
  4. pablo102

    pablo102

    Joined:
    Jul 19, 2012
    Posts:
    10
    My sketchup models are made out of simple boxes (a house would have around 500 boxes for walls, floors, ceilings, etc.) but they don't seem to react to the scene lighting the same way as 3d cubes created directly in Unity. They somehow don't receive bounced light. The walls are static, settings are attached and materials on the walls and a cube (on the right) is the same. What could be the reason?

     
  5. Stardog

    Stardog

    Joined:
    Jun 28, 2010
    Posts:
    1,913
    Go to your imported model and choose Generate Lightmap UV's.
     
  6. pablo102

    pablo102

    Joined:
    Jul 19, 2012
    Posts:
    10
    Generating lightmap in unity usually gives me a messy triangulation over many surfaces, (stiching seems doesn't help much):
    In sketchup all textures looks good, no triangulation there. I'm not sure what else can I do about it...


    Also, all the walls are one object, yet the baked lightmap (imported, not generated in unity) has a different resolution on different surfaces:


    And the lightmap preview looks like this:


    I would be very grateful for putting me on the right track :)
     
    Last edited: Dec 28, 2018
  7. Stardog

    Stardog

    Joined:
    Jun 28, 2010
    Posts:
    1,913
    The import settings look ok to me. It's possible that you have blank colors assigned to the mesh instead of textures inside Sketchup. I think that only textures will make proper UV's for the surface, but I'm not sure that affects lightmap UV's...

    The lightmap UV's look too low resolution. The grid texture should be very small. One grid space is like 1 pixel on the lightmap texture.