www.jpct.net

jPCT - a 3d engine for Java => Support => Topic started by: Hrolf on March 17, 2007, 04:47:40 pm

Title: Anti-lights
Post by: Hrolf on March 17, 2007, 04:47:40 pm
Hi Egon,

It would be great to have anti-lights (I can't think of a better name - 'Darks' maybe?) so you could have areas of darkness even though the ambient light level was high.
I'm trying to make a large, well lit area with some dark patches. Currently I'm having to use lots of lights with carefully tuned locations & attenuations. It'd be much easier to set the ambient light level and have 2 or 3 anti-lights... Is it possible for you to put in lights with -ve intensity? Would it be the same code only subtractive?
Title: Re: Anti-lights
Post by: EgonOlsen on March 17, 2007, 07:13:06 pm
That's not possible due to the way the lighting is being calculated which is done by the hardware (when using OpenGL). The software renderer mimics OpenGL behaviour, so it's the same there. But when using hardware rendering, you can use multitexturing/lightmaps if possible to create such dark areas. Maybe that's an option?
Title: Re: Anti-lights
Post by: Hrolf on March 17, 2007, 07:19:37 pm
Sadly I'm just using software rendering :(
Never mind! It was just a thought...