Path: chuka.playstation.co.uk!scea!peter_alau@playstation.sony.com From: Gerrit Goossen Newsgroups: scee.yaroze.programming.3d_graphics Subject: Re: 3d world clipping Date: Tue, 24 Nov 1998 12:41:40 -0500 Organization: SCEA News Server Lines: 31 Message-ID: <365AEFD0.7610@funnytown.com> NNTP-Posting-Host: 38.165.241.13 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 3.01-C-MACOS8 (Macintosh; I; PPC) Daniel, I tried to do this recently and the way I ended up doing it was to divide the mostly flat world into a set of "segments" (basically tiles in a grid) that contain polygons. Everytime the camera moves you can quickly create a list of visible segments: Recalculate the view frustrum, ortho-project it onto your grid, test the center point of each segment against the frustrum and determine if it's 'visible'. (There are lots of ways to optimize this... an exercise for the reader :) If you want to see this in action, I recently uploaded a demo: You'll need CW to use this, seeing as how I didn't feel like recompiling a Mac version of GCC. (A project for another weekend...) There are a lot of little graphical glitches in the demo, but most of them are due to the tools I wrote to create the world. (ie. It's not the clipping routines.) As a matter of fact: The hardest obstacle I've hit so far is creating a set of reliable tools that let you build the world model! Depending on how you want to create your world model, the process of building segments varies quite a bit! Basically if you want to do it "without doing anything James of the SCEE wouldn't want you to" the fastest approach is to write your tools to create a single TMD for each segment. - Gerrit