glOrtho, viewport for large scale objects

I want to reconstruct a real object which has the dimensions (in millimeters) 500x100x50. What should be the glOrtho and viewport values in order to use these values considering that the opengl scene is displayed in a 400x400 pixels frame? I tried to modify an existing scene (where the objects were 5 x 5 x 5) but everything went crazy… especially the lights.

If I understand correctly, you want that the size of the object corresponds to its image on screen? Then you will need pixel size of your monitor (say X)… 400x400 pixels will then correspond to the 400X x 400X size; set the projection accordingly (0…400X) and it should work. You will have to recode the light positions so that it fits the new coordinate system, of course.

I think the lighting problem comes from scaling the scene without renormalizing your normals, as explained here (section 1) :
http://www.opengl.org/resources/features/KilgardTechniques/oglpitfall/

It was written during the previous century though, so the performance advice is not relevant anymore.
Just use glEnable(GL_NORMALIZE);

Thank you very much. glEnable(GL_NORMALIZE) does the trick :slight_smile:
Now the scene is displayed as I wanted… even with 200x200x200 objects as in this figure: