Re: Flt model illumination?

New Message Reply Date view Thread view Subject view Author view

Marcus (giraffe.asd.sgi.com!sgi.sgi.com!uunet.uu.net!multigen!Marcus)
Fri, 18 Aug 1995 18:00:52 PST


        Reply to: RE>Flt model illumination?
>From: mtorres++at++arl.mil (Torres Mario 678-3280 AMSRL-BE-M)
>Message-Id: <9508152136.AA12765++at++mercury.arl.mil>
>Subject: Flt model illumination?
>To: info-performer++at++sgi.com
>Date: Tue, 15 Aug 95 15:36:45 MDT
>
> Hello,
>
> Is there a way to illuminate a multigen model (geoset)? I've tried
>placing a Light on a helicopter group after LoadFlt but the light also
>affects other objects, terrain, in the scene. I understand that it is
>possible to illuminate a geoset (and only the geoset) through
>manipulation of its gstate light (?). However, the problem with
>multigen models is that one does not have access (or do we?) to all the
>attributes of a model like the geosets, gstates, materials etc. All I
>seem to be able to get access to is the texture.
>
> Thanks in advance,
>
> Mario

Mario ... you have access to the entire scene graph. Briefly:

1) Enable the OpenFlight loader's callback function and get the
    specific objects of interest including the associated pfNode.
    See the readme file and pfflt.h for details [or I can email you].

2) Traverse the pfScene looking for the pfNode or pfObject of interest.

Once you have the pfNode you can attach pre/post draw callbacks to
enable/disable the pfLight(s). If the light is left on it will affect the
scene elements drawn afterwards. Also the light's position is
determined by the current GL ModelView matrix at the time it's
enabled (pfLightOn).

Alternatively, you can search down to the pfGeoSet's and fetch their
pfGeoState's and attach pfLight's to them. But you have to be sure that
only the pfGeoSets of interest are using that geostate.

BTW: OpenFlight V14.2 allows you to model the light sources directly.

Regards,
Marcus Barnes, Member Technical Staff
MultiGen Inc., 550 S. Winchester Blvd. Suite 500, San Jose CA, 95128
PH: 1-408-556-2654 FX: 1-408-261-4102
EMAIL: multigen!marcus++at++uunet.UU.NET


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:51:48 PDT

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