Search Unity

Is there a way to have real time shadows in a beast litmap scene?

Discussion in 'Editor & General Support' started by chaos1986, Jan 29, 2011.

  1. chaos1986

    chaos1986

    Joined:
    Mar 29, 2009
    Posts:
    230
    I've been playing around with cubes and stuff, but I can't get a directional light to show unless i add a second one, and even then i can't get real time shadows to work (they only work on an unlightmapped scene
     
  2. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    6,331
    Are you using dual lightmaps? What is your shadow distance? What are the settings of the Directional Lights?
     
  3. chaos1986

    chaos1986

    Joined:
    Mar 29, 2009
    Posts:
    230
    I've tried playing with dual and single but both get the same results,

    I would like to 'bake' my scene with AO and have a dynamic day/night cycle
     
  4. Mingo

    Mingo

    Joined:
    Nov 14, 2010
    Posts:
    39
    I posted a similar question in this thread with no clear answer.

    If you lightmap a scene with the dual lightmap mode, then you'll get the "baked" shadows and AO at long range and dynamic shadows (blended with the lightmap ones?) up close, depending on your shadow settings. I'm not sure if you can just bake AO with Beast without shadows, but it would still be incorrect if you want the sun to move through the sky.

    Basically, you can't bake the lighting and have a fully dynamic day/night cycle as the baked shadows are static, but you could fake the lighting with a post-process shader. Your "sun" would never move, and you'd adjust the lighting levels in some other way. Perhaps you could lightmap the scene twice (light/dark) and switch/blend these at runtime, but you'd still need either a custom material (on everything) or a post-process shader to manipulate the "lighting" levels.

    I think Borderlands did something like this, where shadows and AO are baked and the light levels just fade up and down for the day cycle. You don't really notice that the shadows are static, and it allows the artists more control over how the levels are actually lit and shadowed.

    If you can deal with the performance hit you could try using the SSAO image effect to add dynamic ambient occlusion and then rely entirely on real-time shadows. Depending on the game, you could also just lightmap interiors (those without any windows, anyway) and leave the terrain/outdoors dynamic.
     
unityunity