We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpOpenGL and 3D Libraries › Performance of function cube()
Page Index Toggle Pages: 1
Performance of function cube() (Read 910 times)
Performance of function cube()
Mar 18th, 2009, 11:17am
 
Hey processing community,

a small and hopefully simple question: can you adjust the performance of a cube(), as you can do with a sphere() (with sphereDetail()) ?

And if not: how can I lower the performance. I am using between 2000 and 8000 cube()'s in one application, and the performance (regarding rotating and zooming) decrease rapidly when the number of cube's grows...

Any ideas?
Re: Performance of function cube()
Reply #1 - Mar 18th, 2009, 1:48pm
 
You may be able to increase the performance of a box if you draw it more directly using a vertex (if you try this... let me know how it works out).  Another approach, depending on what you're doing, would be to draw a square that always faces the camera (adjust for rotation).  As far as I know, a box does not have a detail feature (it is already at max and min detail - it's fixed).
Re: Performance of function cube()
Reply #2 - Mar 18th, 2009, 1:54pm
 
hmm, I could try, although I can not really imagine that 10 vertex steps is faster than cube() (while ofcourse I do not know what the function cube() consists of, probably it exists of vertices as well).

The last option you give is no option for me; the whole goal of my application is to show bricks (cubs) in 3D... Wink

One last remark: will it matter to turn of coloring of the faces of the cube?
Re: Performance of function cube()
Reply #3 - Mar 18th, 2009, 2:03pm
 
There are many things that could effect performance when dealing with large data sets.  OpenGL vs P3D, hint features, loop calls (minimize what is looped in a draw), text, etc.  Take a look at this thread http://processing.org/discourse/yabb_beta/YaBB.cgi?board=OpenGL;action=display;num=1224365195.  Perhaps something will help.  Don't know about the colors but I wouldn't think this would effect it.  I've run over 15,000 textured objects in 3d without issue.
Re: Performance of function cube()
Reply #4 - Mar 18th, 2009, 2:14pm
 
Thanks, I indeed already read this thread, was interesting, but mainly about spheres, and I do not really have problems with that.
Page Index Toggle Pages: 1