3D engine real-time lighting. How would you do it?

Miscellaneous Forums/General Discussion/3D engine real-time lighting. How would you do it?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

How hard is it to implement a system to light textures rather than geometry? It's a concept that I don't really grasp.

It sounds like you're trying to achieve an effect close to per-pixel lighting with only fixed-function rendering. With Blitz3D, there's not much else you can do as far as I know.

I'm not sure how the lighting in the Leadwerks Engine works, but chances are it supports some sort of per-pixel lighting technique (this means that even if your wall is a simple quad, the lighting can be as detailed as you want). As you put it, this technique lights the texture (pixels), rather than the geometry (vertices).

In other words, for per-pixel lighting, you need to use pixel shaders. AFAIK Blitz3D doesn't really support per-pixel lighting, so the only way to get around this is to just add extra vertices as you are now, or maybe a decal approach. Either way, you're never going to get the amount of realism that comes with per-pixel lighting.

Edit:
so many people (in general) say that you need high-polys for decent lighting

This only applies to per-vertex lighting techniques obviously (which Blitz3D is limited to, since you can't use pixel shaders)