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
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Disabling shadow casting on terrain trees

Discussion in 'General Graphics' started by Ronald_McScotland, Jun 2, 2015.

  1. Ronald_McScotland

    Ronald_McScotland

    Joined:
    Jul 30, 2014
    Posts:
    174
    In Unity 4 I used to be able to stop the terrain trees from casting shadows by unchecking "cast shadows" on the terrain settings. Now in Unity 5 this doesn't work. Any ideas how to disable them?
     
  2. OlavoDias

    OlavoDias

    Joined:
    May 2, 2015
    Posts:
    13
    Changing the Cast Shadows parameter should fix your problem. Can you send us a screenshot showing exactly what you're talking about? I've been using this parameter just fine in Unity 5.
     
  3. Ronald_McScotland

    Ronald_McScotland

    Joined:
    Jul 30, 2014
    Posts:
    174
    As you can see, even with cast shadows off for the terrain and the tree prefab, it's still casting shadows. Interestingly, when I place the tree manually instead of through the terrain system, it behaves properly.





    I tested it with a Speedtree and that lets you turn shadows on and off properly. I also tested it with a regular mesh and that won't let you turn shadows off either, so it seems to be a problem with tree-creator and mesh trees, but not speedtrees.
     
  4. Durins-Bane

    Durins-Bane

    Joined:
    Sep 21, 2012
    Posts:
    175
    anyone able to fix this?
     
  5. PooBear

    PooBear

    Joined:
    Oct 21, 2013
    Posts:
    1
    This still seems to be a problem, it kills performance on mobile, but the only way to stop it is to disable shadows through the lights, so nothing has a shadow.
     
  6. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,444
    Was there ever a proper fix for this?
     
  7. alont_unity

    alont_unity

    Joined:
    Dec 16, 2020
    Posts:
    1
    In case this is still an issue for anyone, we solved it by using prefabs rather than straight meshes, and in the prefabs we set shadowcasting to be off.
     
  8. hockenmaier

    hockenmaier

    Joined:
    May 11, 2016
    Posts:
    11
    This may seem a litter overly complicated, but you can remove received shadows yourself by making a custom shader or editing the built-in terrain shaders. I did this in a custom toon shader no problem. Strange there is no option in the standard terrain settings to turn of received shadows.
     
    ROBYER1 likes this.
  9. trlatimer

    trlatimer

    Joined:
    Dec 1, 2019
    Posts:
    1
    If anyone experiences this in 2023, all you need to do is find the prefab you added to the terrain brushes and set the shadows to off