Video Texture player

Hi Ashsid,

If you can get a video-camera & webcam as a video source on your video layers, and deliver that for us all to use, I will personally pay you £50.

How about it?

Alistair

F1LT3R,

here you are - new version of video texture plugin contains possibility to use camera devices as video sources. As the first release with this feature it doesn’t contain options to setup camera source (image sizes, framerate…).

Test it and write your opinions.

A Linux version, please…pleaaaaaaaase!! :slight_smile:

the videos dont even show in a seperate window for me anymore… nothing :,(

and, it crashes blender when i press return…

Same here.

I havent had a chance to use the camera toy yet, but cant wait to try that one out.:smiley:

In the meantime im trying to figure out if the video texture planes can fade in and out using the alpha channel. I havent had much luck both with setting ColA ipo’s or iterating through the vertex data in python.

Is it possible ashsid, have i been doing things wrong, heres an attached blend of my attempt.

http://d.turboupload.com/d/669766/scanner_darklyUPLOAD.blend.html

Cheers

The way alpha works with ipos is colA=1=visible, colA=0=invisible only if colR colG and colB are set so color is white eg all equal to 1.

here is it in action, I did NOT include the video files or dll

http://www.savefile.com/files/3371972

enjoy :smiley:

blender crashes when i try that too… yup…

Hi Siegel,

Thanks for the info and .blend its helped me out no-end! Nice One:D :smiley:

this rocks!

i’m not getting much of a frame per second loss even with both videos playing…pity i don’ own a web cam :frowning:

tnx for the hard work can wait for the updates

thank you very much for your work, it’s very good !!!

i tryed with a webcam, it work well but it’s very slow (4f/s), with the video files I’ve got 60f/s on my computer (windows2000pro, PIII 1ghz, 500mo ram)

I am working with the software Eyesweb and I wonder if it could be possible to mix the webcam video in Eyesweb in realtime and to send it to blender , for example in oder to soustract the background of somebody .
May be you know something about that?

Hi there , i have tested the plugin , and it is good
but is there alpha in the videos ¿

Upcomming updates:
I’m currently testing changes in this plugin that allow to use Blender Materials in Game Engine. I wasn’t able to find a way how to get from engine information if Blender materials are used or not, so I added function setBlendMat(bm), that has to be called at game startup to specify usage of Blender materials.
I also added possibility to specify material (and texture, if Blender Materials are used) which will be used for video replay. This can allow for example to create cube with different video on each side.

nice one ashsid, cant wait! :slight_smile:

:confused: For me it doesn’t do anything, I load it up and it just shows the x’s.:confused:

I’m running with an intel pentium D CPU 3.00GHz, 1 GB of RAM
and I have a ATI Radeon X1300 as my graphics card

tml4ever14,

For me it doesn’t do anything, I load it up and it just shows the x’s.
Have you tried to press Space or Enter?

Finally I have finished testing and released new version of Blender Game Texture Video plugin. It allows to use Blender Materials option and also allows to choose, in which material and texture will be video played.

Very kewl ashsid, but iit just isnt working for me. It gives no errors or error logs. when i press p the movies dont show and when i press space blender crashes :(, any ideas what could be wrong?

My Specs:
Blender Preview40(ver after RC1)
WinXp
Intel Pentium 4 2.5Ghz
512mb DRAM
128Mb ATI Randeon9500 Pro

ashsid: At first I thought “Why not just use FMV?” because I thought you were talking about cutscenes, but then I saw some of the screenshots. Amazing! Video running in realtime!

Originally Posted by ashsid
Performance tip: most important performance hog seems to be scaling of video image sizes to power of 2 values. I have uploaded new version of demo, where video size is 256 x 128. Performance has been much improved by this change.

Yes, this is true, but to be entirely accurate, scaling shoud be in multiples of 64. This applies for textures as well. When you use an odd scale, BGE actually has to scale the image or movie down to multiples of 64, which is a major resource hog. If people don’t use multiples of 64 in their games, I can’t even play them because my video card doesn’t have enough memory to take the abuse.

TO ALL: Please always use multiples of 64 for your texture (image or movie) dimensions. Examples: 64 x 64, 128 x 256, 1024 x 768, 384 x 512… You will be happy with yourself for doing it because your game will run smoother, and less people will say “It runs sooooo slooooow on my PC!” In case you’re wondering, this scaling issue is standard for all game engines (not just Blender’s) due to the binary nature of computer memory.

edit: Me and my big foot in my mouth. It seems I was wrong. Powers of 2, not multiples of 64. See ashsid’s next post for proof and my next post for where I got the idea.

Siegel,

plugin is compiled for Blender 2.41 - I plan to upgrade it for 2.42 soon after it will be released.

blendenzo,

this is code from Blender sources - file drawmesh.c function set_tpage(), that shows that scaling is done also when size is 384 or 768:

        if (!is_pow2(rectw) || !is_pow2(recth)) {
            rectw= smaller_pow2(rectw);
            recth= smaller_pow2(recth);
            
            scalerect= MEM_mallocN(rectw*recth*sizeof(*scalerect), "scalerect");
            gluScaleImage(GL_RGBA, tpx, tpy, GL_UNSIGNED_BYTE, rect, rectw, recth, GL_UNSIGNED_BYTE, scalerect);
            rect= scalerect;
        }