Re: [Algorithms] Scaling Models
Brought to you by:
vexxed72
From: Davide P. <da...@pr...> - 2000-07-28 07:22:58
|
> If you set a scaling matrix as part of the transformation pipeline what > happens to the normals? > I currently use D3D\OpenGL to do the transformation but use my own lighting > code. If I set a scaling factor to each of the 3 axes the angles of most of > the faces in the model will change (unless the scaling factor is the same > for all three axes). An extreme example is when XSc=ZSc=1.0f; YSc=0.0f; All > normals will either become 0,0,0 (for triangles with a normal perpendicular > to the Yaxis) or 0,1,0 for all other normals. > > Rebuilding the normal list is not an option as the models are shared > multiple times with different scalings. > > Anybody else encountered this problem? And how does D3D\OpenGL cater for > this? There is a very nice doc on opengl site called : Avoiding 19 Common OpenGL Pitfalls oglpitfall.pdf Written by Mark J. Kilgard that cover this topic. Davide Pirola www.prograph.it www.protonic.net |