View Full Version : problem of lighting
04-18-2005, 05:15 AM
i working on a .3ds loader with opengl and my problem is that the lighting works perfectly with some meshes and not with others...
i have clicked on the "reset Xform" button of 3ds max but it change nothing for some meshes.
Do you the reason ?
can you please give more information about your problems, and how are they related to gl. Indeed, not all people here made a 3ds loader (I didn't, but I use them).
What you need to know is that 3DS doesn't have the same basis as gl. Well, I'm sure you already know that. So, ensure they all point to the good direction first.
Second, 3ds uses some matrices to store some transformations about a model, generally only if this model had been transformed within 3ds (or more probably 3DS max). So next, ensure you loaded it the right way (regarding the basis change).
Finally, ensure your normals are all normalized. If you use some scaling, then do some gl normalization.
Before I leave, can you tell more what is this tricky option of 3DS Max ? What are its purposes ?
04-18-2005, 09:33 AM
thanks for your help, i'll verify what you told me.
this option of 3ds max flip the normals, it helped me for a mesh which doen't seem to be lighted before with my opengl program.
04-18-2005, 10:50 AM
you should draw the normals with lines to help you debug problems - if thats too much work for doing in code, use 3dsmax's view normals feature.
04-18-2005, 11:35 AM
can you tell me in which menu i can find this feature ?
Originally posted by airseb:
can you tell me in which menu i can find this feature ?Modifiers -> Mesh Editing -> Edit Normals
Powered by vBulletin® Version 4.2.2 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.