View Full Version : scaling and normal calculating
07-07-2002, 09:17 PM
If I want to morph an object by scaling, how can I calculate the normal correctly according to the *different* x,y,z scaling factor?
07-07-2002, 11:01 PM
Where are you getting the normals in the first place? You're going to have to recalculate them just as if you'd never had them.
[This message has been edited by ioquan (edited 07-08-2002).]
07-08-2002, 08:25 AM
It's better to enable normalization. You are talking about applying glScale to the modelview right?
07-08-2002, 09:06 AM
If the scaling is non-uniform, i.e. the scale factors for x,y and z differ, I don't think you can do anything but normalize. With uniform scaling however there is a cheaper way to ensure unit length normals. See the rescale normal part of GL 1.3 or the rescale normals extension, I think they cover the math.
07-09-2002, 01:52 PM
Read this article... http://www.opengl.org/developers/code/features/KilgardTechniques/oglpitfall/oglpitfall.html
07-09-2002, 02:18 PM
GL_NORMALIZE is really fast on GF3's.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.