Performance issue: too many images?
in
Programming Questions
•
8 months ago
Hi guys,
I have been working on a making a grid of cubes floating in 3d space, all textured with different photos so that the composite ends up looking like a face.
I started with a grid of 10x10 (100 cubes in total). I textured each side of each cube with a different image that corresponded to its place in the grid. That's 600 images total. There were never any performance problems there.
I want to increase the resolution to 20x20 (400 cubes total), but the more images it has to load the more the program slows down. I would think that since the images load at setup(), and the texture of the cubes don't change in the program, the amount of images shouldn't be slowing down the sketch.
If I texture each side of the cubes with the same image, then the Sketch only has to load 400 images, and it runs without a hiccup. Which tells me that the number of *instances* of the Box() object is not the problem here. It's the images being loaded. I used "png-8" file types, so they are very small. A thousand images takes up only a couple MBs of space.
I'm afraid someone is going to respond to this with "are you crazy?" Well, I'm new to Processing and completely self-instructed, so, yes, maybe. I have attached a link to the sketch folder in my dropbox
HERE. Thanks for the insight, guys.
1