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.
Page Index Toggle Pages: 1
ZBuffer Madness (Read 1054 times)
ZBuffer Madness
Sep 18th, 2005, 10:11pm
 
So, I'm making progress with my fun little particle system craziness. I got to the point where everything more or less worked with all the particles in the same plane, so I decided to throw some forward/backward motion along the Z-axis into the mix, and I was met with..

[img=http://alterscapes.deviouskitty.com/screenshot.jpg]

I think the problem is that the particles are being drawn according to their order in the ArrayList that stores the particle objects, not according to their distance from the camera.  Now, are there any hidden tricks in Processing for dealing with depth-sorting, or am I going to have to recode everything from scratch?  </noob>
Re: ZBuffer Madness
Reply #1 - Sep 19th, 2005, 11:36am
 
Unfortunately, I think you have to add some code that goes through your ArrayList, and draws them in z-order unfortunately.

When you tell it to draw something, it goes and draws it, and then waits to be told what to do next, instead of just storing what you want to be drawn for later, than doing it's own funky thing and drawing them how it wants to.
Re: ZBuffer Madness
Reply #2 - Sep 21st, 2005, 1:28am
 
see the second item under the opengl section of the faq:
http://processing.org/faq/bugs.html#opengl
it applies to P3D as well.
Page Index Toggle Pages: 1