Path: chuka.playstation.co.uk!news From: sosman@terratron.com (Steven Osman) Newsgroups: scee.yaroze.freetalk.english Subject: Re: Dynamic Texture Changing Date: Mon, 17 Jan 2000 03:47:50 GMT Organization: PlayStation Net Yaroze (SCEE) Lines: 55 Message-ID: <38838fe2.3399055253@news.playstation.co.uk> References: <3880CDAA.87D5513@which.net> <388207D8.8826ECED@which.net> NNTP-Posting-Host: 209.27.57.69 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Newsreader: Forte Agent 1.5/32.452 Max, You can load the different textures in different pages. Then you modify the "TSB" element in the packet data of your TMD. Basically, part of this "TSB" element contains the texture page which is used for the texture mapped onto the model. The thing is that you may need to take your TMD file and make 3 copies of it in memory, (well, not entirely, and I'll get to that), so that each one of the three copies points to different texture pages. The "not entirely" part is this... When you load a TMD file, the beginning of it contains 3 pointers: one to a list of vertices, one to a list of normals, and the last one to a list of polygons. The neat part is that your 2 new copies of the TMD file (so you have three in all), can point to the original vertex/normal lists, you need only duplicate the polygon data. You then have to go through these polygons, pick out whichever ones use textures, and alter the texture page appropriately. Steven On Sun, 16 Jan 2000 18:03:04 +0000, Max wrote: >Well yee see, > >what I'm trying to do is just have 3 textures then have one model. What I >would have otherwise done is load up three versions of the same model to >accomodate 3 different textures. What I would like to do is just have one >model uploaded (to save space, etc...) and then just have the three texures >put on it. Please note I do not want to change the textures while they are >on the model i.e. flashing between the 3 different textures, it's a bit hard >to explain. Overwriting them in VRAM wouldn't work because I want to display >the same model with the 3 textures all at a time essentially coming up with >3 models (same model) with the different textures on each of them, >overwriting would screw up the textures. > >If any one can come up with a soloution then you would probably be like the >smartest guy I know and I would also be very happy. > >Cheers, >Max > >Max wrote: > >> Right now, >> >> Does any one know how to change textures dymnamically within the code. I >> have one model and three textures and it would be really handy to have >> just one model instead of three. >> >> Thanking everybody in advance. >> >> Max