Search Unity

Weird bit of lighting

Discussion in 'Editor & General Support' started by votekick, Feb 26, 2012.

  1. votekick

    votekick

    Joined:
    Mar 27, 2010
    Posts:
    104
    Hi all,

    So I just upgraded to unity 3.5 last night, launched my WIP project and noticed that the character wasn't being lit properly anymore.

    So the project upgraded etc, and now the player model looks like the polys are flipped, as in showing the other side. Not sure how to explain it but... If you make a mesh partially transparent, you can see through and then see the other sides facing the camera, unless you turn on backface cull.

    What it looks like is happening is the light is shining through the polys on the side I want to be illuminated and its coming through to the other side... I fix this problem with a second point light, but I recall my compiler complaining when I try to export android (sorry, yeah its a mobile game). It complains about multiple light sources.

    So here u see it with 1 light enabled
    http://img585.imageshack.us/img585/3448/lightingwtf01.jpg
    And then 2
    http://img827.imageshack.us/img827/9214/lightingwtf02.jpg

    Heres an older screenshot I took about a week ago in 3.4 (yes the intensity was a little high)
    http://img641.imageshack.us/img641/2244/androidtestgame.jpg

    One thing I'm doing (which I undid as a test)
    I made a layer called player so that the pointlight that followed the player didn't illuminate the parts of the map or create unwanted shadows when the character was close to a wall. I seem to need to include the map as well, to get favourable lighting, otherwise I get a similar result when rendering in 3ds max, with a sky light but no floor to reflect the light (I'm fairly certain this wasn't the case with unity before).



    Long post over, hopefully I made sense, I understood it but that doesn't help everyone else.

    Edit:
    I forgot to mention I did try reimporting the player model.
     
    Last edited: Feb 26, 2012