Javier Castellar (javier++at++sixty)
Fri, 23 Jun 1995 11:12:55 -0700
>Does anyone has an idea, how I can get the spotlight effect with
>specially-lit pfGeoState's.
I don't know if the problem has an explanation on the following lines but ... a
lot of people suffer the same with Spaotlights.
In the current pipeline the lighting calculation are applied per geometry
primitive. It means that per each normal on the database a final rgb color
vector is assigned depending on the light model, the normal, the light source
position and even the observer position. This color vectors are created using
the Phong lighting model.
After this lighting calculation (geometry level), let's say PER VERTEX, a
Gouraud color interpolation is applied, but the actual lighting calculation is
PER VERTEX and we do not interpolate normals. Then it is PHONG lighting per
VERTEX (or per primitive) and GOURAUD to expand this interpolation across the
surface of the polygon.
When an SPOT light is applied, the calculus is also PER VERTEX (or per NORMAL).
It means that if you have a single large polygon and the spot light cone is not
affecting the vertex, there is not LIGHT effect on this polygon , since the
vertex are not receiving light and the pixels of this large polygon are NOT
affected until your SPOT light reach one or more of this vertex.
SPOT lighting will have very nice effects when you have more polygons (smaller
polygons).
This is not a Performer feature, this is a pipeline design behavior.
If you really wish same effect but without overloading the geometry stage on
the pipeline, use projected textures (take a look to the 4Dgifts examples about
Reality Engine proyected textures).
If you also know it, congratulations.
Hope this helps.
-Javier (Fix or Die)
-- ************************************************************************* * Javier Castellar Arribas * Email: javier++at++asd.sgi.com * * * Vmail: 3-1589 * * Member of Technical Staff * Phone: (415)-390-1589 * * Advanced Graphics * Fax: (415)-964-8671 * * Advanced Systems Division * MailStop: 8U-800 * ************************************************************************* * Silicon Graphics Inc. * * 2011 N. Shoreline Boulevard, * * Mountain View, California 94043-1386, USA * *************************************************************************
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:51:36 PDT