Game Development Community

How to make the film material can be used, and can play?

by Szzg007 · in Torque 3D Professional · 05/14/2011 (8:53 pm) · 8 replies

Dear every friends. I would like to implement a virtual cinema T3D, I have a OGG and WMV files, I would try to write material script and run in the T3D in. But did not find a way how. A friend can give me some inspiration it?

#1
05/15/2011 (12:41 am)
ATM videos can only be played in the GUI. To use videos as textures, the code needs to be modified. It's not a huge change I guess (one straightforward way would be to just periodically upload the current frame to a texture and see if that comes out performing alright) but a change nonetheless.

//Edit: Just remembered the video code is already uploading the frame to a texture. That takes care of the refresh logic. So all that's missing is a) triggering the refreshes before rendering and b) referencing the texture from a material.
#2
05/15/2011 (1:00 am)
>So all that's missing is a) triggering the refreshes before rendering and b) referencing the texture from a material.
Very final wish item for T3D 1.1 Final? ;)
#3
05/15/2011 (4:40 am)
BTW, one way you can probably play all kinds of videos as textures already is by using the WebKit extension for T3D. You could embed players in an html page and play Flash videos and even interact with them.

Quote:>So all that's missing is a) triggering the refreshes before rendering and b) referencing the texture from a material.
Very final wish item for T3D 1.1 Final? ;)

:)

Not going to happen for 1.1 final but maybe I'll take a look and post it as a resource. NamedTexTarget should make this pretty trivial functionality to add.

//Edit: Looking at it, it appears so straightforward... think I'm going to take a stab at it today just for kicks.
#4
05/15/2011 (10:21 am)
Ok, have it implemented and running. It's only ~200 lines of code really. I'll post it as a resource soon.
#5
05/15/2011 (10:24 am)
>Ok, have it implemented and running.
As always, you're our hero, Rene!

>I'll post it as a resource soon.
Why you won't to integrate it into 1.1 Final, if this feature request so easy to implement?
#6
05/15/2011 (10:39 am)
Quote:As always, you're our hero, Rene!

:)

Quote:Why you won't to integrate it into 1.1 Final, if this feature request so easy to implement?

The reason is that T3D 1.1 is already in (quasi) lockdown and being beat up heavily by the QA guys. As hard as it is, at one point, you have to stop adding anything and only allow monitored changes to be made or there is never any chance you get a reasonably solid release.
#7
05/15/2011 (12:39 pm)
And resource is up.
#8
05/18/2011 (1:55 am)
thanks everybody.... that is super beautiful