Path: chuka.playstation.co.uk!news From: "Peter Dollochan" Newsgroups: scee.yaroze.programming.3d_graphics Subject: Re: 3d world clipping Date: Fri, 20 Nov 1998 11:33:25 -0000 Organization: PlayStation Net Yaroze (SCEE) Lines: 75 Message-ID: <733kaq$ekm2@chuka.playstation.co.uk> References: <36552f4a.6753350@news.playstation.co.uk> NNTP-Posting-Host: modem-97.magnesium.dialup.pol.co.uk X-Newsreader: Microsoft Outlook Express 4.72.3110.5 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Daniel Hartmeier wrote in message <36552f4a.6753350@news.playstation.co.uk>... >Hello fellows, > >assume that I have a world with many polygons, too many to draw them all >each frame. Most of them are, however, invisible (due to the camera >position, direction, etc.). > >What are the possibilities to reduce the number of polygons to draw? For >example, I could write a function that decides for each polygon (or >complex object), whether it is visible or not. I can imagine different >levels of precision (bounding boxes, etc.). But of course, to evaluate >such a function for each object also costs time. Ok here is what I'm doing at the mo' with a city project I'm doing The objects are depth cued for starters ie they are only inserted into the scene depending on overall distance from the camera at the same time as you've already calculated the distance I store 2 or 3 objects TMD's so the actual model displayed is depth cued as well, the closer the more complex etc. > >Is it worth it? Or is it cheaper (regarding execution time) to just let >the PlayStation draw each object? Surely there are existing algorithms >for this problem. Can you recommend a book, where I can look them up? I messed around with only displaying objects depending on camera rotation but whether it was my code (prolly) or just not fast enough by comparison to the psx just drawing the lot is something you should muck around with I didnt find it faster (but then I'm not an authority on the subject :-) Books - look out for L.Ameeraal author...(i think i spelt it right) and the old fav foley and van dam but its to much work for my money ;-) or maybe just a good maths book from your local library that you can just forget to take back 'GRIN' > >Say I have a landscape consisting of 10'000 x 10'000 small tiles. What >algorithms exist to reduce the number of tiles to draw. I have the >camera position (x, y, z), the direction and zoom factor (x, y, z). Each >tile has a position (x, y, z) and bounding box/sphere. The visible part >builds a slice of a sphere (don't know the correct math expression in >english :). The algorithm would determine for each object, whether it >intersects with this area. I could write this straight mathematically >correct, but it would be too slow, I guess. So, what level of >abstraction/optimization is advisable? > if you draw your landscape as you would a top down 2d game ie if your sprite BG based world was 10000 X10000 pixels or whatever you would only draw those left/right/up/down from the characters position that were visible on screen, ok but then you get distance probs like the horizon not being very far away but again your level of detail for the landscape comes into it. you could if you were using a mesh idea (for the landscape) miss out ever other vertice point so your polys are bigger this is again dependant of distance to the viewer. >Regards, >-- >Daniel Hartmeier PGP 6A3A7409 ICQ# 12742482 > >"The woods are lovely, dark and deep. But I have promises to keep, >And lines to code before I sleep, And lines to code before I sleep." Pete. (just confused myself but hoping it helps a little:-)