Alpha Channel BGE Multi Video Texture Testing

Subscribers:
261
Published on ● Video Link: https://www.youtube.com/watch?v=AerzpPrSRmQ



Category:
Let's Play
Duration: 1:48
960 views
5


This is 5 videos in total playing back realtime in BGE, with one of the videos (my old Q2 transition) overlaying using the video's alpha channel, sortof like a downstream key. Blender 2.62, no coding done myself. This has a limitation though; and quite a severe one. This is implimented using Single Texture mode, if I switch the renderer to GLSL only a single video is shown on all surfaces. I don't know if this is a limitation of Blender's BGE videoTexture or just a limitation/conflict with the way this script works. Without GLSL this is actually pretty useless as potential a broadcast graphics solution; without nice materials and shadows it's not so good; though as a mixer or monitor it could work. If anynyan is able to get this working in GLSL I would be very grateful! As it stands the setup is really quite a pain (though it's unlikely anyone would need more then a few sources; you can always change whatever is drawing to those surfaces since BGE videoTexture is quite flexible as I'm sure is plain to see from this and other videos here on YT. I was also able to get a single video to playback as an orthographic overlay scene in another file, though not this one (was more concerned with getting multiple videos to play, which I could not achieve in the other file I found (which also supports synced audio; likely not difficult to add to this one). Due to fraps recording the framerate drops quite a bit, however normally the Blender and fraps framerate counter show a stable 60fps even with all of these videos. Pardon the stretching of them but I didn't want to spend a bunch of time redoing everything to get proper aspect ratios, just was trying it out and expanding beyond the original 2 videos this supported. The clips are all 30fps, the top left Miku one (which this music is also from) is 720p, the PSO clip is 960x860 or something, the alpha overlay is vga, and the Sailor Moon and monkey clips are near-vga resolution. I attempted doing this with one of my long Quake duel videos I've recently uploaded here but Blender locked up, I'm not sure if that was because it took too long to preprocess or it just didn't have the memory for it or what. I doubt it's either of those cases really, as you can see in the end screenshot memory usage is quite good and so is CPU (Phenom II x6 2.8, 8gb, 1gb 6670, video's don't appear to be dropping frames) . Anyways enough blabbering; the blend is available here: http://www.pasteall.org/blend/12234

Replace the videos with your own by copying video files into whatever folder this file is in, and then in Blender go to each object and in it's Game properties set the filename for the "movie" property. I take zero credit for the ingenuity of this script. More features are needed of course; unfortunately I lack the python to do it. If anynyan improves upon this please share the blend!

Tested in 2.62.







Tags:
blender
3d
bge
game
engine
render
video
texture
test
testing
2.62
2.5
2.6
videotexture
miku
sailor
moon
broadcast
graphics
alpha
channel
downstream
key
pso