Search Unity

More ligting problems...

Discussion in 'Editor & General Support' started by edplane, Jul 13, 2010.

  1. edplane

    edplane

    Joined:
    Jul 13, 2009
    Posts:
    485
    Hello. I have been doing a lot of modeling in C4D and have been out of Unity for a bit, so I figured I would make a small mini-game where you can destroy an office all from physics. I have the room made, and I set the wall's material to Bumped/Specular, and the floor to Bumped/Diffuse, and I get lighting problems again. I don't know why, but Unity's lighting system just... sucks. Anyone know how to fix this problem? :?
     

    Attached Files:

  2. niosop2

    niosop2

    Joined:
    Jul 23, 2009
    Posts:
    1,059
    Almost looks like it's vertex lit. Do you have the light set to force per pixel?
     
  3. edplane

    edplane

    Joined:
    Jul 13, 2009
    Posts:
    485
    I just did that, same thing's happening... :(
     
  4. niosop2

    niosop2

    Joined:
    Jul 23, 2009
    Posts:
    1,059
    Attach a sample project, impossible to say what's happening just from the screenshot.
     
  5. edplane

    edplane

    Joined:
    Jul 13, 2009
    Posts:
    485
    OK, here is the .zip from my cloud. IDK if you need C4D in order to be able to open the assets, but maybe not.

    http://ubuntuone.com/p/9WZ/
     
  6. niosop2

    niosop2

    Joined:
    Jul 23, 2009
    Posts:
    1,059
    Don't have C4D to try this myself, but in the import settings for the Room model, try telling unity to calculate normals.

    EDIT: Also, it looks like you're trying to use the diffuse texture as a normal map. Copy the diffuse to another texture and tell unity to generate a normal map from the grayscale of the copy.
     
  7. edplane

    edplane

    Joined:
    Jul 13, 2009
    Posts:
    485
    YEAH! THAT WORKS! Could you explain exactly what calculate normals does?
     
  8. niosop2

    niosop2

    Joined:
    Jul 23, 2009
    Posts:
    1,059
    It looks at the geometry and calculates the normals based on that instead of importing them from the 3D app. A normal is normally a vector perpendicular to the surface. By specifying different normals you can make sharp edges appear smooth, etc. Or make it look like there are bumps on a surface when there is not. Basically it tells the engine the angle light should bounce off the surface.

    Looks like the the imported model had really messed up normals giving you the messed up lighting. By just having Unity recalculate the normals instead of relying on what it was passed it fixed the problem.
     
  9. edplane

    edplane

    Joined:
    Jul 13, 2009
    Posts:
    485
    It seems to fix the walls, but not the ceiling or floor. Is there a way to help correct this in either Unity OR C4D?
     
  10. edplane

    edplane

    Joined:
    Jul 13, 2009
    Posts:
    485
    I seem to have fixed it. I had to make a real bump map, rather than use the texture as a bump map, like you said. Thanks for your help :D