Page 1 of 1

[Implemented] Pointlight and Spotlight

Posted: Tue Sep 01, 2009 9:14 am
by Deth good
Pointlight and Spotlight in the 3d engine please! Directional light is already available in Purebasic. The other types are not, but are available in Ogre3d:
Types of Lights
There are three types of lighting that Ogre provides.

Point (LT_POINT) - Point light sources emit light from them in every direction.
Spotlight (LT_SPOTLIGHT) - A spotlight works exactly like a flashlight does. You have a position where the light starts, and then light heads out in a direction. You can also tell the light how large of an angle to use for the inner circle of light and the outer circle of light (you know how flashlights are brighter in the center, then lighter after a certain point?).
Directional (LT_DIRECTIONAL) - Directional light simulates far-away light that hits everything in the scene from a direction. Let's say you have a night time scene and you want to simulate moonlight. You could do this by setting the ambient light for the scene, but that's not exactly realistic since the moon does not light everything equally (neither does the sun). One way to do this would be to set a directional light and point in the direction the moon would be shining.
Best regards,
Harold

Posted: Sun Sep 06, 2009 2:10 pm
by Deth good
Just found out that my findings about the Lights that can be used in Purebasic are not correct. When you create a light it's a Pointlight and not a Directional light. Sorry for the mistake.

Pointlights are very usefull. They would be even more usefull if the setAttenuation (how it diminishes with distance) of the lights would be implemented!

Harold