Advice for drawing a single images / texture many times very quickly

Hi !

I’m creating a sort of social media visualizer that loads a set # of photos and highlights them. Additionally I have a small cache of say 50 “fill images” that are low resolution and they are drawn multiple times and are used to make shapes or resolve into images in the background. When the duplicate fill images are created they load the pixel data of one of the original 50.

Currently I have a particle system made of particles that extend ofNode and have an ofImage object inside them. At about 8000 images I hit a wall of performance, moving between my mac pro, my macbook pro, and my PC machine seem to have almost the same result. So I think it has to be something with my code. I know there’s a faster way to do this I just can’t visualize it. Billboard particles ? Fbos ? Shaders ? Better use of pointers ? I’m open to any and all suggestions. It sucks to have to drop to 30 fps sometimes

Below is an example of what one “resolve” might look like into a sphere.

I just know I can get more than 8,000 out of this system, I’m just not sure the best path moving forward.

looks awesome!

have you looked at the pointsAsTextures example?

sorry for bring this old post up. i just tried pointsAsTextures example. with 10K points, the fps is about 60. but with 50K points, the fps is only 20. i also tried the particle example within ofxMSAOpenCL, with 1M particles, the fps is about 100!. but it only draw points instead of an image. is there anyway to draw an image for each particle within ofxMSAOpenCL?

p.s. although i don’t quite understand the meaning, i made a small change to the draw() method of the particle example within ofxMSAOpenCL:

imageParticle.getTextureReference().bind();//added by me
glDrawArrays(GL_POINTS, 0, NUM_PARTICLES);
imageParticle.getTextureReference().unbind();//added by me

but the result is a totally blank window :frowning:

1 Like