OpenGL Lighting (Composition by gtoledo3)

Author: gtoledo3
Date: 2012.08.02
Compatibility: 10.4, 10.5, 10.6, 10.7
Required plugins:

This is an example that gives some pointers about using the lighting environment patch in QC (OpenGL Lighting).

I've made some basic notes about the main functions, and setup some lights with animated attenuation to demonstrate mixing colored lighting with a main white light. It's sort of a study in attenuation and placement.

Not groundbreaking stuff, but if you ever have trouble with gl lighting, this may help. It's pretty much based in one of the more popular dl's/instructions from my site (to my surprise), but a little bit updated, and better annotated.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

cybero's picture
Re: OpenGL Lighting (Composition by gtoledo3)

Nice demonstrata exemplar.

Interesting how the Shadows option even singularly enabled upon any one of the lights knocks out all but one instance of the iterated Sphere and Cube renderer patches.

Quite why Shadows acts like a Clear patch within a Lighting patch upon iterated items still baffles me.

gtoledo3's picture
Re: OpenGL Lighting (Composition by gtoledo3)

That's one of my oldest files SL bugs, probably prerelease. I believe it's because the Lighting patch process doesn't catch that it's dealing with an iterator and doesn't execute subpatches correctly. The shadow aspect of the lighting patch is of some limited use, but it's too bad it's associated with the lighting process the way it is because it's two entirely different and pretty much unrelated processes going on.