Jump to content
  • Advertisement


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


Scaling 3DS Models -- probs with normals

This topic is 5475 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey all, I have been having problems with my 3DS models in my game engine. The models look fine and the lighting works great, normals all calculated correctly i think. I can move the models around using glTranslatef() but if I try to make them larger using glScalef() they look crappy. Does scaling the models affect the normals, thus making the lighting look crap??? Is there another way to change the size of the models without affecting the normals??? Any help would be great. Cheers (o)..A Bee bit my bottom, now my bottom Big..(o)

Share this post

Link to post
Share on other sites
what happens is the normals get sclaed too, and usually end up with a length greater or less than one, what you need to do is
re-normalize the normals in the GL driver, using GL_NORMALIZE

but what i sugest you do is manually scale the verticies and leave
the normals alone (normals are not to be affected by scaling operations)

for each vertex in vertexpool
vertex.xyz * scale

Share this post

Link to post
Share on other sites
Vertex normals need to be transformed using the inverse transpose of the matrix that was used to transform the associated points. If you don't know what this means, look into matrix mathematics.

EDIT: Nevermind. You're doing a uniform scale. You need to re-normalize the vectors, or not scale them at all, as already mentioned.

[edited by - Nemesis2k2 on September 28, 2003 4:38:46 AM]

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!