Search Unity

Question UV charts on both sides of one-sided geometry

Discussion in 'Global Illumination' started by Wattosan, Aug 24, 2021.

  1. Wattosan

    Wattosan

    Joined:
    Mar 22, 2013
    Posts:
    460
    Hello,

    When debugging baked lighting I noticed that if I use the UV Charts mode in the Scene View then it also displays UV charts on the side of the object that under normal shading conditions is invisible (not rendered).

    I.e imagine you had a 1 sided plane, which was invisible on 1 side. If you bake the light and enable the UV chart view mode, it doesn't matter from which side you check the plane from, you can always see the charts, making the object look opaque from all sides.

    Is this expected behaviour or is it calculating the double amount of charts for these objects? I.e calculating even for sides, which are invisible?

    Unity version 2019.4.26f1.
     
  2. kristijonas_unity

    kristijonas_unity

    Unity Technologies

    Joined:
    Feb 8, 2018
    Posts:
    1,080
    Hello! Unity does not create charts for culled polygons. Only the ones with UVs present will receive allocated space in the lightmap atlas. You could verify this behavior by baking your one-sided object, and by inspecting the Baked Lightmaps tab in the Lighting window.

    UV Charts debug view mode has polygon culling disabled for preview purposes only.
     
    Last edited: Aug 25, 2021
    Wattosan likes this.
  3. Wattosan

    Wattosan

    Joined:
    Mar 22, 2013
    Posts:
    460
    Why are charts calculated for culled polygons? Wouldn't it make baking much faster in cases where meshes have 1 sided faces? Which I think is a very common case.
     
  4. kristijonas_unity

    kristijonas_unity

    Unity Technologies

    Joined:
    Feb 8, 2018
    Posts:
    1,080
    Unity does not create charts for culled polys. I have just noticed that I have omitted the ever important not in my original response (which I have now edited). Sorry about that!
     
    Wattosan likes this.
  5. Wattosan

    Wattosan

    Joined:
    Mar 22, 2013
    Posts:
    460
    Thanks!