Quantcast
Channel: beginners - openFrameworks
Viewing all articles
Browse latest Browse all 4929

Understanding ofLight

$
0
0

@cuinjune wrote:

Hi, I'm trying to understand how ofLight works.

Based on the documentation, it says there are 4 main lighting types that are
- Spot light
- Point light
- Directional light
- Ambient light.

So there are corresponding setter methods that are

  • setSpotlight();
  • setPointLight();
  • setDirectional();
  • ?

But I couldn't find any method called "setAmbientLight()".
I could find there is "setAreaLight()" instead. Is this the right one for setting the ambient light?

Also, what does it mean by "only programmable renderer" in ofLight.h

enum ofLightType {
	OF_LIGHT_POINT=0,
	OF_LIGHT_DIRECTIONAL=1,
	OF_LIGHT_SPOT=2,
	OF_LIGHT_AREA=3 // Only programmable renderer
};

And there are methods such as "setAmbientColor()", "setDifuseColor()" and "setSpecularColor()" which I can find these in ofMaterial class as well.
I would like to know how they are different from ofMaterial's methods when applied to ofLight;

And lastly, I wonder what "setSpotlightCutOff()" and "setAttenuation()" do in ofLight.
I tried to find the detailed information about ofLight but this documentation was all I could find.
http://openframeworks.cc/documentation/gl/ofLight/

Posts: 4

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 4929

Trending Articles