Some qwestion(classes, use video, swf...)

BonS

09-11-2006 13:38:31

1. I can't find next classes in namespaces Mogre, Mogre.Implementation :
- Controller
- ControllerValue
- ControllerFunction

2. How display video and swf files?
(How using in MOgre:
- FFmpeg Plugin or Theora Plugin or DirectShow
- Ogreswf)

Bekas

09-11-2006 15:50:02

1. These are abstract templates that seemed to me as not necessary for Ogre development. They provide general C++ functionality and such functionality should be translated to custom pure .NET classes. Ogre uses them internally but I'm under the impression that you don't have to access them directly.

If you think the above is not correct and you have a specific scenario which require them, let me know.

2. I don't know how these plugins work; does Ogre load them and you manipulate them through scripts or do you access them by code ?

pjcast

09-11-2006 17:33:39

For the video plugins, you would generally use them via Ogre::ExternalTextureSource and Ogre::ExternalTextureSourceManager. Now, they either operate via the StringCommand interface class, or via linking to them and using them directly (the theora plugin).. The theora plugin also requires you overload a class for audio, so maybe not too easy to try to wrap that. Though, the different plugins have some different usages via material scripts - depends on your needs, I suggest you play with them each (do not use the ffmpeg plugin).

What I really suggest for video is a) maybe MDX, or b) you can look into my fully managed theora decoder/codec here: www.wreckedgames.com/files/csTheora.zip You can look here for example code using that via Ogre and OgreDotNet (should be easily ported to MOGRE): http://www.ogre3d.org/phpBB2addons/viewtopic.php?t=1626

BonS

10-11-2006 14:30:13

Thank you for answers.


1. These are abstract templates that seemed to me as not necessary for Ogre development. They provide general C++ functionality and such functionality should be translated to custom pure .NET classes. Ogre uses them internally but I'm under the impression that you don't have to access them directly.

If you think the above is not correct and you have a specific scenario which require them, let me know.


I agree. Correcting is not required.


For the video plugins, you would generally use them via Ogre::ExternalTextureSource and Ogre::ExternalTextureSourceManager. Now, they either operate via the StringCommand interface class, or via linking to them and using them directly (the theora plugin).. The theora plugin also requires you overload a class for audio, so maybe not too easy to try to wrap that. Though, the different plugins have some different usages via material scripts - depends on your needs, I suggest you play with them each (do not use the ffmpeg plugin).


I got with CVS addon - Video Plugin, but now at me it is not Visual Studio C++, therefore to make attempt while does not turn out(I will be thankful if anybody will lay out compile dll for VideoPlugin). Possibility of the use of StringInterface I decided to consider on the example of WMVideo Plugin. But Ogre produces an error on the stage of addition of material video file. Later I will make attempt use the renewed version of this plugin. In this version SimpleInterface is used for playing of video in Python.


a) maybe MDX


How I understood MDX - this Managed DIRECTX
Probably to draw video in texture of Ogre it is possible with the help:
- AudioVideoPlayBack (as though there is possibility to draw in texture DirectX9)
- Wrapper for DirectShow - DirectShow.NET.

, but is it possible to use Sound Engine(FMOD, Bass...) for the output of videofile sound?


b) you can look into my fully managed theora decoder/codec here: www.wreckedgames.com/files/csTheora.zip You can look here for example code using that via Ogre and OgreDotNet (should be easily ported to MOGRE)


I novice in Ogre, can wrong therefore.

In OgreDotNet:

ResourcePtr resPtr = MaterialManager.Instance.Create(name+"_videotexture_material",
ResourceGroupManager.DEFAULT_RESOURCE_GROUP_NAME );
MaterialPtr mat = new MaterialPtr( ResourcePtr.getCPtr(resPtr).Handle, false);

In Mogre, only one constructor is accessible for MaterialPtr (MaterialPtr inherits Material) - MaterialPtr(Material mat). Construcor MaterialPtr(Uint handle,....) is not present.

I not am sure, but it is possibly necessary so:

Material mat = new Material(MaterialManager.Singltone, "name", resPtr.Handle, ....);

Bekas

10-11-2006 15:18:41

Use
MaterialPtr mat = MaterialManager.Singleton.Create(name + "_videotexture_material", ResourceGroupManager.DEFAULT_RESOURCE_GROUP_NAME);