Sign in to follow this  

simple performance question

This topic is 4115 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

Hi, I'm about to start developing an application using opengl. I am going to take an image that has dimensions of 256 x 256 pixels, and turn each pixel into an open gl cube. I'm wondering if there's a way to know how many cubes I can create before the application drops interactivity. A 256 x 256 image would require 65,536 cubes, but I'd like to support images that have dimensions of 1024 x 1024. That would require 1,048,576 cubes. Will this be possible on consumer graphics boards? I don't need any other geometry, just these simple cubes. Thanks

Share this post


Link to post
Share on other sites
Are the cubes going to be solid colors, corresponding to their respective pixels? Or are they going to be textured? Also, are they going to be translucent, or fully opaque? And finally, roughly how large (on average) will each cube be?

If it's just solid colors rather than textures, then you can get away with 8 vertices per cube, rather than 24. That will significantly reduce the number of vertices the card must transform.

If the cubes are translucent, or sufficiently large, then you'll likely being having to draw a lot of pixels, so keeping the cubes opaque, and keeping their size down, will help reduce the number of pixels that the card must process.

Grabbing some quick numbers from www.nvidia.com, a top-end GeForce can theoretically get 24 billion pixels per second, or 2 billion vertices per second. At 8 vertices per cube, and at 1,000,000 cubes, (and ignoring fill rate), you could theoretically get 250 frames per second, where drawing 8,000,000 vertices takes only 4 milliseconds. If each cube ends up drawing a total of, say, 24 pixels (after z-buffer, back-face culling, et cetera), then that would be a frame rate of 1000 per second, only a millisecond per frame.

So I'd say it does indeed look doable, especially since that was considering your 1024x1024 scenario, which is 16 times more complex than 256x256. Granted, it was using numbers for a high-end card, and was using theoretical maximums, but still, I'd say you have some room to work with.

Share this post


Link to post
Share on other sites
Hey Agony,

Yes the cubes will be solid filled, no texture, no translucency. I'm not sure how to answer how large each cube will be - small enough so that the whole 1024 x 1024 matrix can fit into the viewport at once (so small I guess?). How could I define that?

So it sounds like this is doable, which is great. I'll check out the link you supplied for stats.

Thanks!

Share this post


Link to post
Share on other sites

This topic is 4115 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