Path: chuka.playstation.co.uk!news From: yaroze@theburrow.co.uk (Barry & Robert Swan) Newsgroups: scee.yaroze.programming.3d_graphics Subject: Re: Environment Mapping Date: Sun, 28 Mar 1999 01:42:39 GMT Organization: PlayStation Net Yaroze (SCEE) Lines: 33 Message-ID: <36fd8834.945952@www.netyaroze-europe.com> References: <36FCF4E8.63C0@mdx.ac.uk> NNTP-Posting-Host: pA4s01a01.client.global.net.uk X-Newsreader: Forte Free Agent 1.11/32.235 On Sat, 27 Mar 1999 15:10:32 +0000, Harvey Cotton wrote: >Can anyone help me with implementing environment mapping? I asked this >a while back and I got some help, but I've still been unsuccessful. >I've tried looking this topic up on the net, but found nowt. I know >the basics of the technique but I don't fully understand how you >go about applying a texture around an object. Any help with this would >be greatly appreciated. > >Also, can anyone recommend any good 3d books? I'm looking for a graphics >book that covers engines and effects (featuring environment mapping >amongst other things) and something with a bit of C code in as well. >I will be using the book for research. >-- >Cheers | E-mail: hc054@mdx.ac.uk >Harvey | ICQ: 4269478 > hmm, I havent done this but just doing mapping around one axis is pretty simplistic. as long as you know how to alter the uvs of a tmd during runtime, then (lets asusme the Y plane mapping) calc angle between viewing angle and vertex normal (after model rotation etc, etc) This angle will most likely be between 0-ONE (if calcs using PS units which it should). this value then needs to be mapped to fit in a texture, ie lets use a nice 256 wide one, and then alter the u coords for any poly that uses that vertex accordingly. The v pos could be set beforehand and not need changing (if only doing one plane env mapping) otherwise you would repeat same thing to alter v coords. Of course, you need to do this on a vertex by vertex process, which I assume could be quite timeconsuming if you were to do lotsa polys etc, etc