Path: chuka.playstation.co.uk!chuka.playstation.co.uk!chuka.playstation.co.uk!not-for-mail From: Lewis_Evans@Playstation.sony.com Newsgroups: scee.yaroze.programming.2d_graphics Subject: Rainbow snake effect? Date: 17 Feb 1998 06:00:56 -0000 Organization: Sony Computer Entertainment Europe - 119.SS5 Lines: 32 Sender: news@chuka.playstation.co.uk Message-ID: <6cb92o$fqd1@emeka.playstation.co.uk> Reply-To: Lewis_Evans@Playstation.sony.com NNTP-Posting-Host: emeka.playstation.co.uk From: Lewis_Evans@Playstation.sony.com To: news@playstation.co.uk I want to produce the effect of a texture-mapped snake/ribbon with a definate width. Does anyone have any suggestions as to how I could do this? Representing it as a bunch of lines is, I guess, possible, but probably won't draw fast enough: I don't really want to use the 3D engine for polygons, and if I do, I'm not sure how I'd do it because the details of the model would be changing on the fly as it moved around the screen (and curled, bent, etc). Any tips? One way is to build the snake from sections; each section could be a quadrilateral. All you need is a simple clear way of describing the shape of the snake itself, eg a spline or a list of rotations from one section to the next; from this description, you can generate the snake from polygons. Changing the model on the fly just requires that you double buffer the model, ie just have two models and a buffer index and alter the model that's not being rendered; for examples of manipulation of polygons/TMDs, see the SCEE demos clone, chrome and Between The Eyes. It's quite straightforward to alter the vertices of polys to make them fit smoothly around the backbone line of your snake. Lewis