Painting a background image into the scene

Started by Marlon, April 13, 2011, 04:55:10 PM

Previous topic - Next topic

Marlon

Hello again!
Now I want to add a background image to the world, so that the background of the scene isn't black but shows the image on which all objects of the world are painted on.
More detailed I want to add a webcam stream into the scene to place the objects in the "real world scene" (-> augmented reality).
Do you know if this is possible or there is a way to achieve this aim?
Thanks in advance!
Marlon
www.forgottenelements.com
Free Action JAVA MMORPG

EgonOlsen

For a static background, you can use a texture and the blit methods in FrameBuffer. To add a webcam picture, you somehow have to grab the webcam's picture. Once you have that, you can use an ITextureEffect to feed the webcam's pixels into a texture...you might have to scale the image and uploading it to the gpu isn't very fast either. So don't expect this to have stellar performance.