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. Dismiss Notice

ARFoundation- simple baked shadow for placed object

Discussion in 'AR' started by eco_bach, Apr 26, 2019.

  1. eco_bach

    eco_bach

    Joined:
    Jul 8, 2013
    Posts:
    1,601
    A search turns up a few options for creating shadows in AR.
    In my case I simply want a baked shadow that my placed 3d object will cast on whatever plane or real world object I place it on.

    What is the best way to achieve this in ARFoundation when using the LWRP?
    Could anyone share their preferred method?


    One thread mentions using a 'shadow' shader from the ARkit plugin but that doesn't work with the LWRP.

    Here is another option https://forum.unity.com/threads/lwrp-receiving-shadows.591595/
    but I'm a total shader noob. Can anyone help? How do I use a .hlsl file with LWRP?
     
    Last edited: Apr 26, 2019
  2. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,234
    just cheat it with a plane and a texture with alpha channel
     
  3. Saicopate

    Saicopate

    Joined:
    Sep 25, 2017
    Posts:
    76
  4. TimeWalk-org

    TimeWalk-org

    Joined:
    Nov 3, 2014
    Posts:
    38
    What does this mean? Add a material that is 100% alpha but somehow receives shadows?
     
  5. Saicopate

    Saicopate

    Joined:
    Sep 25, 2017
    Posts:
    76
    No, bake a shadow in external renderer like Arnold and apply to underlying plane.