Andrew Bailey (andrew++at++csunb0.leeds.ac.uk)
Mon, 10 May 1999 18:34:25 +0000
I am having some problems in lighting a database. I want to model
headlights on a car. I already have a DCS attatched to the scene and
have no trouble updating the DCS to the correct XYZ/HPR. I am using a
pfLightSource as follows...
pfLightSource *leftLight = new pfLightSource();
carDCS->addChild(leftLight);
The man page for pfLightSource says "A pfLightSource inherits the
current transformation from any pfSCSes and pfDCSes above it in the
hierarchy. This matrix transforms the light source's position and
direction depending on the light's type, i.e.- if it is a local,
infinite, or spotlight."
When I use these settings and then do a leftLight->getPos(...), the XYZW
returned is always
(0.0, 0.0, 1.0, 0.0) so I think my light source is not inheriting the
carDCS above it for some reason. Is this because it is an infinite
source? If so how can I make it inherit the DCS? Basically I want a
lightsource that moves with the car but obviously points down to the
ground as a headlight would.
The geometry does have normals. Could it possibly be something wrong
with my pfLightModel? Actually I would also like some advice on lighting
in general, as I am a little confused. What is the difference between a
pfLightModel, pfLightSource and pfLight? Which ones will I need for our
simualtor? I just want to model an infinite light source representing
the sun to correctly light the database and have headlights on the car,
if the "sun" is turned off.
thanks,
Andrew
This archive was generated by hypermail 2.0b2 on Mon May 10 1999 - 10:34:37 PDT