Author Topic: Painting a background image into the scene  (Read 2659 times)

Offline Marlon

  • int
  • **
  • Posts: 74
    • View Profile
    • Forgotten Elements Action MMORPG
Painting a background image into the scene
« 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
www.forgottenelements.com
Free Action JAVA MMORPG

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Painting a background image into the scene
« Reply #1 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.