﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>C++博客-diceidea-随笔分类-Ogre</title><link>http://www.cppblog.com/diceidea/category/8161.html</link><description>parser</description><language>zh-cn</language><lastBuildDate>Wed, 03 Sep 2008 09:41:19 GMT</lastBuildDate><pubDate>Wed, 03 Sep 2008 09:41:19 GMT</pubDate><ttl>60</ttl><item><title>Blender+Ogre Preview</title><link>http://www.cppblog.com/diceidea/archive/2008/09/03/60827.html</link><dc:creator>diceidea</dc:creator><author>diceidea</author><pubDate>Wed, 03 Sep 2008 08:19:00 GMT</pubDate><guid>http://www.cppblog.com/diceidea/archive/2008/09/03/60827.html</guid><wfw:comment>http://www.cppblog.com/diceidea/comments/60827.html</wfw:comment><comments>http://www.cppblog.com/diceidea/archive/2008/09/03/60827.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/diceidea/comments/commentRss/60827.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/diceidea/services/trackbacks/60827.html</trackback:ping><description><![CDATA[<ol style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in; font-family: calibri; font-size: 11pt;" type="1">
    <li value="1" style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;" lang="zh-CN"><span style="font-family: SimSun; font-size: 11pt;">开发背景</span></li>
</ol>
<p style="margin: 0in 0in 0in 0.375in; font-size: 11pt;"><span style="font-family: calibri;" lang="en-US">Ogre</span><span style="font-family: simsun;" lang="zh-CN">和</span><span style="font-family: calibri;" lang="en-US">Blender</span><span style="font-family: simsun;" lang="zh-CN">都是开源软件中的佼佼者，前者提供了作为一个</span><span style="font-family: calibri;" lang="en-US">real</span><span style="font-family: simsun;" lang="en-US"> time renderer</span><span style="font-family: simsun;" lang="zh-CN">的各种要素，后者作为</span><span style="font-family: simsun;" lang="en-US">offline</span><span style="font-family: simsun;" lang="zh-CN">的</span><span style="font-family: simsun;" lang="en-US">animation renderer</span><span style="font-family: simsun;" lang="zh-CN">和</span><span style="font-family: simsun;" lang="en-US">model</span><span style="font-family: simsun;" lang="zh-CN">工具</span><span style="font-family: simsun;" lang="en-US">, </span><span style="font-family: simsun;" lang="zh-CN">根据</span><span style="font-family: simsun;" lang="en-US">Ogre</span><span style="font-family: simsun;" lang="zh-CN">官网上的资料及一些开源爱好者的建议，可以作为</span><span style="font-family: simsun;" lang="en-US">level editor</span><span style="font-family: simsun;" lang="zh-CN">来与外部的</span><span style="font-family: simsun;" lang="en-US">renderer</span><span style="font-family: simsun;" lang="zh-CN">或者是游戏引擎合作。有了这两个强大的工具，其他诸如声音物理等等模块可以依赖于其他的开源工具很方便的解决，这也为我们呈现了一种低成本的游戏开发解决方案。</span></p>
<p style="margin: 0in 0in 0in 0.375in; font-family: simsun; font-size: 11pt;" lang="zh-CN">&nbsp;</p>
<p style="margin: 0in 0in 0in 0.375in; font-family: simsun; font-size: 11pt;" lang="zh-CN">&nbsp;</p>
<ol style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in; font-family: simsun; font-size: 11pt;" type="1">
    <li value="2" style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;" lang="zh-CN"><span style="font-family: SimSun; font-size: 11pt;">案例</span></li>
</ol>
<p style="margin: 0in 0in 0in 0.375in; font-size: 11pt;"><span style="font-family: simsun;" lang="zh-CN">下面是一个使用这些混合物来开发的游戏（</span><a href="http://www.ogre3d.org/phpBB2/viewtopic.php?t=29907&amp;start=25&amp;postdays=0&amp;postorder=asc&amp;highlight="><span style="font-family: calibri;" lang="en-US">Mulver</span></a><span style="font-family: simsun;" lang="zh-CN">），质量考究：</span></p>
<p style="margin: 0in 0in 0in 0.375in; font-size: 11pt;"><span style="font-family: simsun;" lang="zh-CN">以下文字和图片摘自：<a href="http://www.ogre3d.org/phpBB2/viewtopic.php?t=29907&amp;postdays=0&amp;postorder=asc&amp;start=0">http://www.ogre3d.org/phpBB2/viewtopic.php?t=29907&amp;postdays=0&amp;postorder=asc&amp;start=0</a>，版权属于原作者<br></span></p>
<p style="margin: 0in 0in 0in 0.375in; font-family: Calibri; font-size: 11pt;"><span lang="en-US">My alltime favourite game is Super Mario 64. In my eyes its still
the king of the 3D Platform game category. Some people </span><a href="http://www.stevestreeting.com/?p=448"><span lang="zh-CN">http://www.stevestreeting.com/?p=448</span></a><span lang="en-US"> just dont get this genre though.</span></p>
<p style="margin: 0in 0in 0in 0.375in; font-family: Calibri; font-size: 11pt;">Anyway
I have been trying to make a similar game using Ogre of course and a couple of
other open source libraries out there ODE, LUA, OIS, FMod (not OS). I have also
used AC3D for some modelling and Blender for Level Design and modelling. </p>
<p style="margin: 0in 0in 0in 0.375in; font-family: calibri; font-size: 11pt;" lang="zh-CN">&nbsp;</p>
<p style="margin: 0in 0in 0in 0.375in; font-family: Calibri; font-size: 11pt;">Its
intresting that the core engine and first test level was up and running just a
couple of months after I started in May 2006. But to create a useful Art/level
pipeline took much longer than I expected. I took a long break from programming
during autumn and winter but still it was almost as much work as writing the
game engine! Learning Python programming and the Blender Python API was also an
intresting experience. Don forget those tabs </p>
<p style="margin: 0in 0in 0in 0.375in; font-family: calibri; font-size: 11pt;" lang="zh-CN">&nbsp;</p>
<p style="margin: 0in 0in 0in 0.375in; font-family: Calibri; font-size: 11pt;">Levels
are built in Blender using a custom level exporter together with reimpells Ogre
mesh exporter. The generated levels are just LUA scripts that calls into the
game engine to set up the world and handle events. </p>
<p style="margin: 0in 0in 0in 0.375in; font-family: calibri; font-size: 11pt;" lang="zh-CN">&nbsp;</p>
<p style="margin: 0in 0in 0in 0.375in; font-family: Calibri; font-size: 11pt;">FMod
integration and building a Demo with 5 complete levels is my next step. And
getting rid of the crappy programmer art of course. That will be a tough one...
</p>
<p style="margin: 0in 0in 0in 0.375in; font-family: calibri; font-size: 11pt;" lang="zh-CN">&nbsp;</p>
<p style="margin: 0in 0in 0in 0.375in; font-family: calibri; font-size: 11pt;" lang="zh-CN">&nbsp;<span class="postbody">
Here is a level concept with good old pen &amp; paper I wrote a couple of days ago:
<br>
<a href="http://eredluin.web.surftown.se/Projects/Mulver/Files/LevelConcept.png" target="_blank" class="postlink"><img src="http://eredluin.web.surftown.se/Projects/Mulver/Files/Thumbs/LevelConcept.png" border="0"></a>
<br>
<br>
Here is the level starting to take shape in Blender. Last shot is a Blender render of the level.
<br>
<a href="http://eredluin.web.surftown.se/Projects/Mulver/Files/BlenderLvl1.png" target="_blank" class="postlink"><img src="http://eredluin.web.surftown.se/Projects/Mulver/Files/Thumbs/BlenderLvl1.png" border="0"></a>...<a href="http://eredluin.web.surftown.se/Projects/Mulver/Files/BlenderLvl2.png" target="_blank" class="postlink"><img src="http://eredluin.web.surftown.se/Projects/Mulver/Files/Thumbs/BlenderLvl2.png" border="0"></a>...<a href="http://eredluin.web.surftown.se/Projects/Mulver/Files/BlenderLvlRender.png" target="_blank" class="postlink"><img src="http://eredluin.web.surftown.se/Projects/Mulver/Files/Thumbs/BlenderLvlRender.png" border="0"></a>
<br>
<br>
<br>
Here is the level in Ogre:
<br>
<a href="http://eredluin.web.surftown.se/Projects/Mulver/Files/OgreLvl1.png" target="_blank" class="postlink"><img src="http://eredluin.web.surftown.se/Projects/Mulver/Files/Thumbs/OgreLvl1.png" border="0"></a>...<a href="http://eredluin.web.surftown.se/Projects/Mulver/Files/OgreLvl2.png" target="_blank" class="postlink"><img src="http://eredluin.web.surftown.se/Projects/Mulver/Files/Thumbs/OgreLvl2.png" border="0"></a>...<a href="http://eredluin.web.surftown.se/Projects/Mulver/Files/OgreLvl3.png" target="_blank" class="postlink"><img src="http://eredluin.web.surftown.se/Projects/Mulver/Files/Thumbs/OgreLvl3.png" border="0"></a>
<br>
<br>
<br>
<br>
AVI video (Microsoft encoded Im afraid):
<br>
<a href="http://eredluin.web.surftown.se/Projects/Mulver/Files/Mulver.avi" target="_blank" class="postlink"><span style="font-weight: bold;">Video ~10Mb (mp42 codec)</span></a>
<br>
<br>
Older format:
<br>
<a href="http://eredluin.web.surftown.se/Projects/Mulver/Files/Mulver_mpg4.avi" target="_blank" class="postlink"><span style="font-weight: bold;">Video ~10Mb (mpg4 codec)</span></a>
<br>
<br>
<br>
<br>
A couple of other levels Ive been toying with:
<br>
<a href="http://eredluin.web.surftown.se/Projects/Mulver/Files/OgreLvl4.png" target="_blank" class="postlink"><img src="http://eredluin.web.surftown.se/Projects/Mulver/Files/Thumbs/OgreLvl4.png" border="0"></a>...<a href="http://eredluin.web.surftown.se/Projects/Mulver/Files/OgreLvl5.png" target="_blank" class="postlink"><img src="http://eredluin.web.surftown.se/Projects/Mulver/Files/Thumbs/OgreLvl5.png" border="0"></a>
</span></p>
<p style="margin: 0in 0in 0in 0.375in; font-family: calibri; font-size: 11pt;" lang="zh-CN">&nbsp;</p>
<p style="margin: 0in 0in 0in 0.375in; font-family: Tahoma; font-size: 8pt; color: #666666;">Pasted from &lt;<a href="http://www.ogre3d.org/phpBB2/viewtopic.php?t=39835&amp;view=next&amp;sid=ce193664e1d3d7c4af509e6f4e2718c6">http://www.ogre3d.org/phpBB2/viewtopic.php?t=39835&amp;view=next&amp;sid=ce193664e1d3d7c4af509e6f4e2718c6</a>&gt;
</p>
<p style="margin: 0in 0in 0in 0.375in; font-family: calibri; font-size: 11pt;" lang="zh-CN">&nbsp;</p>
<ol style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in; font-family: simsun; font-size: 11pt;" type="1">
    <li value="3" style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;" lang="zh-CN"><span style="font-family: SimSun; font-size: 11pt;">开发步骤：</span></li>
</ol>
<p style="margin: 0in 0in 0in 0.375in; font-size: 11pt;"><span style="font-family: simsun;" lang="zh-CN">网上有一些关于如何合作使用</span><span style="font-family: calibri;" lang="en-US">Blender</span><span style="font-family: simsun;" lang="zh-CN">和</span><span style="font-family: calibri;" lang="en-US">Ogre</span><span style="font-family: simsun;" lang="zh-CN">的建议：</span></p>
<p style="margin: 0in 0in 0in 0.375in; font-family: Calibri; font-size: 11pt;">The
Blender-Ogre process</p>
<p style="margin: 0in 0in 0in 0.375in; font-family: Calibri; font-size: 11pt;"><span lang="en-US">So, it is decision time - how will I go about making levels</span><span lang="zh-CN">&#8230;</span><span lang="en-US"> Three level choices, as I see it : </span></p>
<p style="margin: 0in 0in 0in 0.375in; font-family: Calibri; font-size: 11pt;">1)
Build my own level editor, build an importer, generate the levels</p>
<p style="margin: 0in 0in 0in 0.375in; font-family: Calibri; font-size: 11pt;">2)
Use Blender to build the scene, export all the meshes, export the scene to
dotscene format and bring it in that way, using the generic Ogre scene manager</p>
<p style="margin: 0in 0in 0in 0.375in; font-family: Calibri; font-size: 11pt;">3)
Use Blender to build the scene, export all the meshes, export the scene to
dotscene format, then import it to octree and bring it in using the Ogre octree
scene manager</p>
<p style="margin: 0in 0in 0in 0.375in; font-family: Calibri; font-size: 11pt;"><span lang="en-US">My understanding is that 3 has speed advantages. Don</span><span lang="zh-CN">&#8217;</span><span lang="en-US">t really understand it all yet. More
research needed. Probably NOT going to do 1, though - It&#8217;d be doable,
particularly if I limited myself to rectangular, perpendicular rooms, but it&#8217;d
be nice to be able to NOT limit myself that way.</span></p>
<p style="margin: 0in 0in 0in 0.375in; font-family: Calibri; font-size: 11pt;">More
reading, more research.</p>
<p style="margin: 0in 0in 0in 0.375in; font-family: calibri; font-size: 11pt;" lang="zh-CN">&nbsp;</p>
<p style="margin: 0in 0in 0in 0.375in; font-family: SimSun; font-size: 11pt;">Pasted from &lt;<a href="http://israndomrandom.com/">http://israndomrandom.com/</a>&gt;<br><br>&nbsp; <br><br><span style="font-family: SimSun; font-size: 11pt;">&nbsp; 4. 参考资料：</span></p>
<p style="margin: 0in 0in 0in 0.375in; font-family: simsun; font-size: 11pt;" lang="zh-CN">加州大学河滨分校的课程：</p>
<p style="margin: 0in 0in 0in 0.375in; font-family: calibri; font-size: 11pt;" lang="zh-CN"><a href="http://www.cs.ucr.edu/~macchiea/cs134/">http://www.cs.ucr.edu/~macchiea/cs134/</a></p>
<p style="margin: 0in 0in 0in 0.375in; font-family: calibri; font-size: 11pt;" lang="zh-CN"><span style="background-color: yellow;">Note：这个教程很好，课程名叫做Videogame Creation and Design，学完这门课程，基本上可以用Blender配合Ogre及其他的开源库做出一个游戏来</span></p>
<p style="margin: 0in 0in 0in 0.375in; font-family: calibri; font-size: 11pt;" lang="zh-CN"><a style="background-color: yellow;" href="http://www.cs.ucr.edu/~macchiea/cs134/"><br></a><a href="http://www.cs.ucr.edu/%7Emacchiea/cs134"></a></p><img src ="http://www.cppblog.com/diceidea/aggbug/60827.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/diceidea/" target="_blank">diceidea</a> 2008-09-03 16:19 <a href="http://www.cppblog.com/diceidea/archive/2008/09/03/60827.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>