Search Unity

Point lights and shadows in Unity 3

Discussion in 'Editor & General Support' started by edplane, Oct 7, 2010.

  1. edplane

    edplane

    Joined:
    Jul 13, 2009
    Posts:
    485
    Hi, I just upgraded one of my 2.6 projects to Unity 3. I have the Pro trial. Anyway, one of the lights in the scene is a point light, and in 2.6 I had it set to produce soft shadows. However, it now has the error message: "Only directional lights can have shadows in forward rendering". Since I'm new to Unity 3, can some one explain what this means and how to correct it? Thanks
    edplane ;)
     
  2. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    you must switch to deferred rendering, forward rendering, as the error tells you, only supports shadows from a single dynamic light
     
  3. edplane

    edplane

    Joined:
    Jul 13, 2009
    Posts:
    485
    How do I do that?
     
  4. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    its in the player settings
     
  5. edplane

    edplane

    Joined:
    Jul 13, 2009
    Posts:
    485
    Ahh, thanks. Could you explain the differences between the two types of rendering?
     
  6. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    the documentation contains some information on it, the web even more.
    but if you aren't technically savy on that end, none of them will make much sense to you in which case you can just think of it as "forward rendering = the old way how it worked prior to strong gpus and shaders" and "deferred = the new way where different informations is rendered into different buffers, then processed and blended at the end again"
     
  7. edplane

    edplane

    Joined:
    Jul 13, 2009
    Posts:
    485
    That makes sense, thanks. Oh, I'm also having another problem. The game was made with 2.6, and in there I made the CC crouch but reducing it's height to 0.5, and it worked perfectly then. But now when I stand up again (making it's height 1), it falls through the map. Know how I could fix this?
     
  8. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    ensure that there is nothing about it before allowing that and ensure that you move the object upward in case the CC expands downward too, cause otherwise it will be below collision right at the start and no longer collide and get pushed out at worst
    same goes if something is above as the force is stronger downward than upwards (gravity)