Path: chuka.playstation.co.uk!news From: "Andrew Murray" Newsgroups: scee.yaroze.freetalk.english Subject: Re: Texturing/bit depth question Date: Fri, 28 Nov 2003 18:56:27 -0000 Organization: PlayStation Net Yaroze (SCEE) Lines: 83 Message-ID: References: NNTP-Posting-Host: host81-132-36-36.in-addr.btopenworld.com X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Sorry, I was looking at a post I had made a while back about Repeating Textures (on this newsgroup in fact) and I stated back then that the u, v coords had to be bigger than the texture (makes sense, duh me :)). So if your texture was 64 pixels wide and you wanted it to repeat 8 times over a surface, set the u coord to 64 * 8. Gees, four posts in one day, beats my record :) Andy M. "Andrew Murray" wrote in message news:bq7qc8$mh63@www.netyaroze-europe.com... > Texture repeating is possible, I had done it a while back. I think the > process involved setting a clipping area on the VRAM (can't remember which > function to use to do that) then giving u, v coords smaller than the size of > the texture, I did find a problem with this process however, if you have > multiple textures to be repeated, the last texture that had a clipping area > set around it on VRAM will cover every textured object. I can't remember if > I found a solution to that but I think its along the lines of drawing the > object (using GsSortObject4) immediately after the texture region has been > set. > > I will try to fish out the demo I had. > > Andy M > > "Andrew Partington" wrote in message > news:bq4ohn$mh62@www.netyaroze-europe.com... > > Hi all, > > > > Does anyone know if it's possible to tile/repeat a texture over a > > quad/triangle, instead of having the texture stretched over it? > > > > Originally I wanted to put aside a 256*256 area of VRAM, and then > > MoveImage() the relevant textures into that area, building up a texture > > strip running horizontally across the area, which would have given me > > all the flexibility I need. > > > > However, that plan seems to have been scuppered because no matter what > > bit depth you specify for your texture, the U and V coordinates seem to > > get in the way. > > > > What I mean is: if I have a texture 8 pixels wide in 8-bit mode, I still > > have to set the texture width to 8. However the texture might only be 4 > > pixels wide in the VRAM area because its in 8-bit mode, and 2 pixels > > wide in 4-bit mode - it should only be 8 VRAM pixels wide in 16-bit > > direct mode (I think). Although it was handy to hide that behaviour > > when I was beginning, it's turning into a bit of a limitation now. > > > > The problem here is that I would have to split the polygon at 256 pixel > > intervals (in real terms, every 4 items of map data), and I want to keep > > the poly count as low as possible. Is there any way of overriding that > > behaviour to let me set the "real" texture widths? It'd be nice to be > > able to use a 1024 pixel wide texture (in effect, in 4-bit mode), while > > setting the texture width to 256. > > > > I know that the U and V values are in the range of 0-255, so i'm not > > expecting to be able to set any values higher than that - I just want to > > keep track of the bit depths myself. > > > > There's a demo attached of what i've been up to on-and-off - I thought > > that if I was going to go the polygon route I might as well do some > > proper collision too and get my head round the maths. Anyone fancy a > > test to make sure you can't break it too easily? (you can't topple off > > the edge of a block in this version yet, thats on the to do list). If > > you do go inside a block, chances are that you would have been killed > > before that (I can only get it to fail when going at mad speeds). I > > don't know what it'll do when I texture it, but for now it's vastly > > quicker than the old GsSPRITE-based map - which is why I want to keep my > > quad splitting down to a minimum. (P and V are the polygon and vertex > > counts, in case you are wondering). > > > > Cheers, > > > > Andy P > > > >