Archived

This topic is now archived and is closed to further replies.

ehmdjii

strange lightning with ase models

Recommended Posts

hello, im loading models that i exported as ASE from 3d studio max. but they have a strange lighting. see: http://www.wapod.com/~grumble/misc/badlighting.jpg also they have 3 different normals per vertex. is this supposed to be? thanks.

Share this post


Link to post
Share on other sites
Dude around 2500 can not be right with that thing!The light can have wrong params,the normals can be calculated wrong and
other things like that.Usually 3DSMax is exporting not only the vertex normals but also the face normals.Try using them too.And try to fix that light.

"You losers better learn...NOONE CONTROLS OUR GOD DAMN LIFE!!!" - MANOWAR

Share this post


Link to post
Share on other sites
what exactly could be wrong with the light?


GLfloat lightpos[]= { 0.0f, 1.0f, 0.0f, 0.0f };
this is all i use.


what about the normals on the vertices? should there be 3 or only 1?

Share this post


Link to post
Share on other sites
Each polygon should have 3 normals -- one per vertex. I hate dealing with 3DSMax because the data is always crazy and a royal P.I.T.A. to figure out. Good luck determining which is the proper vertex normal...

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I have had similar problems with Max exporting to OBJ. My solution was to have it just export face normals and I calculate the vertex normals myself.

Share this post


Link to post
Share on other sites
also, the normals are in objectspace, and the object in worldspace so you have to translate the normals with the objects matrice, or the vertieces with the inverse of the matrice before you combine them..

Share this post


Link to post
Share on other sites
Generally, you either use the face normals or the vertex normals. I suggest the latter. Also, remember that the coordinates in max are in XZY orientation, not XYZ. Also, the Z values in max have the negative Z going out of the screen. Usually, i have the negative Z values going into the screen, so i negate all the z values as well.

Share this post


Link to post
Share on other sites