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

Advice on Fully Dynamic Lighting?

Discussion in 'General Discussion' started by L-W, Aug 8, 2014.

  1. L-W

    L-W

    Joined:
    Mar 3, 2013
    Posts:
    20
    Hey all,

    I'm developing a game that's completely generated at run-time, the geometry and entities within are pretty simple, though the team and I have decided we're going for an underground environment. I'm not going to be including any directional lights and unfortunately I think shadow maps are out of the question. My main issue is that point light shadows look like balls, even for really simple geometry (40 tri's, almost rectangular in shape, shadow's jagged as hell).

    It could just be me as I've not much experience with shadows or shaders (or even Unity), I've tried out a few assets and looked into volumetric shadows but I've had no luck so far, does anyone experienced in these areas have any advice for what a game dev should do when faced with dynamic lighting using point/spot lights?

    I'm hoping for lighting to play an important part in the game, but when the shadow cast from the player's model itself (he's pretty much a bunch of rectangles/cubes) lands on an item he's holding, it's such an amazing contrast in quality that it almost blows me away.

    I've uploaded a picture to help explain what I mean, this is with Soft Shadows, Shadow Distance at 50, Four Cascades, Very High res, no custom textures, diffuse shaders, and shadow projection on Close Fit.

    I'm very new to Unity and Forums/Internet communication in general so do let me know if there's anything else I can provide, and do take into account that there could be a really simple solution to the problem that I've just managed to slip passed without noticing.

    Thanks in advance for any help!
    - L
     

    Attached Files:

  2. Deleted User

    Deleted User

    Guest

    You're talking about zebra and big tooth dinosaur shadows I see, yes they are a pain. Unless you want to start digging into the shader code, tweak the bias settings and shadow strength to see if it clears things up a bit.

    If you have Pro (seems you do with soft shadows) have a play about with ambient occlusion as well, don't forget to mess around with the min-z and other settings or it tends to get a bit, well err "bitty".
     
  3. 3agle

    3agle

    Joined:
    Jul 9, 2012
    Posts:
    508
    I'd definitely take ShadowK's advice first and foremost, but if all else fails, there is an asset that increases filtering taps on soft shadows:

    http://forum.unity3d.com/threads/shadow-softener-official-thread.200024/

    I've not used it myself, but hear good things. That should be a fall back though, most of the time your camera and light bias settings should be able to fix the issues.
     
  4. L-W

    L-W

    Joined:
    Mar 3, 2013
    Posts:
    20
    Sweet thanks man, I totally forgot to import the Pro asset packages so I'll give AO a go.

    As far as I can tell though, changing the Bias on a point light doesn't seem to have any effect, I've also noticed that no matter what resolution I stick the shadows on it produces identical effects.

    Using a spotlight with a <100 degree cone produces amazing shadows though, damn. Just wish that could somehow be achieved with a point light.

    If nothing can eventually be done, I'm alright with rethinking how I do the lighting in the game, hope it doesn't come to that though.

    Also thanks for the asset recommendation (just popped up on my screen now), I'll give it a try should my tinkering with Unity not work.

    Taking what you've both said in your comments, it looks like tinkering with Unity is the best I'm going to get so I'll focus on that, if it ends up being inadequate then I'll rescope the game accordingly.

    Thanks again for all the help so far!
     
  5. NomadKing

    NomadKing

    Joined:
    Feb 11, 2010
    Posts:
    1,461
    Most of the good advice has already been given, but just one point on what you said here:

    Make sure to see what Quality Settings are set to and which level the editor is using - there's a bunch relating to shadows that will have an effect on what your seeing.