Search Unity

Question Light baking removes transparency?

Discussion in 'Global Illumination' started by snowcult, Jan 22, 2021.

  1. snowcult

    snowcult

    Joined:
    Feb 6, 2014
    Posts:
    295
    I have some curtains set up to be semi-transparent and let some light through.


    When I bake the lighting, however, the curtains go back to being opaque.


    what am I doing wrong?
     
  2. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,791
    Baked lighting doesn’t support any sort of baked translucency or SSS, even though it’s doable since these are not view dependent effects.

    AFAIK nothing you can do.
     
  3. snowcult

    snowcult

    Joined:
    Feb 6, 2014
    Posts:
    295
    actually mixed fixed my issues and it'll do the job
     
  4. thefranke

    thefranke

    Unity Technologies

    Joined:
    Jun 20, 2015
    Posts:
    153
    That's not quite correct: You can have baked translucency, albeit it's not entirely obvious. You need to define a custom shader with the _TransparencyLM keyword, which defines a texture that is used to lookup and modulate the color of light passing through the renderer. Here's a template shader.

    Here are some ancient pictures I made.
     
  5. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,791
    That's transparency.

    I said SSS / Translucency, although I realize the meaning of translucency is kinda nebulous in graphics, so just ignore it and imagine I said just SSS (so the backside of the mesh would get some diffuse light that was simulated as going through the material) <- which isn't quite the same as just coloring the light that passes through a surface.
     
  6. Beauque

    Beauque

    Joined:
    Mar 7, 2017
    Posts:
    61
    I would like to replace the _TransparencyLM texture by some color value (from base map and base color for example) in a custom URP shader, but I can't figure out how to do this. Is it even possible ?