Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

ProBuilder lightmapping issues

Discussion in 'World Building' started by Malicjusz, Jun 25, 2018.

  1. Malicjusz

    Malicjusz

    Joined:
    Jan 26, 2015
    Posts:
    26
    Unity 2018.1.6f1
    ProBuilder 2.9.8f3

    Repro:
    Create new Unity project and import ProBuilder.
    Set the project to linear color space.
    Create new scene. Set default directionl light to mixed and high intensity.
    Turn down environment lighting and reflections to zero to emphasize lack of lighting on some surfaces.
    Create plane and a box to sit on the plane using ProBuilder.
    Extrude a hole into the box to see bounced light working ok
    Mark ProBuilder objects as lightmap static (just mark them as entirely static)
    Wait for the lightmap to bake/click generate lighting

    Problem:
    ProBuilder objects are lightmapped incorrectly. Specifically it seems that direct light does not register on flat, upward facing surfaces.

    Image:


    Detailed description:
    I've been trying to make ProBuilder made objects lightmap correctly, but to no avail. When I generate UV2, horizontal planes do not seem to be lit by direct light - only bounced/ambient. When I turn off autogenerating UV2 in Unity ProBuilder preferences and try to bake light on a ProBuilder object without generated UV2, it has lighting artifacts.

    Lightmapping works correctly if I export the ProBuilder object to an fbx file and have Unity generate lightmapping UVs for it.
     

    Attached Files:

    karan-veer likes this.
  2. jilt

    jilt

    Joined:
    Nov 7, 2014
    Posts:
    49
    Have you tried the 'Generate UV2' button on the probuilder models before baking?
     
  3. Malicjusz

    Malicjusz

    Joined:
    Jan 26, 2015
    Posts:
    26
    Yes, it didnt help.
     
  4. Malicjusz

    Malicjusz

    Joined:
    Jan 26, 2015
    Posts:
    26
    Setting the lighting mode to "Subtractive" seems to help, but I'm not sure if it's supposed to be the only mode supported.
     
  5. yahodahan

    yahodahan

    Joined:
    Apr 26, 2009
    Posts:
    1,380
    Hi- can you update to the latest version of ProBuilder? Looks like you have the old Asset Store version, which is meant for Unity 2017. The newest version of ProBuilder are now on Package Manager for Unity 2018. To update:

    1) Open your project
    2) From the top menu, choose "Window > Package Manager"
    3) Click the "All" tab
    4) Find "ProBuilder" in the list, and click Install
    5) ProBuilder will install, automatically detect the existing Asset Store files, and then run through a few prompts for the complete upgrade (just follow those through)

    Hope that helps! :)
    -gw
     
    karan-veer and Malicjusz like this.
  6. Malicjusz

    Malicjusz

    Joined:
    Jan 26, 2015
    Posts:
    26
    yahodahan likes this.
  7. yahodahan

    yahodahan

    Joined:
    Apr 26, 2009
    Posts:
    1,380
    Awesome, hooray!
     
    Septitus, karan-veer and Malicjusz like this.
  8. karan-veer

    karan-veer

    Joined:
    Nov 2, 2017
    Posts:
    6
    Been getting UV overlapping issues and along with "heirarchyWindowChanged" is obsolete and all...hopefully this fixes it.