| Submitted by , posted on 08 October 2002 |

Image Description, by This is the result of my last week of work: per pixel lighting with distance attenuation (in square of distance) and bump mapping on Quake I maps. I decided to work on this after I heard about Tenebrae, which is an alteration of the Quake I game to include such features. I started this one week ago, and here it is, thanks to the DOT3 GL extension.
The whole thing (lighting+texture) takes only 1 pass, using 2 texture units. The first TU compute the lighting (light vector dot normal vector for each pixel), the second pass multiply the lighting by the texture color.
Other passes are needed for shadows.
The bumpmaps are generated from the textures, which means that any Quake I level can be displayed. Ok, artist bump maps would be nicer, but I am not a graphix, only a coder. Another drawback is that even watter and lava are bumped. =(
I still have bugs on computing the tangent space in Quake III levels, but soon... =)
Speed: arount 70fps on a Duron 800, GeForce 2MX
Next steps: multi-light (easy) and soft shadows (harder).
More screenshots are available on:
http://tfpsly.planet-d.net/img/3d/Screenshots/Bump/index.php

[prev] | Image of the Day Gallery www.flipcode.com | [next]

Copyright 1999-2008 (C) FLIPCODE.COM and/or the original content author(s). All rights reserved.
Please read our Terms, Conditions, and Privacy information.