Sam Chu (c00chu00++at++nchc.gov.tw)
Thu, 16 Apr 1998 15:49:35 +0800 (CST)
I use perfly source codes to test function of SpotLight.
I set tod=0(time of day)and add a second light by "perfly
-l 0,0,1000,1,1,1 town.flt"
Or so I change the source code:
{
pfLightSource *lamp = pfNewLSource();
pfLSourcePos(lamp,
ViewState->lampXYZ[i][0], /* = 0 */
ViewState->lampXYZ[i][1], /* = 0 */
ViewState->lampXYZ[i][2], /* = 1000 */
1.0f); /* I change infinite light to local light here*/
/* I add the following two lines for spotlight */
pfSpotLSourceDir(lamp, 0.0f, 0.0f, -1.0f);
pfSpotLSourceCone(lamp, 1.0f, 15.0f);
/* set light source color */
pfLSourceColor(lamp,PFLT_DIFFUSE,
ViewState->lampRGB[i][0] /* =1 */,
ViewState->lampRGB[i][1], /* =1 */
ViewState->lampRGB[i][2]); /* =1 */
pfLSourceOn(lamp);
/* add lamp to scene */
pfAddChild(scene, lamp);
}
but it did not have any spotlight effect. Did I do anything wrong?
Should the spotlight be local light?
Thank you for your answer.
Sam Chu
National Center for High-Performance Computing
Scientific Visualization Lab Email: c00chu00++at++nchc.gov.tw
Tel: (886)35-776085 Ext 248 Fax : (886)35-773538
=======================================================================
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:15 PDT