From: Marcin Romaszewicz (marcin++at++asmodean.engr.sgi.com)
Date: 01/04/2000 15:52:22
Hi Again,
I just noticed what the problem was. In the shadows.c file, there is a
function called lookAt(pfDCS, pfVec3) which takes a dcs and rotates it so
that it's Y axis points at the specified point. This function is used to
set the directions of the spot lights in the frame loop at the bottom of
the file.
The problem is that performer used to have a bug in the way it transformed
the default spot direction of a light. The default spot direction is
(0, 0, -1), pointing down the Z axis, but performer treated that direction
as though it were (0, 1, 0). To get the sample to work, you must change
the Y axis vector in the lookAt function from (0, 1, 0) to (0, 0, -1) so
that it corresponds to the direction that pfLightSources actually point
in, or you need to call pfSpotLSourceDir for each light source that's
created, changing the spot direction to (0, 1, 0). Both ways work equally
well, you just need to make sure that the example's notion of spot
direction and the lights' notions coincide. I'll correct the sample code.
-- Marcin
On Tue, 4 Jan 2000, Marcin Romaszewicz wrote:
>
> Hi Robert,
>
> That particular example will print a warning if shadows are not supported
> or if it can't find a texture or model. Are you getting any errors? If
> not, you should see shadows.
>
> -- Marcin
>
>
>
> On Wed, 29 Dec 1999, Robert Stein wrote:
>
> > Hi,
> >
> > I've been looking into using the shadowing abilities of pfLightSources...
> > I've looked through the code in
> > /usr/share/Performer/src/pguide/libpf/C/shadows.c, however when I compile
> > and run it on our IR systems... the model I load comes up fine, but I
> > don't see any shadows, or projective texturing that I expect from browsing
> > the code... am I missing something here?
> >
> > Sincerely,
> >
> > Robert Stein
> > Robert J. Stein
> > National Center For Supercomputing Applications
> > 405 N. Matthews, Urbana, IL
> > (217) 244-7584
> > rstein++at++ncsa.uiuc.edu
> > -----------------------------------------------------------------------
> > List Archives, FAQ, FTP: http://www.sgi.com/software/performer/
> > Submissions: info-performer++at++sgi.com
> > Admin. requests: info-performer-request++at++sgi.com
> >
>
> -----------------------------------------------------------------------
> List Archives, FAQ, FTP: http://www.sgi.com/software/performer/
> Submissions: info-performer++at++sgi.com
> Admin. requests: info-performer-request++at++sgi.com
>
This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 15:52:28 PST