lighting a big wall

Member
Posts: 749
Joined: 2003.01
Post: #1
I've gotten mad trying to get a small beam of light lighting a big wall (just one big quad).

in the end I dont manage to get it working nicely. i would expect a circle of light, but instead i get one of the two triangles that compose the quad light, the other one not.

Is this a limitation of opengl? Meaning i should divide the big wall in many smaller quads to achieve a better effect??

©h€ck øut µy stuƒƒ åt ragdollsoft.com
New game in development Rubber Ninjas - Mac Games Downloads
Quote this message in a reply
Sage
Posts: 1,482
Joined: 2002.09
Post: #2
It's a limitation of per vertex based lighting. You either need to split the wall up into more pieces, or use per pixel based lighting.

Scott Lembcke - Howling Moon Software
Author of Chipmunk Physics - A fast and simple rigid body physics library in C.
Quote this message in a reply
Moderator
Posts: 1,140
Joined: 2005.07
Post: #3
Just FYI, in order to do pixel-based lighting, you would need to write a shader for it. I would definitely recommend splitting up the wall. How much depends on how fine you want the light to be. If you split it up too much, though, you'll just get too many and decrease performance.
Quote this message in a reply
Moderator
Posts: 3,577
Joined: 2003.06
Post: #4
akb825 Wrote:Just FYI, in order to do pixel-based lighting, you would need to write a shader for it.
You can also use DOT3 operations on older cards for per-pixel lighting effects like normal mapping, although it doesn't offer anywhere near as much flexibility.
Quote this message in a reply
Moderator
Posts: 529
Joined: 2003.03
Post: #5
Or you could use static lightmaps and make the lighting as fancy as you want.

"Yes, well, that's the sort of blinkered, Philistine pig-ignorance I've come to expect from you non-creative garbage."
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Doing the wall slide thing monteboyd 9 3,928 Jul 8, 2003 05:13 PM
Last Post: monteboyd