Sign in to follow this  

could this be possible

This topic is 3739 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hello, i'm new here. i look forward to being with everyone in the community here. i'm not exactly going to be a game developers but I always have technical questions. anyways, my question is about absolute and infinite preicsion. I was wondering a name for a future or maybe just imaginary replacement to the zbuffer, that would give absolute amd infinite precision. Would it be a per-pixel depth buffer by any chance? I really feel dumb asking this question but I've been wondering forever. Can you technically merge the z and w buffer, getting the better near precision of the z-buffer, and the better far precision of a w-buffer at the same time? (I don't think any hardware ever will do this, but I was just wondering if it was possible.)

Share this post


Link to post
Share on other sites
Since the Z-buffer doesn't present significant problems which would be solved by an "infinite precision" buffer, it doesn't really seem like an interesting avenue for innovation. If you just want a name, though... how 'bout "Q-Buffer"?

Share this post


Link to post
Share on other sites
by absolute precision i mean in comparison to relative precision.

like getting over the limitation of values limited to only being between 1 and 0.

with the z-buffer you have to clip to avoid z-fighting. i was wondering if there could ever be a depth buffer that can clip as far back as you want while maintaining absolute precision and without z-fighting artifacts or distance fog.

Share this post


Link to post
Share on other sites
Quote:
Original post by zbuffersucks
with the z-buffer you have to clip to avoid z-fighting. i was wondering if there could ever be a depth buffer that can clip as far back as you want while maintaining absolute precision and without z-fighting artifacts or distance fog.


Yes, but it will only run on a Turing machine. That's the only commodity hardware that has infinite memory.

Jokes aside...

n bits can be used to represent 2^n unique values. 32-bit integer z-buffer can thus represent 2^32 individual integer values.

Could there be a buffer with greater precision? Yes. A 64, 128, 256, 65536-bit buffer. Of course, it would consume a lot of memory, but you'd have what you want.

Your question seems to be on odds with basis of information theory and number representation in a computer. The only limitation is purely practical one. In software you can implement arbitrary precision buffer. Hardware however is optimized for performance, not accuracy.

Share this post


Link to post
Share on other sites
Let's put things straight: In PCs NOTHING has infinite precision.
As Antheus said, the precision can be increased. It could be possible to make an adaptative method that increases precision each time it is needed. But each time it will run slower and consume more resources, until you're out of RAM. That's where you're "infinite" ends

Polygons can be rendered without Z-buffer and having no problems by sorting each Triangle from back to front. But such method is painfully slow.

Z-Buffer is to day the best "accuracy-speed" implementation for games.

Hope this helps
Dark Sylinc

Share this post


Link to post
Share on other sites
You likely won't need an infinite precision, since objects in the far distance only occupy a few pixels, compared to those close-by, that can fill the screen almost completely. Perhaps you'll need an increased precision as resolutions become higher, but that's about it. Now I'm not sure on how much control you have over the precision/range proportion, so perhaps there's something going wrong there for you, but again, I'm not sure about that. ;)

Share this post


Link to post
Share on other sites
By reading again your post, I think you got confused with the 0.0 - 1.0 thing. Like if that were a Z-buffer limitation.
I think what you meant is: why not using from 0 - infinite?? right?
Actually, computers have a limit:
a 32-bit integer ranges from 0 to 4294967295
a 64-bit integer ranges from 0 to 18446744073709551615

But that's their limit. Saying 0.0 - 1.0 is exactly the same. Lets put it this way:
16-bit Z buffers ranges from 0.000001 to 0.999999
24-bit Z buffers ranges from 0.0000000001 to 0.9999999999
(Note that I didn't calculate the actual precission from the Z-buffer, surely it is greater)

Anyone with some math can tell you that between two continous numbers there are infinite numbers. Between 0.1 and 0.2 you have 0.11 0.111 0.1111.....
The greater the Z-buffer depth is, the more values between 0.0 and 1.0 can represent. But this would also happen if we use instead 0 - 4294967295

Dark Sylinc

Share this post


Link to post
Share on other sites
thanks to everyone who replied=)

anyways, i had been wondering, b/c I think games draw distances have been weak currently, and i'm obsessed with huge draw distances.

to me it had seemed that games that used the w-buffer (early 2000s and late 90s) had longer draw distances and no distance fog. unreal tournament was eye candy to me, because the draw distance and environments were so large, and to date, I haven't seen a game with draw distances like ut had. games that came somewhat close to those large draw distances of ut, were all around the same time, but the last time i saw those huge draw distances was in 2003 with enter the matrix.

Share this post


Link to post
Share on other sites
If your z-buffer doesn't have enough precision to handle your long draw distances, you can draw the scene in two passes
e.g. For a 20km draw distance - First draw the scene using 10km as the near plane and 20km as the far plane, then clear the z-buffer and draw the scene using 1cm as the near plane and 10km as the far plane.

Share this post


Link to post
Share on other sites
I think what you mean is, is it possible to have a hypothetical form of z-buffer which could handle scenes with z-near = 0, z-far = infinity?

If so then no it's not, even with the ability to store reals precisely (which a turing-machine can't, reals have a uncountably infinite number of values, turing machine's can only deal with countable infinite values) this would not be possible using a z-buffer. This doesn't, however, mean that it isn't possible to have such a scene, just that the z-buffer algorithm breaks down for such scenes and a different algorithm would have to be used.

Share this post


Link to post
Share on other sites
Quote:
Original post by zbuffersucks
anyways, i had been wondering, b/c I think games draw distances have been weak currently, and i'm obsessed with huge draw distances.

Draw distances generally have nothing to do with Z-buffering and everything to do with limiting scene complexity.

Share this post


Link to post
Share on other sites
Quote:
Original post by Julian90
I think what you mean is, is it possible to have a hypothetical form of z-buffer which could handle scenes with z-near = 0, z-far = infinity?

If so then no it's not, even with the ability to store reals precisely (which a turing-machine can't, reals have a uncountably infinite number of values, turing machine's can only deal with countable infinite values) this would not be possible using a z-buffer. This doesn't, however, mean that it isn't possible to have such a scene, just that the z-buffer algorithm breaks down for such scenes and a different algorithm would have to be used.


Thanks=)

what algorithims could be used instead that don't have any drawbacks except performance?

Share this post


Link to post
Share on other sites
Quote:
Original post by zbuffersucks
what algorithims could be used instead that don't have any drawbacks except performance?

If you didn't care about performance, you could do explicit, closed-form clipping between every pair of triangles in a scene, such that there would be no overdraw and no overlapping triangles left. If that were done, there'd be no need for a depth buffer, because there'd only be one triangle at every pixel.

Share this post


Link to post
Share on other sites

This topic is 3739 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this