Path: chuka.playstation.co.uk!chuka.playstation.co.uk!news From: alex@teeth.demon.co.uk (Alex Amsel) Newsgroups: scee.yaroze.programming.3d_graphics Subject: Re: BSP trees and creating packets on the fly Date: Tue, 23 Sep 1997 20:56:09 GMT Organization: Into Beyond Lines: 75 Message-ID: <34292a77.806208@news.playstation.co.uk> References: <01bcc373$67766900$d4f082c1@bass> Reply-To: alex@teeth.demon.co.uk NNTP-Posting-Host: teeth.demon.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Newsreader: Forte Agent .99g/32.335 On 22 Sep 1997 08:57:44 GMT, "Alexander Jakes" did quoth at me: >I am currently playing with BSP trees for collision detection. As a side >effect of this I have access to a list of ready sorted polygons that need >to be displayed. I have a couple of questions regarding this: BSPs could be quite slow on the ps-x... >1) Is it going to be quicker for me to let the Playstation draw the entire >scene regardless of whether or not loads of it is out of view? Debatable. Very scene dependant I'd say. And also depends on your algorithm for locating visible objects. The PlayStation works with a painters algorithm, that is it draws distant objects first. If you expect to be doing a lot of unnecessary rendering with this system then it may be worth looking at BSP trees. If your scene is large you may also want to use some conic view code, or similar. In this way you can find which objects are approximately in view. >2) Assuming it is quicker to only draw the visible polygons supplied by my >BSP tree, can I add individual TMD primitives to the drawing list or do I >have to make a TMD data structure in memory containing the visible >primitives and then pass this to GsSortObject4. There are a couple of ways of doing this. TMD structures are those used by libgs, but you can create your own TMD data on the fly. GsSortObject4 parses through the TMD data making a few modifications to enable faster repeated rendering, but I think that is documented elsewhere in this newsgroup from Jim. I can dig out the information if you want it. Editing a TMD structure that has also been through GsSortObject4 needs to be done carefully as the TMD structure has effectively changed. >3) If I make a ready sorted list of primitives in TMD format is their any >way to avoid the sort that GsSortObject4 does. I assume the sort at least >will pass through all the data once even if it does not have to move >anything. I'm not sure it sorts it, more marks runs of similar primitives. >4) I have noticed there are functions for inserting lines into the display >list (GsSortLine, GsSortGLine). Why are these available but a general >GsSortPrimitive is not? Not having the docs on me, I can't help much. There are ways of doing this by adjusting the OT table directly. * Create a TMD with just a triangle primitive of some kind * Watch what goes in the OT * It shouldn't take too much to work out the structures * I haven't tried this (well, not much) but it ought to work >I assume the answer is that I need to make a new TMD object and thus have >duplicates of the world data I am BSPing. Sad but possibly true. You may still be surprised what sneeky methods you find though! Regards, Alex Amsel + Tuna Technologies + Windows 95/NT, Console and Internet + + The PC/PS-X Game Tools and Game Development Specialists + + And we say, "A good programmer always blames Microsoft" + + Oggledy Iggle ty wobbly wubble oh gobbledy ubblegy sagg +