Path: chuka.playstation.co.uk!tjs From: tjs@cs.monash.edu.au (Toby Sargeant) Newsgroups: scee.yaroze.mydemos Subject: An idea for a cool visual effect [Re: gradient filled boxes] Date: 5 May 1998 23:46:55 GMT Organization: PlayStation Net Yaroze (SCEE) Lines: 48 Message-ID: References: <354a5046.711296@www.netyaroze-europe.com> <354c8e6f.2951846@www.netyaroze-europe.com> <354e72ae.42172515@www.netyaroze-europe.com> <354F40AA.72AA4F3B@hinge.mistral.co.uk> NNTP-Posting-Host: indy16.cs.monash.edu.au X-Newsreader: slrn (0.9.5.1 UNIX) On Tue, 05 May 1998 17:39:06 Craig Graham wrote: >Robert Swan wrote: > >> Full apologies for my annoying habit of putting up a program, and then >> altering it ten times. >> >> New version fixes a bug that sometimes causes the bottom line to be >> the wrong colour; at certain heights the some or all of the rgb values >> could be wrong. I "think" its fixed. >> >> Robert Swan > >What on earth are you doing there ;)(I took a quick look at the code) > >Why not just generate a TMD with a single primitive in it (say, a >graduation >shaded quad), and call GsSortObject4() once for the box. Much quicker than >drawing it one line at a time..... Or with next to no work, you could work out the format of the packet data needed to draw a shaded quad, and just doItYorself(tm), without needing to go through the 3d calculations. This actually seems like less work to me. Much less painful than sitting down and working out where your 3d primitive has to be to end up with a particular 2d location. One thing you could do with a lines based box, though, is animate the creation of the gradient filled quad. For each point of each line, generate a cubic spline that passes through 3 points and ends up at the required location. Animate. Voila. Slinky shaded box creation. The 3 points have to be chosen specially, or course, so that: a) for point n (n=1,2,3) on cubic k (k=1..number of lines), the location is a function of k b) all the points start off outside the screen, such that no lines are visible on the first frame of the animation. Another idea would be to try doing this by rendering the quad to a texture page outside the screen area, and then breaking it up into little sprites, and then animating it on screen. It'd look really cool with single pixel sprites, but I think that the psx might not have the power. of course a) then changes to: a) for point n (n=1,2,3) on cubic u,v (u=1..n(horizontal sprites),v=1.. n(vertical sprites)), the location is a function of u and v. I'd be interested to see just how fast a playstation could do this. Points for the largest number of lines/sprites per fram anyone? :) toby.