PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Silly 3d question(s)

Hello.

I'm messing about with my first 3d architecture (well, it's a foray into 3d in general), and I'm having a few conceptual issues.

The main one right now is that of intersecting polygons in the view. Say I'm drawing two space-ships on my screen as polygons - the rasterisation into 2d spans is fine - I get that. My problem comes when the spaceships hit each other and intersect.

I've seen a lot of documentation about rasterisation, and most of them draw a polygon at a time, an object at a time, so there is no intersection; one object will simply overlay the next... I don't want that.

So, as far as I can tell, this leaves me two choices:
z-buffering
and
"something else"...

I've looked around, and the "something elses" never seem to deal with intersections either - they assume a polygonal mesh where polygons share vertices and have no intersections.

I'd like to find a way other than z-buffering... can anybody point me at a method that allows intersection? (Or am I being naive here and missing something?)

Cheers,

Refractor.
There is a better method for software rendering. It's called 's-buffering', it's invented by Paul Nettle, and it simulates z-buffering, at a lower cost, especially when you're working with relatively few polygons. It will be a disaster for meshes with 5000+ polygons, but it rules for meshes with a couple of huge polygons. You can mix it with z-buffering by adding 'z-buffer write' to the polygon rasterizers; the depth test is done by the s-buffer, but the depth per pixel is stored (without any 'if' statements) by the rasterizer (wich is comparably cheap). You can then use real z-buffering for smaller polygons (wich is faster for those). This is more or less what Quake 1 did: Perfect sorting on large scene polygons (with z-buffer writes) and z-buffer sorting on small actor polygons (with z-buffer read and writes). Quake1 didn't use s-buffers though; it used a BSP tree to get perfect sorting of the scenery polygons.

Here's a link to the s-buffer FAQ:
http://www.gamedev.net/reference/articl ... cle668.asp

Enjoy.
- Jacco.
Hi.

I'll take a look at s-buffering and writing to a scan-line based z-buffer.

I'm sure I'll have more questions later, thanks for your time. :D

Cheers,

Refractor.