Game Development Community

Place Video Within Torque Engine

by Mike Beaver · in Hardware Issues · 08/01/2007 (6:56 pm) · 1 replies

Anyone know how to place a video within the torque engine? I have modeled out a computer monitor and am trying to get a short video to play on it. Any help would be great!!!

About the author

Recent Threads


#1
08/04/2007 (10:20 am)
You can either use the Vorbis component to show 2D videos (meaning, run as 2D objects, as opposed to embedding them onto a 3D surface). This is pretty easy to do, the hardest part is figuring out how to convert your videos to .ogg format. Lots of links in the forums/resources to do this.

To display a video playing on a 3D surface, I'm not aware of an elegant way to do this. Two ideas:
1) Make a seies of shapebase images - like vid1.monitorview.png, vid2.monitorview.png, ... etc, with a frame for each of your frames in the video. Then, make a timer that changes the screen's shapebase image every 33 ms. (1/30 of a second), or as long as the image should show. Run the script, and it should work. It'll probably be choppy, get out of synch, and only look good if small.

2) Take over the users control, change the camera so that it's a set distance looking straight-on at the monitor. Then, show the 2D theora video mentioned above so that it looks like it's playing on the monitor. After the vdeo has played, give user camera control back.