Path: chuka.playstation.co.uk!news From: Craig Graham Newsgroups: scee.yaroze.mydemos Subject: Re: Environment mapping Date: Mon, 01 Feb 1999 14:22:52 +0000 Organization: PlayStation Net Yaroze (SCEE) Lines: 32 Message-ID: <36B5B8BC.1D191C0B@hinge.mistral.co.uk> References: <36B254E3.6637@mdx.ac.uk> <36B5894C.4CA9@bristol.ac.uk> NNTP-Posting-Host: d3-s10-166-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 Tom wrote: > Hmmm. Check out my environment mapping demo I've just put on the web (my > what a coincedence!), it's a real pain in the neck to do and I ended up > cheating the work out the surface noramls of the torus. I reckon there > must be a less processor intensive way of doing it, but I'm buggered if > I know what it is. You've already got the surface normals pre-calculated in the TMD file (if you're using the right primitive types). Problem solved..... Just apply the local to world matrix to each normal in the TMD using ApplyMatrixSV() (or something), cache the results and use them to process each poly of the TMD cache them because each rotated vertex normal will probably be used by several poly's and it saves doing the local to world transform several times.... If the local to world involves scaling, you might want to have a seperate non-scaling matrix to use for rotating instead to maintain the unified vector length on the normal. > Tom Craig.