[Fieldtrip] Adding lighting to FieldTrip

Peter Verswyvelen bugfact at gmail.com
Thu Dec 11 16:43:37 EST 2008


I'm think 8 is the minimum number of lights hardware must support to be
OpenGL compiant, but hardware can support more.
Most games use some kind of "light virtualization technique", were any
number of lights are allowed but only the closest lights are used for doing
the shading.

I'm not sure if the maximum number of lights applies when using custom GPU
shaders...


On Thu, Dec 11, 2008 at 10:14 PM, Conal Elliott <conal at conal.net> wrote:

> In TBAG, ActiveVRML/DirectAnimation, and Fran, I embedded lights into
> geometry, which allows them to be spatially transformed.  Looking in
> Graphics.FieldTrip.Geometry3, you'll see a comment placeholder for lights.
>
> OpenGL is a temporary implementation convenience, so I wouldn't design the
> API around it.  If more lights get added to a geometry than the current
> implementation can handle, we can document the limitation and drop some of
> them at run-time.
>
>   - Conal
>
> On Thu, Dec 11, 2008 at 12:52 PM, David Sankel <camior at gmail.com> wrote:
>
>> Hello All,
>>
>> I'm working on adding lighting to the FieldTrip library (ticket
>> http://trac.haskell.org/FieldTrip/ticket/16). I have some initial data
>> types here:
>>
>> http://hpaste.org/12975
>>
>> I'm thinking that the GContext will keep track of which of the 8 opengl
>> lights are used and enable them if they are.
>>
>> I was wondering what ideas folks have had with lighting. Some issues that
>> are on my mind:
>>
>>    - OpenGL limits the number of lights to 8.
>>    - It would be nice, for a spotlight primitive, to allow the light's
>>    position and a point it is pointing toward to go through different
>>    transformations. This would allow a fixed light to follow an object, for
>>    example. I don't know yet how to provide this functionality.
>>
>> Thanks,
>>
>> David
>>
>> _______________________________________________
>> FieldTrip mailing list
>> FieldTrip at haskell.org
>> http://www.haskell.org/mailman/listinfo/fieldtrip
>>
>>
>
> _______________________________________________
> FieldTrip mailing list
> FieldTrip at haskell.org
> http://www.haskell.org/mailman/listinfo/fieldtrip
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/fieldtrip/attachments/20081211/07b71f02/attachment-0001.htm


More information about the FieldTrip mailing list