[Bf-committers] Fixing dynamically added lights (BGE)

Daniel Salazar - 3Developer.com zanqdo at gmail.com
Tue Jun 21 01:57:16 CEST 2011


Honest question, how is that different to just keep some of the lights
at energy 0 and turn them on at some points? is this proposal faster
or something?

cheers

Daniel Salazar
3Developer.com



On Mon, Jun 20, 2011 at 5:51 PM, Daniel Stokes <kupomail at gmail.com> wrote:
> To clarify this is for the Cucumber Summer of Code branch, and by "we" I
> mean myself, my mentor, and a few other members of the community.
>
> On Mon, Jun 20, 2011 at 3:36 PM, Daniel Stokes <kupomail at gmail.com> wrote:
>
>> After some discussion yesterday, we came up with a plan for dynamically
>> adding lights while in the Blender Game Engine. The problem is the shader
>> code currently relies on Blender light objects, and recompiling it is too
>> slow to do frequently in the BGE.
>>
>> So the plan is to create a user settable number of Blender lights and put
>> them into the blender scene during the conversion process. At this time the
>> shaders can be recompiled to so they include this pool of lights. From
>> there, whenever a Ketsji light is dynamically added, it can "borrow" one of
>> these Blender lights so it can affect the compiled shaders. These lights
>> will be distributed on a first come first served basis. When a Ketsji light
>> is done with a Blender light, the "borrowed" Blender light's energy can be
>> set to 0 to avoid affecting the scene.
>>
>> When the engine is done running, it of course will remove these added
>> Blender lights.
>>
>> I am sending this to the mailing list for review and feedback.
>>
>> Thanks,
>> Daniel Stokes
>>
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers
>


More information about the Bf-committers mailing list