Don Hatch (hatch++at++hell.engr.sgi.com)
Tue, 14 Apr 1998 16:39:34 -0700
OpenGL properly transforms the normals by the transpose
of the inverse of the matrix used for the vertices.
I think the issue is whether glEnable(GL_NORMALIZE) is called--
if not, the intensity of the lighting will be scaled wrongly
(this is true even for uniform scaling).
What version of Performer are you using?
Performer 2.2 properly tracks non-unit scales
in the scene graph and enables or disables GL_NORMALIZE appropriately.
Performer 2.0 had GL_NORMALIZE enabled all the time
(with a performance penalty).
I think Performer 2.1 never enabled it, but I'm not sure.
>
> 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.
Yes, you could do that... multiply the normals by
the transpose of the inverse of the SCS matrix, and then renormalize the
resulting vectors to unit length.
Avoiding scales in the scene graph lets OpenGL go in a faster mode
(more precisely, it allows Performer to glDisable(GL_NORMALIZE)).
Don
--
Don Hatch hatch++at++sgi.com (415) 933-5150 Silicon Graphics, Inc.
=======================================================================
List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
Submissions: info-performer++at++sgi.com
Admin. requests: info-performer-request++at++sgi.com
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:57:14 PDT