I’m writing image-mosaic script that’s using 4000 tiles to create a final 50,000 x 50,000 pixel image.
My approach was to sort the images and draw them to an FBO, but I get an error any time I try to allocate an FBO at 8,000 x 8,000: (ofFbo: FRAMEBUFFER_UNSUPPORTED)
What I’ve been trying is:
- Create an FBO object
- Draw the ofImage files to the FBO
- Read the FBO to an ofPixels object
- ofSaveImage the ofPixels to a png file
Does anyone have any suggestions for a better way to do this, or a way to fix my issue (is it just I should swap from my underpowered Macbook to my workhorse PC for more graphics memory)?
I’ve never worked with this high resolution before and am totally at a loss.
you should check the max size allowed for FBO, it depends on which graphic you are using.
Are you trying to allocate the FBO before loading all the images? ofImages include a texture so 4000 of them would probably require you to do some juggling of using setTexture(false/true) as you draw them into the FBO.
Thanks, do you know how I can check? C++ function or system setting?
Thanks, I am allocating the FBO first, then loading and drawing in the images picture-by-picture. So you think by dealing with setTexture I can avoid the issue, rather than it being a hard limit on the FBO?
Which OS are you using ?
try this in your setup()
cout <<"Max texture size : " << maxTexSize << endl;
Not sure if you can’t even allocate the FBO.
The error I get on a Macbook Pro (2012) is
ofFbo: FRAMEBUFFER_INCOMPLETE_ATTACHMENT if I try and create one that is too big. (16000 x16000) - otherwise at 8000x8000 I get
[verbose] ofFbo: FRAMEBUFFER_COMPLETE - OK
Hey, I’m on OSX El Capitan.
This what I get - Max texture size: 16384
Hmmm, I guess I’ll transfer over to my PC and see what happens there and report back.