PDA

View Full Version : question about light



suhu
04-07-2002, 11:17 PM
Hi !
I use a OpenGL light as a spot light in my application. But the circular edge is not sharp http://tttsuhu.boy.net.cn .Who can give my some ideas?

Thanks.



[This message has been edited by suhu (edited 04-08-2002).]

Bob
04-07-2002, 11:41 PM
Lighting is calculated per vertex, and the color is interpolated between the vertices, while you think it's calculated per pixel.

satan
04-07-2002, 11:52 PM
you can reduce the size of your quads to achieve a better visual effect (slows down the rendering of course)

you should also play around with the EXPONENT and CUTOFF parameters of your spotlight which could increase the overall look of your light

[This message has been edited by satan (edited 04-08-2002).]

suhu
04-08-2002, 12:49 AM
Oh,Thanks! Now I know something about OpenGL light.
I want to implement a headlight in a scene in which ambience light can be changed. And there are lots of spot light sources(such as streetlight) in the scene. Which is the best way to implement them(ambience light,streetlight,headlight)? Can you give me some advice ?

[This message has been edited by suhu (edited 04-08-2002).]

suhu
04-08-2002, 02:37 PM
Is the method to implement multi spotlight and changeable ambient light in a scene complex? Who can give me a direction about it? And where can I find some document about it?


Thanx!