Search Unity

Cast shadows in a plane

Discussion in 'Global Illumination' started by jpv1234, Dec 9, 2015.

  1. jpv1234

    jpv1234

    Joined:
    Dec 5, 2014
    Posts:
    89
    Hello. I have a simple question hope someone can help me. I have a plane, some objects above him and a directional light in baked mode with Hard Shadows On. When I bake the lights, the shadows are correctly casted on the plane and everything looks great.

    However I would like that the plane only displays the shadows. In this moment it has a solid color with the shadows on it, but I only want to see the shadows, and everything else to be transparent. Any ideas how to achieve this? Maybe a material? So far I tried with the standard material to make it transparent but this makes all the plane transparent, so no result with this approach

    Thanks in advance
    Sorry for my bad english
     
  2. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,791
    Look up shadow catcher shader. (I believe there was one floating around for 4.x, not sure if it would work in 5.x)
     
  3. jpv1234

    jpv1234

    Joined:
    Dec 5, 2014
    Posts:
    89
    I'll check it out. Any other ideas?
     
  4. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,791
    Well, you need to write a shader. There isn't another way around it.

    I could tell you how in Unity 4.x, but I don't think it would work for 5.x.

    Look up Unity Shadow Catcher and Matte Shadow, maybe you can piece something together.