<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Maratis forum - Game Cinematics]]></title>
		<link>http://forum.maratis3d.com/viewtopic.php?id=536</link>
		<description><![CDATA[The most recent posts in Game Cinematics.]]></description>
		<lastBuildDate>Sun, 09 Feb 2014 22:27:32 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Game Cinematics]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=6388#p6388</link>
			<description><![CDATA[<p>Hi, Anael. Thank you very much for posting those code samples. It looks like this may take a while because the libtheoraplayer API is only built for Windows and Mac OSX/iOS (at least, that&#039;s what&#039;s indicated on the site). I think (because I&#039;m a Linux user) I&#039;m going to have to build my own Theora video API from scratch.</p><p>When I make some progress, I will be sure to let you know. Thanks again.</p>]]></description>
			<author><![CDATA[dummy@example.com (sunnystormy)]]></author>
			<pubDate>Sun, 09 Feb 2014 22:27:32 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=6388#p6388</guid>
		</item>
		<item>
			<title><![CDATA[Re: Game Cinematics]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=6372#p6372</link>
			<description><![CDATA[<p>For the sound I need to check, try to do that first and get back to me.</p>]]></description>
			<author><![CDATA[dummy@example.com (anael)]]></author>
			<pubDate>Sun, 09 Feb 2014 10:52:49 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=6372#p6372</guid>
		</item>
		<item>
			<title><![CDATA[Re: Game Cinematics]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=6371#p6371</link>
			<description><![CDATA[<p>To bind c++ code in lua, look at this doc : <a href="http://wiki.maratis3d.org/index.php?title=MScriptContext">http://wiki.maratis3d.org/index.php?tit &#133; iptContext</a></p><p>What you could do is something like that :</p><div class="codebox"><pre><code>TheoraVideoManager * mgr = NULL;

// bind all your functions here (see wiki)

void StartPlugin(void)
{
    MEngine * engine = MEngine::getInstance();
    MScriptContext* script = engine-&gt;getScriptContext();

    // create the video manager
    mgr = new TheoraVideoManager();

    // register the script functions
    script-&gt;addFunction(&quot;loadVideoClip&quot;, loadVideoClip);
    script-&gt;addFunction(&quot;updateVideoClip&quot;, updateVideoClip);
    script-&gt;addFunction(&quot;playClip&quot;, playClip);
    script-&gt;addFunction(&quot;pauseClip&quot;, pauseClip);
    script-&gt;addFunction(&quot;stopClip&quot;, stopClip);
    script-&gt;addFunction(&quot;destroyVideoClip&quot;, destroyVideoClip);
    //etc...
}

void EndPlugin(void)
{
    // delete the video manager
    SAFE_DELETE(mgr);
}</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (anael)]]></author>
			<pubDate>Sun, 09 Feb 2014 10:51:05 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=6371#p6371</guid>
		</item>
		<item>
			<title><![CDATA[Re: Game Cinematics]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=6369#p6369</link>
			<description><![CDATA[<p>Hi, sorry I missed this post.</p><p>First, here&#039;s how you will send the video data to a texture in C++ :</p><div class="codebox"><pre><code>MEngine * engine = MEngine::getInstance();
MSystemContext * system = engine-&gt;getSystemContext();
MRenderingContext * render = engine-&gt;getRenderingContext();
MLevel * level = engine-&gt;getLevel();

// get a texture reference that will receive the video stream
char globalFilename[256];
getGlobalFilename(globalFilename, system-&gt;getWorkingDirectory(), name); // &quot;name&quot; if a local path like &quot;maps/dummy.png&quot;
MTextureRef * texture = level-&gt;loadTexture(globalFilename, 0, 0);

// send the video clip data to the texture
TheoraVideoFrame * f = clip-&gt;getNextFrame();
if(f)
{
    unsigned int textureId = texture-&gt;getTextureId();
    if(textureId == 0)
    {
        render-&gt;createTexture(&amp;textureId);
        texture-&gt;setTextureId(textureId);
    }

    render-&gt;bindTexture(textureId);
    render-&gt;setTextureFilterMode(M_TEX_FILTER_LINEAR, M_TEX_FILTER_LINEAR);
    render-&gt;setTextureUWrapMode(M_WRAP_CLAMP);
    render-&gt;setTextureVWrapMode(M_WRAP_CLAMP);
    render-&gt;texImage(0, clip-&gt;getWidth(), clip-&gt;getHeight(), M_UBYTE, M_RGB, f-&gt;getBuffer());
}</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (anael)]]></author>
			<pubDate>Sun, 09 Feb 2014 10:32:45 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=6369#p6369</guid>
		</item>
		<item>
			<title><![CDATA[Re: Game Cinematics]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=6368#p6368</link>
			<description><![CDATA[<p>Sorry to double-post, but I haven&#039;t gotten a response yet:</p><p>I was looking over the documentation, and I&#039;m still trying to figure out how to map the OGG Theora video data as a texture onto a game object passed through Lua into the C++ interface. Mind giving me a point in the right direction, Anael?</p><p>Thanks.</p>]]></description>
			<author><![CDATA[dummy@example.com (sunnystormy)]]></author>
			<pubDate>Sun, 09 Feb 2014 03:46:38 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=6368#p6368</guid>
		</item>
		<item>
			<title><![CDATA[Re: Game Cinematics]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=6295#p6295</link>
			<description><![CDATA[<p>Hey, Anael. Glad you like it!</p><p>Is there a way of being able to manually map the texture of a game object through the engine&#039;s Lua interface? Please let me know.</p>]]></description>
			<author><![CDATA[dummy@example.com (sunnystormy)]]></author>
			<pubDate>Thu, 30 Jan 2014 15:23:19 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=6295#p6295</guid>
		</item>
		<item>
			<title><![CDATA[Re: Game Cinematics]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=6283#p6283</link>
			<description><![CDATA[<p>it looks quite good, BSD is more adapted to commercial purpose,<br />and there is even support for H.264 on ios and mac !</p>]]></description>
			<author><![CDATA[dummy@example.com (anael)]]></author>
			<pubDate>Wed, 29 Jan 2014 19:36:42 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=6283#p6283</guid>
		</item>
		<item>
			<title><![CDATA[Re: Game Cinematics]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=6282#p6282</link>
			<description><![CDATA[<p>I found this just now: <a href="http://sourceforge.net/projects/libtheoraplayer/">http://sourceforge.net/projects/libtheoraplayer/</a></p><p>It has a BSD license. Will that be more permissive for commercial purposes, Anael?</p><p>EDIT:</p><p>More info here: <a href="http://libtheoraplayer.cateia.com/wiki/index.php?title=Main_Page">http://libtheoraplayer.cateia.com/wiki/ &#133; =Main_Page</a></p><p>Sample class here: <a href="http://libtheoraplayer.cateia.com/wiki/index.php?title=Tutorial">http://libtheoraplayer.cateia.com/wiki/ &#133; e=Tutorial</a></p>]]></description>
			<author><![CDATA[dummy@example.com (sunnystormy)]]></author>
			<pubDate>Wed, 29 Jan 2014 18:43:58 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=6282#p6282</guid>
		</item>
		<item>
			<title><![CDATA[Re: Game Cinematics]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=6270#p6270</link>
			<description><![CDATA[<p>Ah, okay. It&#039;s says it&#039;s LGPL v3, which I think is pretty liberal? I used this site: <a href="http://www.tldrlegal.com/license/gnu-lesser-general-public-license-v3-%28lgpl-3.0%29">http://www.tldrlegal.com/license/gnu-le &#133; gpl-3.0%29</a> to try to figure out if it was worth bothering with.</p><p>If it turns out that this is something I&#039;d have to manually build using Theora/Vorbis directly, I&#039;ll probably put it on the shelf until I get used to the Maratis plugin interface.</p><p>EDIT:</p><p>Also, is it currently possible to call game object textures from Lua? My understanding is that that&#039;s the only way to get the data from the video onto a plane using a plugin interface. Please correct me if I&#039;m wrong.</p>]]></description>
			<author><![CDATA[dummy@example.com (sunnystormy)]]></author>
			<pubDate>Tue, 28 Jan 2014 21:07:35 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=6270#p6270</guid>
		</item>
		<item>
			<title><![CDATA[Re: Game Cinematics]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=6269#p6269</link>
			<description><![CDATA[<p>The down side of liboggplayer is the GPL license, it&#039;s not a huge problem but it&#039;s not the best in case of commercial game,<br />I think theora is more permissive, but I checked it long ago.</p>]]></description>
			<author><![CDATA[dummy@example.com (anael)]]></author>
			<pubDate>Tue, 28 Jan 2014 20:58:04 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=6269#p6269</guid>
		</item>
		<item>
			<title><![CDATA[Re: Game Cinematics]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=6267#p6267</link>
			<description><![CDATA[<p>I found this: <a href="http://code.google.com/p/liboggplayer/">http://code.google.com/p/liboggplayer/</a> as a potential candidate for helping achieve OGG video-playback functionality.</p><p>A Mac version of the library will have to be compiled, but I&#039;m guessing we have some people here who can probably help out with that. <img src="http://forum.maratis3d.com/img/smilies/smile.png" width="15" height="15" alt="smile" /></p><p>I could see this working as a plugin IF you&#039;re able to map the data streamed from the video as a texture while writing your game logic. Otherwise, I think it would be best if video-playback were a core engine feature, and you would access it through the visual editor.</p>]]></description>
			<author><![CDATA[dummy@example.com (sunnystormy)]]></author>
			<pubDate>Tue, 28 Jan 2014 19:24:20 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=6267#p6267</guid>
		</item>
		<item>
			<title><![CDATA[Re: Game Cinematics]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=3342#p3342</link>
			<description><![CDATA[<div class="quotebox"><cite>Fady_osman wrote:</cite><blockquote><div class="quotebox"><cite>zester wrote:</cite><blockquote><p>If you decided this is a task you want to take on, use OpenCV instead of LibTheora or FFMPEG. Because ...</p><p>1. OpenCV already uses those librarys for video playback<br />2. Getting OpenCV to play video on&nbsp; texture is only a couple lines of code.<br />3. You get the added benefit of its builtin motion tracking, in a first person type game this feature could be used<br />to actualy look round a corner by slightly tilting and turning your head. Or controling a game in the sameway as Kinetic.</p><p>It would probable take 5min to get this feature implemented in the Maratis Engine and an hour for the Lua bindings. I could do it but everytime I even breath on those scon&#039;s build scripts they blow up in my face.</p></blockquote></div><p>Thanks i&#039;ll consider using OpenCV specially if it&#039;s easier to implement. I don&#039;t know about scons or even lua that much i started learning it for maratis.</p></blockquote></div><p>I have nothing to offer in the way of scons but for C/C++ and Lua this might help give you a better understand on how to tie C and Lua</p><p><a href="http://code.google.com/p/zester/wiki/Lua_C">http://code.google.com/p/zester/wiki/Lua_C</a></p><p>Scripting in Lua is very simular to Javascript except lighter and faster unless your comparing lua&#039;s speed and ease of use to Qt5 and the V8 Javascript Engine in that case Qt5/V8 win hands down.</p>]]></description>
			<author><![CDATA[dummy@example.com (zester)]]></author>
			<pubDate>Fri, 11 Jan 2013 19:10:39 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=3342#p3342</guid>
		</item>
		<item>
			<title><![CDATA[Re: Game Cinematics]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=3341#p3341</link>
			<description><![CDATA[<div class="quotebox"><cite>zester wrote:</cite><blockquote><p>If you decided this is a task you want to take on, use OpenCV instead of LibTheora or FFMPEG. Because ...</p><p>1. OpenCV already uses those librarys for video playback<br />2. Getting OpenCV to play video on&nbsp; texture is only a couple lines of code.<br />3. You get the added benefit of its builtin motion tracking, in a first person type game this feature could be used<br />to actualy look round a corner by slightly tilting and turning your head. Or controling a game in the sameway as Kinetic.</p><p>It would probable take 5min to get this feature implemented in the Maratis Engine and an hour for the Lua bindings. I could do it but everytime I even breath on those scon&#039;s build scripts they blow up in my face.</p></blockquote></div><p>Thanks i&#039;ll consider using OpenCV specially if it&#039;s easier to implement. I don&#039;t know about scons or even lua that much i started learning it for maratis.</p>]]></description>
			<author><![CDATA[dummy@example.com (Fady_osman)]]></author>
			<pubDate>Fri, 11 Jan 2013 18:55:17 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=3341#p3341</guid>
		</item>
		<item>
			<title><![CDATA[Re: Game Cinematics]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=3340#p3340</link>
			<description><![CDATA[<p>If you decided this is a task you want to take on, use OpenCV instead of LibTheora or FFMPEG. Because ...</p><p>1. OpenCV already uses those librarys for video playback<br />2. Getting OpenCV to play video on&nbsp; texture is only a couple lines of code.<br />3. You get the added benefit of its builtin motion tracking, in a first person type game this feature could be used<br />to actualy look round a corner by slightly tilting and turning your head. Or controling a game in the sameway as Kinetic.</p><p>It would probable take 5min to get this feature implemented in the Maratis Engine and an hour for the Lua bindings. I could do it but everytime I even breath on those scon&#039;s build scripts they blow up in my face.</p>]]></description>
			<author><![CDATA[dummy@example.com (zester)]]></author>
			<pubDate>Fri, 11 Jan 2013 18:30:31 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=3340#p3340</guid>
		</item>
		<item>
			<title><![CDATA[Re: Game Cinematics]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=3335#p3335</link>
			<description><![CDATA[<div class="quotebox"><cite>anael wrote:</cite><blockquote><p>Hi,</p><p>the engine doesn&#039;t have a integrated feature for reading video.</p><p>But you can use a 3rdparty library, like libtheora (to read ogg theora video) : <a href="http://www.theora.org/">http://www.theora.org/</a><br />I did it for a project some years ago, unfortunately I don&#039;t have the code anymore.</p><p>You read the stream and send the result to a texture using MRenderingContext</p><p>Or using FFMpeg maybe, but I never tried : <a href="http://ffmpeg.org/">http://ffmpeg.org/</a></p></blockquote></div><p>Well, thanks for the fast reply. And that was really helpfull thanks.</p>]]></description>
			<author><![CDATA[dummy@example.com (Fady_osman)]]></author>
			<pubDate>Fri, 11 Jan 2013 14:55:09 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=3335#p3335</guid>
		</item>
	</channel>
</rss>
