Re: pfSCS and normals

New Message Reply Date view Thread view Subject view Author view

Angus Dorbie (dorbie++at++sgi.com)
Tue, 14 Apr 1998 13:47:29 -0700


Javier Abadia Miranda wrote:
>
> Hello:
>
> How do pfSCS (scaling) affect normals ?
>
> I have been doing some tests and I have found that Normals suffer
> the same transformation than Vertices. This leads to incorrect
> illumination when using a non-uniform scaling matrix.
>
> Is there a way to apply one scaling matrix to vertices and
> another to normals ?
>
> Any suggestions to solve this inconvenience?
>
> Perhaps manual rescaling (i.e. multiplying each vertex
> by a Matrix, and its Normal by another) during load phase?
>
> I want to speed object loading up, because I am doing dynamic
> database management.
>
> Thanks!

The transformation is correct for lighting purposes but for
this to work normals are treated differently. If you scale a
sphere to be an almost flat elipsoid then rather than also
scaling the normals to be flat they should infact scale to
remain perpendicular to the surface. This is a different
transformation. It is the inverse matrix which is used to
transform the normal vector.

To avoid this you'd have to traverse your geoset data manually
and apply the desired transformation to the attributes.

Cheers,Angus.

-- 
"Only the mediocre are always at their best." -- Jean Giraudoux 

For advanced 3D graphics Performer + OpenGL based examples and tutors: http://www.dorbie.com/ ======================================================================= List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/ Submissions: info-performer++at++sgi.com Admin. requests: info-performer-request++at++sgi.com


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:57:14 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.