Path: chuka.playstation.co.uk!news From: Craig Graham Newsgroups: scea.yaroze.programming.3d_graphics Subject: Re: Lighting Date: Tue, 14 Jul 1998 11:42:26 +0100 Organization: Intelligent Research Lines: 43 Message-ID: <35AB3612.AA5669C6@hinge.mistral.co.uk> References: <6odou2$ajq2@scea> <6oe4jh$n307@chuka.playstation.co.uk> NNTP-Posting-Host: 194.131.235.3 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.03 [en] (Win95; I) Mario Wynands wrote: > This method will happily support directional, point, and spot lights. You > may find this slow in complex dynamic scenes, and remember lighting is on a > per vertex basis so you may get some artifacting with spotlights, but the > results should be good enough. Although it's very quick for static wall lighting. eg. Torch on a wall. You only have to do the lighting process for the scenery once, as the lighting info is embedded into the TMD, and the light isn't moving. You only actually have to do the light calculation for moving elements, and you can do a trivial reject (object/light bounding box) to reject objects on mass, and a slightly less trivial reject (vertex/light bounding box) to avoid the distance calculation for the majority of unlit vertices. The results of this method aren't as good as creating a lighting overlay TMD on the fly though, 'coz (at least for textured polys) you cann't light a poly with a mostly blue texture using a mostly red light as the RGB scalers are just that - scalers. If there's no red component in the texture, then you'll not get any illumination effect even from a 100% (0xff) red scaler. If you play clever tricks with the textures you can limit this problem to an extent (scale up the RGB palette values in the texture, and scale the actual display back down using the primitives rgb scaler) - it's a bugger to sort out though. A lighting overlay will add any colour light over any colour and type of polygon and as such is more suited to use in small moving point sources (like photon torpedo type bullets), as the bounding box reject will keep actual polygon counts quite low for it... > Mario Wynands Craig. (who's already done this both ways)