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

Baked Global Illumination + Realtime Shadow

Discussion in 'Global Illumination' started by VNL-Entertainment-Games, Oct 18, 2015.

  1. VNL-Entertainment-Games

    VNL-Entertainment-Games

    Joined:
    Feb 10, 2015
    Posts:
    78
    Hello.

    Our scenes are completely baked for lighting and shadow for all static object.
    Characters and dynamic objects are lit using Light Probes.
    Shadows are cast with either a "Mixed" or "Realtime" Directional light.

    Since the characters are already lit using light probes, will the Realtime/Mixed directional light still be lighting the characters/dynamic objects, and so characters end up being double lit, and wasted computing resources?

    If so, how can I use Directional Light to ONLY cast realtime shadows but not light dynamic objects since light probes already do a good job.
     
  2. halfshey

    halfshey

    Joined:
    Apr 26, 2015
    Posts:
    15
    I really would like to know how to do this, too. :)

    Because of mixed lighting shadows currently not working, this would be a great workaround.
     
  3. Hjeldnes

    Hjeldnes

    Joined:
    Jul 22, 2012
    Posts:
    116
    Yeah, its not possible to combine baked light with realtime light/shadows currently. We have the same problem several of our projects. Mixed lights should be fixed for 5.3 (in december), though possibly only for directional lights.
    You could possibly try using an old style projected shadow. Something like this http://wiki.unity3d.com/index.php/Character_Shadow
    The kind of shadow that was used before, in games like halflife and so on..

    That's an old sample, but there could be something newer on the asset store.

    Maybe you can also use a projectted shadow blob under the characters to at least ground the characters. Not so nice, but better than nothing.
     
  4. VNL-Entertainment-Games

    VNL-Entertainment-Games

    Joined:
    Feb 10, 2015
    Posts:
    78
    It seems mixed mode will ensure realtime lighting is not calculated.
     
  5. LtCalumbo

    LtCalumbo

    Joined:
    Jan 28, 2014
    Posts:
    32
    Hi there,

    The closest work around I've got is in the Lighting menu, leave Sun empty as 'None (Light)'

    5 Sky Lights, One straight down, the four each turn 90 degrees so facing N,S,E,W but each rotated facing downward slightly (like 15 degrees)

    Bake (non-directional) with bounce settings and light colours that are appropriate for your scene. You then have light maps that include GI and AO and because you have no shadow lines, they can be compressed quite low to keep file sizes down. Then add a realtime shadow casting directional light for the sun but put shadow strength way down to between .1 - .2.