Video Texture player

I have released the first version of video player plugin to GameBlender. It allows to play video files in Blender game. It can be run on WinXP, Blender 2.41 and Python 2.4. It’s in early alpha stage, and contains almost no error handling.
I plan to release it under GPL because it uses some structures and functions from Blender codebase.
Try it and tell me your opinions and suggestions.

hello,

I’m very pleased to see that coming… I tried it but for myself, the video opens in a separate “active movie window” in place that being displayed on the surfaces in the 3d view… (winXP sp1 blender2.41)

Oops, that’s surprise for me. I think it means that TextureRenderer object wasn’t added to DirectShow graph and video is rendered using standard video window. This must be caused by some unhandled error in my dll. Will look at it ASAP. BTW, what version of DirectX you have?

I forgot to mention that Xvid decoder is also required, if you want to replay bundled videos.

0_0 woah holy cow. This is really cool, I hope you continue this until it’s perfect.

Hmm… would you be able to add in pause, stop, play particular time interval (1:00-1:30), etc? Would make the whole thing for game use very versatile.

Although would it be more efficient in the future (maybe have very little affect on the fps)? It’s a really big fps hog. Even on my P4 2.53 GHz, GEFORCE 6600GT, I get 44 fps, and when the left most video activates it drops to like 14 fps.

Heh, but great work by the way. I can see many people wanting to use this type of feature.

Jason Lin

My current plan is:

  1. Add error handling.
  2. Extend API to allow: play video clip n-times or infinitely; pausing; playing specified interval of frames; after clip will stop, leave last frame of clip or restore original texture.
  3. Performance improvements (btw on my Athlon 2500 it gives 20-25 fps while playing both videos - it’s on screenshot).

this is awesome, just what ive been waiting for!

like everyone else im getting low performance when both clips are playing 7-8fps but with just the one theres hardly any dropout, its going at about 70fps thats on a p4 3.2ghz 1gb ram. i guess its a seperate area entirely but different blending modes [additive/subtractive/multiply/divide] would be a great feature for me [not sure bout anyone else though:) ]

also im getting a bug owhen activating use blender materials- thats on blender 2.42preview6 python 2.4 with an ati mobility 9600.

cheers and keep up the good work!

will

mm… I reinstalled the directx9b and it didnt change :frowning: … I’m on a X700 ATI with Athlon64 3500+ …

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.

glitchCORD~ wrote:

different blending modes [additive/subtractive/multiply/divide] would be a great feature
yes, that’s right now beyond my focus - I’m just trying to allow video to do the same things as a standard texture does in GameBlender.

Blender Materials: Right now no support for them, this feature is on the end of my priority list, but of course it should not crash.

Olm-Z, I will add error logging to get description of your error.

WOW :slight_smile: Extreme Exciting

On my computer , it run FAST !!!

Good work

crashes for me, i have win xp home and radeon x600, python 2.4.3, crashes after hitting the trigger key

W O W ! :smiley:

didn’t work for me first time, but it works now - at 100fps no less!! Fantastic Work, really!

Is it possible to make a plugin like this that just loads jpeg images and maps them in the same way? I may be wrong, but in blender there does not seem to be a way to load in new images while a game is running, unless its running in the the editor. I really need that function for a project, but I cant make anything as COOL as this video player!

yeah this is what i get…

http://img130.imageshack.us/img130/5209/videotex5be.jpg

You need to put the blendVideoTex.dll in your blender directory I think. If its working correctly, you should see the videos playing on the plane objects. It works perfectly on my system, and its really nice!

yeah its in there^

I don’t suppose you considered doing a cross platform solution for this?

^^^ Ya, that would be nice, but it’s not gonna happen… :frowning: ^^^

I know mplayer does opengl output. I’ll try not to get too down on Microsoft, but can we spell vendor lock? Wrong version, wrong whatever. Even if you have Windows it’s update or die.

Wow I like that, definatly keep going! :smiley:
It runs very quick on my machine as you can see from this pic:
(My machines stats are in the picture.)
http://j-space.homedns.org/blender/images/videosplaying.jpg

i managed to run it, but the movies play in separate windows…

Lol, a little modest about the speed boost are we…

Originally, I had…

Lol, now with all the video planes playing, I get 400+ fps.

:DI can’t wait till the other features are added in making this complete. Heh, I’m just so excited about this feature.

Jason Lin