This question might have been asked before, but I didn’t find a good answer using search. Sorry if has been answered before.
I’d like to get started by mapping an object with the output of the projector. The output will be from an oF application.
I know you can translate perspective with the use of openGL, but I am actually looking for an efficient method to wrap the entire output at once, rather than having the application to calculate every object/animation.
What do you recommend to look into to get this done?
Thank you.
it depends whether you’re working with a 2d scene or a 3d scene.
if it’s 2d, then you need to render into an ofFbo and then draw a warped ofFbo with the corners where you want them.
if it’s 3d, then you need to scale, translate and rotate everything so it matches the projector’s orientation. you also need to use ofSetupScreenPerspective() to use a virtual camera that has the same fov as your projector.
it could be possible that you’re not allocating your ofFbo. try ofFbo::allocate(300, 300). just like an image, texture, or anything else, if it’s not allocated then there will be problems when you try to use it.
Hi,
you might want to try an addon I implemented based on some code posted by TheoWatson. https://github.com/roymacdonald/ofxGLWarper
It’s really easy to use, yet very flexible.