Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Baking lightmap with transparency shaders

Discussion in 'Global Illumination' started by RyuMaster, May 24, 2015.

  1. RyuMaster

    RyuMaster

    Joined:
    Sep 13, 2010
    Posts:
    468
    Inside Unity 4, I had scene with the room, which had roof with transparency texture. I had directional light on top of the room.After baking, the light properly took transparency texture into account, and fall into the room. Without transparency, no light could pass, and room stayed black.


    In Unity 5, I can't get it working. Sky abmient light passes through geometry, nothing helps. Even making material 2 sided. If I remove that light completely, and add just directional/spot/area/point light, it lights the room ins the same manner, i.e ignores geometry and transparency texture, acting as walls are 'transparent'. What is going on? No matter what I do, I can not replicate simple setup setup from Unity 4. I am the only one here with such problems, maybe I am missing something important?

    Now I just tried simple test scene. Cube inside cube. That other 'inside' cube still gets litten afet lightmap. Why?
     
  2. RyuMaster

    RyuMaster

    Joined:
    Sep 13, 2010
    Posts:
    468
    Finally, nailed it down. For some reason, after update from Unity 4 project, all my meshes had shadow casting set to OFF. Made it 2 sided, works as expected.