2.5 Video Texture

Hello Blenderheads. So I’m starting yet another crazy game engine venture. This time I’m in dire need of the video texture module. Right now it’s posing some tricky bits.

As always, I’ll be using whatever information we can gather together to make the official documentation better. :cool:

Here’s where we start:
http://www.blender.org/documentation/blender_python_api_2_59_0/bge.texture.html

Here’s my problem: I want to use “ImageRender” to get the imagery from one camera and paste that “video” on to something. Simple enough?

K. let’s figure it out.

Does this help? I know this tutorial is done in 2.49, but it looks like there’s a2.5 demo blend file there.
http://www.tutorialsforblender3d.com/Game_Engine/VideoTexture/VideoTexture_Mirror_1.html
m

That’s a good start! Thanks. Though, the mode being used in that one is VideoTexture.ImageMirror, something that’s built in to the VideoTexture module. The scene only has one camera.

Imagine camera 1 as your “eyes”, and camera two like… well, a video camera in your hands and then imagine the texture as a tV hooked up to the camera in your hands. Make sense?

Video texture has not been working on certain windows computers with 2.5. It still has yet to be fixed. [sigh] we never had problems like this in 2.49b

Ok. I’m on a mac, and so is my buddy I’m doing this project with. Does that make me exempt from the issue? :eyebrowlift:

OK, i figured it out. Now I’m going to clean this example up, and put it in the wiki. Thanks for the link to the mirror example. That got me pointed in the right direction.VideoTexture_ImageRender.blend (592 KB)

So it would appear I have a new problem:

http://www.blender.org/documentation/blender_python_api_2_59_0/bge.texture.html#bge.texture.ImageRender

ImageRender has a limited resolution of what looks like 512x512 (?)

I attempted to access size through python and got

“AttributeError: attribute ‘size’ of ‘VideoTexture.ImageRender’ objects is not writable”

Try capsize? I don’t use this module, but the documentation indicates it.

If You find a solution to this, pleas tell… I stumbled by the opposite reason - I want to limit resolution to 256x256 (even if it will render on a larger plane) to emulate early 80’s camcorder…

You got it, agoose77! The syntax is as follows.

myVideo.source = VideoTexture.ImageRender(myScene, videoCamera)
myVideo.source.capsize = 512,512

The “cap” in capsize is disappointing. LaH, great for you, but sucky for me. You can go down in size, but not up by much. Damn. I’m not sure, but 800x800 seems to be the limit (edit: for my machine)

What is Image Render? Is it the same as render to texture?