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

Faking shadows for leaves

Discussion in 'General Graphics' started by Nicksaccount, Sep 8, 2018.

  1. Nicksaccount

    Nicksaccount

    Joined:
    Jan 10, 2013
    Posts:
    24
    I'm trying to work out how I can fake a sunlight-through-trees effect for a single tree.

    I've found someone recommending using light cookies to create the effect for a single light (https://gamedev.stackexchange.com/questions/143207/procedural-forest-canopy-for-terrain-lighting) which creates a nice forest floor effect for the whole scene, but how could I do that for a single tree in the middle of a field?

    Only the tree's shadow would need that effect, while the rest of the scene would use normal lighting.
     
  2. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,469
    Spotlight cookie, you can have render the tree to a texture silouhette using a specific camera first, baked it and use it back
     
  3. Nicksaccount

    Nicksaccount

    Joined:
    Jan 10, 2013
    Posts:
    24
    Wouldn't a baked texture be static?

    I'm looking for something that would respond to light changes and is animated (in both the dappled shadow effect on the floor and movement of the tree).

    Preferably there's some way to add a post-shadow texture to any given object. The texture being gray-scale and decides which parts of the shadow to show.
     
  4. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,469