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?
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 will be 2D so I will look into ofxFbo.
Thanks for your help!
I am using ofFbo in my draw function, but keep getting a crash after initializing.
Please see this screenshot:
Here is the code part:
ofClear(255, 255, 255, 255);
// nothinhg here yet
myFbo.draw(300, 300, 300, 300);
What could be wrong?
(mac osx 10.6.5 while set active sdk to 10.5)
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.
you might want to try an addon I implemented based on some code posted by TheoWatson.
It’s really easy to use, yet very flexible.
Thanks again Kyle, that did help
@Roy: That sure looks very, very easy to use - I will give that a try as well; thanks!