Path: chuka.playstation.co.uk!news From: Craig Graham Newsgroups: scee.yaroze.programming.3d_graphics Subject: Re: 3d lights, distance, movement Date: Tue, 09 Feb 1999 19:12:19 +0000 Organization: PlayStation Net Yaroze (SCEE) Lines: 38 Message-ID: <36C08893.1721154F@hinge.mistral.co.uk> References: <01be5457$ab8a2d40$813770c2@RikPrince> NNTP-Posting-Host: d3-s55-211-telehouse.mistral.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.5 [en] (Win95; I) X-Accept-Language: en Rikki Prince wrote: > I'm currently designing a game in which I want to have a first person > perspective with a light above the head of the person, all of the time. > Also, I only want the light to shine a certain distance, so the player can > only see a few metres ahead. As well as this I wish to make the intensity > of the light variable, so as power decreases, the light dims. > I've got a basic idea of how to keep the light place constant: mainly, move > the world in relation to the person and light. However, I believe this > already happens (according to James Russell's Matrix tutorial I read). > Could anyone tell me if these things are possible, and maybe how to do > them? What you want it point/volumetric lighting. Bummer, because the yaroze libs don't support it. You'll have to write some code to access the TMD internals on the fly to either embed lighting information into the RGB scalers of the primitives that have them (as RsdANIM's point lighting function does), or for better looking results generate an overlay TMD made up of transparent poly's which you display over the top of the model you're lighting. Another way if you just want to fade out radially is to sort a circular object over the landscape which is high intensity at the edges and low intensity in the middle and use subtractive transparency to get a radial fade. Or you can do it simply by fogging out into the disance and varying the fog parameters to dim the light (won't look like a light above a head though as it won't be radial). > Rikki Craig.