Re: [Algorithms] Scaling Models
Brought to you by:
vexxed72
From: Jamie F. <j.f...@re...> - 2000-07-27 16:13:51
|
Off the top of my head: to get the normal back, you need to perform the inverse scale on it, and renormalise. Pass on the D3D / OpenGL gubbins, never used either :) Jamie John White wrote: > 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? > > ---- > John White > Senior Software Engineer > Deep Red Games Ltd. > jo...@de... > > Privileged/Confidential Information may be contained in this message. If > you are not the addressee indicated in this message (or responsible for > delivery of the message to such person), you may not copy or deliver this > message to anyone. In such case, you should destroy this message and > kindly notify the sender by reply email. Please advise immediately if you > or your employer does not consent to Internet email for messages of this > kind. Opinions, conclusions and other information in this message that do > not relate to the official business of my firm shall be understood as > neither given nor endorsed by it. > > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > http://lists.sourceforge.net/mailman/listinfo/gdalgorithms-list |