realbasic-games
[Top] [All Lists]

Re: Light Limitation

To: REALbasic Games <realbasic-games at lists dot realsoftware dot com>
Subject: Re: Light Limitation
From: Frank Condello <developer at chaoticbox dot com>
Date: Sat, 23 Jul 2005 18:58:23 -0400
Delivered-to: realbasic-games at lists dot realsoftware dot com
References: <BF07BCAC dot E2D4%larsjensen at rcn dot com> <416823B0-8EDB-4BDD-ACE8-4F9E31F50F69 at chaoticbox dot com> <78C3D832-5F58-4FBA-AABF-0806B5A62640 at miensoftware dot com> <C92ECD9D-5730-4E83-B8B4-57F078153BEF at chaoticbox dot com> <4A4D2EDF-BC02-4F19-8D6E-E8F6052F03BC at miensoftware dot com>
On 23-Jul-05, at 6:06 PM, Lo Saeteurn wrote:

you can workaround it by doing your own lighting using vertex colours.

How so? Can it be done dynamically?

You'll need declares to assign vertex colours to trimeshes, and do the light calculations in software (you can google for that!). It's unlikely you'll be able to calculate the colours every frame and still run at an acceptable rate though, this is best used to pre- light certain things like terrains.

Another approach is to virtualize lights when rendering each mesh, enabling only the lights that affect it most. This works well enough for small objects but a large world mesh would need to be split up and drawn 8 lights at a time, which can be tricky.

How could this be done with Quesa?

I'm actually not sure it would be possible or practical with Quesa. I think Quesa sets up lighting once per frame, where this technique requires you set up lighting (possibly) once per mesh. Even if you could get Quesa to update lights per-mesh you'd need to write your own render submit loop, which might cause other problems since you can't call Rb3DSpace.Update.

Most games settle for static lighting on the world and virtualized lighting on dynamic objects, using texturing tricks for dynamic lights.

This seems pretty difficult to do using light maps and such because you would have to manually tweak all corners of the world to get it to light correctly.

Not sure what you mean by that (?)

Currently I enable only the top 8 lights that seems the brightest to the subject. This works fine with large open environments where each light is far apart, but looks strange in smaller close knit areas where farther lights seem to turn on and off as you move-- maybe spacing them out more would help.

The only way that'll work is if the geometry in view is only ever lit by a maximum of 8 lights - that's almost impossible to guarantee, and places severe restrictions on the artwork.

Frank.
–––––––––––––––––––––––––––––––––
Open Source RB Goodies and Shareware
<http://developer.chaoticbox.com/>
<http://www.chaoticbox.com/>
–––––––––––––––––––––––––––––––––

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>