www.jpct.net

jPCT - a 3d engine for Java => Support => Topic started by: Marlon on April 13, 2011, 04:55:10 pm

Title: Painting a background image into the scene
Post by: Marlon on April 13, 2011, 04:55:10 pm
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
Title: Re: Painting a background image into the scene
Post by: EgonOlsen on April 13, 2011, 10:40:20 pm
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.