Search Unity

ProBuilder emissive materials vs Lightmapper.

Discussion in 'Global Illumination' started by RegdayNull, Jun 18, 2019.

  1. RegdayNull

    RegdayNull

    Joined:
    Sep 28, 2015
    Posts:
    68
    Hi.
    Emission light from emissive objects created by ProBuilder and SabreCSG (so it's not ProBuilder only behavior) not get baked by lightmapper. Lightmap is completely black.
    Attenuation from any light sources works okay.
    With the same material a MeshRenderer with a box MeshFilter baked correctly.
    All meshes static, all settings are double checked.
    Does anybody know workaround or something?
     
  2. kristijonas_unity

    kristijonas_unity

    Unity Technologies

    Joined:
    Feb 8, 2018
    Posts:
    1,080
    Which render pipeline are you using? If you happen to use LWRP, the issue with emissive materials not baking has been fixed in LWRP package 6.7.1.
     
  3. RegdayNull

    RegdayNull

    Joined:
    Sep 28, 2015
    Posts:
    68
    I am using custom RP (neither HDRP or LWRP). But i've tested with stanard pipeline - baked correctly. So you are right, it's my render pipeline broken. Should to check that earlier. Can you suggest a direction, where I should go to find solution? Custom editor for shader already adding MaterialGlobalIlluminationFlags.BakedEmissive.
     
  4. RegdayNull

    RegdayNull

    Joined:
    Sep 28, 2015
    Posts:
    68
    Nvm, I've found the solution. Not pipeline, but MetaPass of shader was broken. "Cull Off" in MetaPass did the trick. But thanks for direction. Solution was found in LWRP commit, fixing same problem.
     
    kristijonas_unity likes this.