<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Qixis.com &#187; Frontpage</title>
	<atom:link href="http://www.qixis.com/category/frontpage/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.qixis.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Mon, 07 Sep 2009 11:37:31 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>3d engine tutorial, part 2</title>
		<link>http://www.qixis.com/2009/08/3d-engine-tutorial-part-2/</link>
		<comments>http://www.qixis.com/2009/08/3d-engine-tutorial-part-2/#comments</comments>
		<pubDate>Thu, 27 Aug 2009 16:14:00 +0000</pubDate>
		<dc:creator>Emiel</dc:creator>
				<category><![CDATA[Frontpage]]></category>
		<category><![CDATA[Qixis::Engine]]></category>

		<guid isPermaLink="false">http://www.qixis.com/?p=54</guid>
		<description><![CDATA[Hi, and welcome to the second part of 'Building an engine'. In the first part we learned something about the languages we're going to use and got to download the 3d engine as it stands now. Also, the engine was built and maybe even deployed to your iPhone. In this part we're going to look at the scene graph that makes up the 3d world and explain how the square in the example is rendered.]]></description>
			<content:encoded><![CDATA[<p>Hi, and welcome to the second part of &#8216;Building an engine&#8217;. In <a href="http://www.qixis.com/2009/08/3d-engine-tutorial-part-1/">the first part</a> we learned something about the languages we&#8217;re going to use and got to download the 3d engine as it stands now. Also, the engine was built and maybe even deployed to your iPhone.<br />
<br/><br />
In this part I&#8217;ll discuss one of the most basic building blocks of the engine: the scenegraph.</p>
<div class="chapter">Creating a scenegraph</div>
<p>Almost all 3d engines have a scene graph of some sort at their core and the Qixis engine is no exception. The scene graph is built up from one or more so called &#8216;nodes&#8217;. The root of the world is also a scenegraph node and is the data member m_root on the engine object. Since the engine object is a singleton, the engine, in its current incarnation, can handle one scene graph.<br />
<br/><br />
The basic building block of the scene graph is the &#8216;node&#8217;, a simple class mainly consisting of a position and an orientation in the 3d world. Take a look at this picture:</p>
<div style="overflow: hidden; background-color: white; margin: 3px;"><img src="/images/engine/p2-scene-withdata.png"/></div>
<p>Here we see a simple scenegraph. In the picture, for simplicity, it&#8217;s two dimensional. In the engine, of course, all coordinates are tree dimensional. This scene contains three nodes, named &#8216;A&#8217;, &#8216;B&#8217; and &#8216;C&#8217;. As you can see in the picture, all nodes have a position and an orientation (called &#8216;rotation&#8217; in the picture). These two attributes determine their positions in the world.<br />
<br/><br />
Every node has a parent. For most nodes, the world&#8217;s root node will be their parent, but it&#8217;s possible for a node to have child nodes. The position and orientation for child nodes is based on their parent nodes. In the picture, node B has node A as its parent. Its position is calculated by adding node B&#8217;s position and orientation to that of node A. Moving node A moves node B along with it. Rotating node A rotates node B too. This is very useful for 3d objects that are made up of multiple parts, like a plane consisting of a body part and a propellor. The propellor has to move and rotate with the plane while at the same time having its own rotation&#8230;<br />
<br/></p>
<div style="overflow: hidden; background-color: white; margin: 3px;"><img src="/images/engine/p2-scene.png"/>&nbsp;<img src="/images/engine/p2-scene-move.png"/><br/><img src="/images/engine/p2-scene.png"/>&nbsp;<img src="/images/engine/p2-scene-rotate.png"/></div>
<p><br/></p>
<div class="chapter">A bit of practice: Setting up a scene graph</div>
<p> In the &#8216;Init&#8217; function of the engine, we find the following code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
</pre></td><td class="code"><pre class="cpp" style="font-family:monospace;"><span style="color: #0000ff;">bool</span> Engine<span style="color: #008080;">::</span><span style="color: #007788;">Init</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span> 
<span style="color: #008000;">&#123;</span> 
    std<span style="color: #008080;">::</span><span style="color: #0000dd;">cout</span> <span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;Engine::Init(): &quot;</span> <span style="color: #000080;">&lt;&lt;</span><span style="color: #0000dd;">this</span> <span style="color: #000080;">&lt;&lt;</span>std<span style="color: #008080;">::</span><span style="color: #007788;">endl</span><span style="color: #008080;">;</span> 
<span style="color: #666666;">//// Construct a test node </span>
<span style="color: #666666;">// </span>
    Node <span style="color: #000040;">*</span>nd <span style="color: #000080;">=</span> <span style="color: #0000dd;">new</span> Node<span style="color: #008000;">&#40;</span><span style="color: #FF0000;">&quot;square&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> 
    iRenderable <span style="color: #000040;">*</span>rd <span style="color: #000080;">=</span> <span style="color: #0000dd;">new</span> Square<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> 
    nd<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>position <span style="color: #000080;">=</span> Vector3<span style="color: #000080;">&lt;</span>math_type<span style="color: #000080;">&gt;</span><span style="color: #008000;">&#40;</span><span style="color:#800080;">0.0f</span>, <span style="color:#800080;">0.0f</span>, <span style="color:#800080;">0.0f</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> 
    nd<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>orientation <span style="color: #000080;">=</span> Quaternion<span style="color: #000080;">&lt;</span>math_type<span style="color: #000080;">&gt;</span><span style="color: #008000;">&#40;</span>Vector3<span style="color: #000080;">&lt;</span>math_type<span style="color: #000080;">&gt;</span><span style="color: #008000;">&#40;</span><span style="color:#800080;">0.0f</span>, <span style="color:#800080;">1.0f</span>, <span style="color:#800080;">0.0f</span><span style="color: #008000;">&#41;</span>, <span style="color:#800080;">0.0f</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> 
    Node<span style="color: #008080;">::</span><span style="color: #007788;">RenderableInfo</span> ri<span style="color: #008080;">;</span>
    ri.<span style="color: #007788;">renderable</span> <span style="color: #000080;">=</span> rd<span style="color: #008080;">;</span> nd<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>renderables.<span style="color: #007788;">push_back</span><span style="color: #008000;">&#40;</span>ri<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> 
    m_root<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>AddChild<span style="color: #008000;">&#40;</span>nd<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> 
<span style="color: #666666;">// </span>
<span style="color: #666666;">//// </span>
    <span style="color: #0000ff;">return</span> <span style="color: #0000ff;">true</span><span style="color: #008080;">;</span> 
<span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

<p> These few lines of code actually fire up a large part of the engine. Let&#8217;s take a look at the code a few lines at a time.</p>

<div class="wp_syntax"><div class="code"><pre class="cpp" style="font-family:monospace;"><span style="color: #0000ff;">bool</span> Engine<span style="color: #008080;">::</span><span style="color: #007788;">Init</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span> 
<span style="color: #008000;">&#123;</span> 
<span style="color: #666666;">//// Construct a test node </span>
<span style="color: #666666;">// </span>
    Node <span style="color: #000040;">*</span>nd <span style="color: #000080;">=</span> <span style="color: #0000dd;">new</span> Node<span style="color: #008000;">&#40;</span><span style="color: #FF0000;">&quot;square&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> 
    iRenderable <span style="color: #000040;">*</span>rd <span style="color: #000080;">=</span> <span style="color: #0000dd;">new</span> Square<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span></pre></div></div>

<p> This code allocated and initializes two objects. The first is a scenegraph node (we&#8217;ll get to that later), the second an &#8216;iRenderable&#8217;-derived class Square. We&#8217;ll get to the renderables in the next tutorial.</p>

<div class="wp_syntax"><div class="code"><pre class="cpp" style="font-family:monospace;">    nd<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>position <span style="color: #000080;">=</span> Vector3<span style="color: #000080;">&lt;</span>math_type<span style="color: #000080;">&gt;</span><span style="color: #008000;">&#40;</span><span style="color:#800080;">0.0f</span>, <span style="color:#800080;">0.0f</span>, <span style="color:#800080;">0.0f</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> 
    nd<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>orientation <span style="color: #000080;">=</span> Quaternion<span style="color: #000080;">&lt;</span>math_type<span style="color: #000080;">&gt;</span><span style="color: #008000;">&#40;</span>Vector3<span style="color: #000080;">&lt;</span>math_type<span style="color: #000080;">&gt;</span><span style="color: #008000;">&#40;</span><span style="color:#800080;">0.0f</span>, <span style="color:#800080;">1.0f</span>, <span style="color:#800080;">0.0f</span><span style="color: #008000;">&#41;</span>, <span style="color:#800080;">0.0f</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span></pre></div></div>

<p>Every scenegraph node has a few attributes that it must have set. The position and orientation are mandatory and are initialized here to be at the coordinates (0, 0, 0) and have a rotation around the &#8216;y&#8217;-axis (0, 1, 0) of 0 degrees. In short, a square is placed at the center of our virtual universe.</p>

<div class="wp_syntax"><div class="code"><pre class="cpp" style="font-family:monospace;">    Node<span style="color: #008080;">::</span><span style="color: #007788;">RenderableInfo</span> ri<span style="color: #008080;">;</span> 
    ri.<span style="color: #007788;">renderable</span> <span style="color: #000080;">=</span> rd<span style="color: #008080;">;</span></pre></div></div>

<p> In order for the square to be visible, we need to attach it to the scenegraph node. This is done using a container object, &#8216;RenderableInfo&#8217;. RenderableInfo has two member fields: the renderable object and a material description. Because &#8216;Square&#8217; is a test object and handles its own material settings, we can leave the material definition empty. Easy <img src='http://www.qixis.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>

<div class="wp_syntax"><div class="code"><pre class="cpp" style="font-family:monospace;">    nd<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>renderables.<span style="color: #007788;">push_back</span><span style="color: #008000;">&#40;</span>ri<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> 
    m_root<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>AddChild<span style="color: #008000;">&#40;</span>nd<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> 
<span style="color: #666666;">// </span>
<span style="color: #666666;">////</span></pre></div></div>

<p> And the last step, were we attach the renderable square to the node, and add the node to our universe, the root of which is conveniently called &#8216;m_root&#8217;, on the engine.
<div class="chapter">Setting up the view and rendering</div>
<p> Now that we have set up something to render, let&#8217;s try to make it visible on the screen. To do so, all we have to do is to tell the engine where the camera is in our universe and in which direction it is pointing. Since the square we just created is in the center of our universe, it seems only logical that the camera has to point there. Also, we need some distance from the square so we can admire it in full. <br/> All of the work to achieve this is done in the engine&#8217;s Render function. Most of it is plumbing and not important right now. The interesting part is where we set up the camera.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>129
130
131
132
133
134
135
136
137
138
</pre></td><td class="code"><pre class="cpp" style="font-family:monospace;"><span style="color: #666666;">//// Temporary camera code </span>
<span style="color: #666666;">// </span>
    m_camera.<span style="color: #007788;">Eye</span><span style="color: #008000;">&#40;</span>Vector3<span style="color: #000080;">&lt;</span>math_type<span style="color: #000080;">&gt;</span><span style="color: #008000;">&#40;</span><span style="color:#800080;">1.0f</span>, <span style="color:#800080;">1.0f</span>, <span style="color: #000040;">-</span><span style="color:#800080;">3.0f</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> 
    m_camera.<span style="color: #007788;">Target</span><span style="color: #008000;">&#40;</span>Vector3<span style="color: #000080;">&lt;</span>math_type<span style="color: #000080;">&gt;</span><span style="color: #008000;">&#40;</span><span style="color:#800080;">0.0f</span>, <span style="color:#800080;">0.0f</span>, <span style="color:#800080;">0.0f</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> 
    m_camera.<span style="color: #007788;">Up</span><span style="color: #008000;">&#40;</span>Vector3<span style="color: #000080;">&lt;</span>math_type<span style="color: #000080;">&gt;</span><span style="color: #008000;">&#40;</span><span style="color:#800080;">0.0f</span>, <span style="color:#800080;">1.0f</span>, <span style="color:#800080;">0.0f</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> 
    m_camera.<span style="color: #007788;">UpdateRenderer</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> m_camera.<span style="color: #007788;">SetFoV</span><span style="color: #008000;">&#40;</span><span style="color:#800080;">60.0f</span>, <span style="color:#800080;">1.0f</span>, <span style="color:#800080;">0.1f</span>, <span style="color:#800080;">10.0f</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> 
    m_camera.<span style="color: #007788;">UpdateFrustumCull</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> 
    m_renderer<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>Clear<span style="color: #008000;">&#40;</span><span style="color: #0000ff;">true</span>, <span style="color: #0000ff;">true</span>, Qixis<span style="color: #008080;">::</span><span style="color: #007788;">Color</span><span style="color: #008080;">::</span><span style="color: #007788;">Color</span><span style="color: #008080;">::</span><span style="color: #007788;">DarkBlue</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> 
<span style="color: #666666;">// </span>
<span style="color: #666666;">////</span></pre></td></tr></table></div>

<p> The camera is another member of the engine, just like the universe&#8217;s root node. It is controlled by three vectors: Eye &#8211; where the camera itself is located, Target &#8211; where the camera is looking at and Up &#8211; a vector pointing up in the world. After setting up the camera position, we tell the engine to update its internal state so it actually uses the new camera position. Also, we tell it to use a view angle of about 60 degrees, an angle comparable to what a human eye sees.<br />
<br/><br />
That&#8217;s it for now. You now know the basics of the scene graph and how nodes determine the position of objects in the 3d world. In the next part we&#8217;ll add an animator to the node to make the square spin.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.qixis.com/2009/08/3d-engine-tutorial-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>3d engine tutorial, part 1</title>
		<link>http://www.qixis.com/2009/08/3d-engine-tutorial-part-1/</link>
		<comments>http://www.qixis.com/2009/08/3d-engine-tutorial-part-1/#comments</comments>
		<pubDate>Thu, 20 Aug 2009 16:08:39 +0000</pubDate>
		<dc:creator>Emiel</dc:creator>
				<category><![CDATA[Frontpage]]></category>
		<category><![CDATA[Qixis::Engine]]></category>

		<guid isPermaLink="false">http://www.qixis.com/?p=43</guid>
		<description><![CDATA[This is the first part of the qixis::engine tutorials. This part describes the prerequisites needed to build the engine, the languages used and ends with a working iPhone executable. Click the link above to read more...]]></description>
			<content:encoded><![CDATA[<div class="chapter">Introduction</div>
<p>Before starting work on a big task like building a 3d engine, it&#8217;s probably a good idea to decide which tools and programming language you are going to use. Of course, this being an engine for the iPhone, the choices are a bit limited. </p>
<div class="chapter">Prerequisites</div>
<p>First, we&#8217;re going to need a development environment and an SDK for the iPhone. Apple&#8217;s <a href="http://developer.apple.com/iphone/">official iPhone SDK</a> contains <a href="http://developer.apple.com/technology/">XCode</a>, an excellent Integrated Development Environment. It comes complete with an iPhone simulator, making debugging and testing of software a lot easier. Also, it integrates with Shark and Instruments to do some basic performance profiling. And best of all, as long as you don&#8217;t mind developing in just the simulator, it&#8217;s free too. It&#8217;s Mac only, so if you&#8217;re using Windows you&#8217;re a bit out of luck here&#8230; As far as I know iPhone development can only be done on a Mac.<br />
<br/><br />
Second, we&#8217;re going to choose a language to use. I&#8217;m not an experienced Objective C programmer, but I know my way around C++. On Mac and iPhone development, it&#8217;s not really possible to avoid the use of Objective C altogether, but it&#8217;s easy to mix it with C++. So, I&#8217;ll write the iPhone specific bits in Objective C (ObjC from now on) and the bits that have any potential to be platform independent in C++. I think this is good practice if one possibly wants to use their code on other platforms in the future. All the maths code and a good portion of the OpenGL code in the engine is platform independent and compiles and runs fine on Linux. The engine has some preparations to separate the platform-dependent rendering from the platform-independent bits. We&#8217;ll get to that later.<br />
<br/><br />
If you don&#8217;t know any ObjC or C++ you are going to find these tutorials hard to follow. If you know some of it and just need an online reference, here are some good ones:</p>
<ul>
<li>C &#8211; <a href="http://www.physics.drexel.edu/courses/Comp_Phys/General/C_basics/">http://www.physics.drexel.edu/courses/Comp_Phys/General/C_basics/</a></li>
<li>Objective C &#8211; <a href="http://www.otierney.net/objective-c.html">http://www.otierney.net/objective-c.html</a></li>
<li>Objective C &#8211; <a href="http://cocoadevcentral.com/d/learn_objectivec/">http://cocoadevcentral.com/d/learn_objectivec/</a></li>
<li>C++ &#8211; <a href="http://www.cplusplus.com/doc/tutorial/">http://www.cplusplus.com/doc/tutorial/</a></li>
</ul>
<p>C and ObjC are relatively easy to learn. C++ is a very difficult but very powerful language.<br />
<br/><br />
So, that&#8217;s all settled. XCode will be the development environment, ObjC and C++ the languages.</p>
<ul>
<li>Download <a href="http://developer.apple.com/iphone/">XCode with iPhone SDK here</a>.</li>
</ul>
<p>Also, to follow this tutorial, you need a copy of Qixis::Engine (known as &#8216;the engine&#8217;) from now on. This is the version of the engine as it is in my subversion repository on august 20, 2009. It&#8217;s not finished, and we&#8217;ll finish it as we go&#8230;</p>
<ul>
<li>Download <a href="/downloads/Engine-2009.08.20.zip">Qixis::Engine XCode project here</a> (version 2009.08.20).</li>
</ul>
<div class="chapter">Building the engine</div>
<p>Before continuing, install the iPhone SDK if you&#8217;ve not already done so. If the installer asks any difficult questions, all the default answers are OK.<br />
<br/><br />
Unzip the file &#8216;Engine-2009.08.20.zip&#8217; to a location that&#8217;s convenient for you. For me, it&#8217;s a folder &#8216;Programming/iPhone&#8217; in my home directory. After unzipping, open &#8216;Engine3d.xcodeproj&#8217;. XCode fires up and presents you with a screen looking more or less like the following:<br />
<div class="floatimageframe" onclick="var dv = document.getElementById('popupframe8666'); dv.style.display='block';"><div style="width: 160px; height: 160px; background-image:url(/images/engine/p1-xcode.png); background-position: 50% 50%;"></div></div><div class="popupframe" id="popupframe8666" style="display:none; z-index: 995; position: fixed; left: 0px; top: 0px; width: 100%; height: 100%; text-align: center;" onclick="var dv = document.getElementById('popupframe8666'); dv.style.display='none';"><img class="imageframe" src="/images/engine/p1-xcode.png" alt="" /></div><br />
To build, make sure the iPhone simulator target is selected.<br />
<div class="floatimageframe" onclick="var dv = document.getElementById('popupframe8587'); dv.style.display='block';"><div style="width: 160px; height: 160px; background-image:url(/images/engine/p1-targets.png); background-position: 50% 50%;"></div></div><div class="popupframe" id="popupframe8587" style="display:none; z-index: 995; position: fixed; left: 0px; top: 0px; width: 100%; height: 100%; text-align: center;" onclick="var dv = document.getElementById('popupframe8587'); dv.style.display='none';"><img class="imageframe" src="/images/engine/p1-targets.png" alt="" /></div><br />
If all goes well, press cmd-R. XCode compiles everything and creates an iPhone executable. It automatically starts up the simulator and should present you with something looking like this:<br />
<div class="floatimageframe" onclick="var dv = document.getElementById('popupframe2739'); dv.style.display='block';"><div style="width: 160px; height: 160px; background-image:url(/images/engine/p1-screenshot.png); background-position: 50% 50%;"></div></div><div class="popupframe" id="popupframe2739" style="display:none; z-index: 995; position: fixed; left: 0px; top: 0px; width: 100%; height: 100%; text-align: center;" onclick="var dv = document.getElementById('popupframe2739'); dv.style.display='none';"><img class="imageframe" src="/images/engine/p1-screenshot.png" alt="" /></div></p>
<div class="chapter">In the next episode</div>
<p>That&#8217;s it for now. You now have the development version of the engine, exactly as I have it. I recommend to just look around the code a bit to familiarize yourself with its structure. The interesting files at this moment are &#8216;Engine.cpp&#8217;, &#8216;Node.cpp&#8217; and &#8216;Square.cpp&#8217;.<br />
<br/><br />
In the next part of this series I&#8217;ll take you through all the files and describe what they do and how they fit in the engine&#8217;s architecture.<br />
<br/><br />
&#8216;Till next time!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.qixis.com/2009/08/3d-engine-tutorial-part-1/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>announcing: Qixis::Engine</title>
		<link>http://www.qixis.com/2009/08/qixisengine/</link>
		<comments>http://www.qixis.com/2009/08/qixisengine/#comments</comments>
		<pubDate>Thu, 13 Aug 2009 15:36:46 +0000</pubDate>
		<dc:creator>Emiel</dc:creator>
				<category><![CDATA[Frontpage]]></category>
		<category><![CDATA[Qixis::Engine]]></category>

		<guid isPermaLink="false">http://www.qixis.com/?p=38</guid>
		<description><![CDATA[Announcement: I have started building an OpenGL ES based 3d engine for the iPhone. Since this is the first time I'm building something like this, I decided to blog on the site about its progress and the challenges I face. ]]></description>
			<content:encoded><![CDATA[<div class="chapter">Building an engine, introduction</div>
<p>This is the first part in a set of articles where I will describe the process of developing an iPhone game. The first few articles will focus on the creation of a somewhat generic 3d engine. Of course, I&#8217;m describing my own engine (Qixis::Engine), but most of the concepts are valid for all 3d engines. Also, keep in mind that I&#8217;m still learning a lot on this subject. I don&#8217;t know everything, but will describe what I know and make corrections along the way, as I learn more.</p>
<p>The plan so far is to take a look at at least the following subjects:</p>
<ul>
<li>Basic engine architecture</li>
<ul>
<li>Basic building blocks</li>
<li>Building a scene graph</li>
<li>Adding basic automatic animation</li>
<li>Resource management</li>
</ul>
<li>Basic rendering</li>
<ul>
<li>Building scene nodes to show something on the screen</li>
<li>Materials</li>
<li>Optimising the renderstate</li>
<li>Optimising rendering</li>
<li>Frustum culling</li>
<li>Optimising troublesome scene nodes</li>
<li>&#8230; this is where my engine is at this moment</li>
</ul>
</ul>
<p>The articles are probably not going to be tutorials explaining basic OpenGL ES or iPhone programming; there are some excellent tutorials covering these subjects and if I can learn most of what I need to know from them, so can you. For a quick start, here are some excellent resources covering the basics:</p>
<ul>
<li>General math topics &#8211; <a href="http://www.gamedev.net/reference/list.asp?categoryid=28">http://www.gamedev.net/reference/list.asp?categoryid=28</a></li>
<li>Matrix and quaternions &#8211; <a href="http://www.gamedev.net/reference/articles/article1691.asp">http://www.gamedev.net/reference/articles/article1691.asp</a></li>
<li>OpenGL ES reference &#8211; <a href="http://www.khronos.org/opengles/sdk/1.1/docs/man/">http://www.khronos.org/opengles/sdk/1.1/docs/man/</a></li>
</ul>
<p>If these seem overwhelming now, don&#8217;t worry. Things will become clear along the way. When I started this project, I didn&#8217;t know a Vector from a View Frustum&#8230;</p>
<div class="chapter">Why?</div>
<p>Building a 3d engine isn&#8217;t a trivial task and there are some rather good off-the-shelf solutions. Why didn&#8217;t I use one of those, like <a href="http://www.sio2interactive.com/HOME/HOME.html">SIO2</a> or <a href="http://www.oolongengine.com/">Oolong</a> or <a href="http://irrlicht.sourceforge.net/">Irrlicht</a>, or&#8230;? </p>
<p>Mainly because building a 3d engine isn&#8217;t a trivial task. It&#8217;s a fun project and I learned (and still am learning) a lot during this project. I&#8217;m writing these articles because I couldn&#8217;t really find anything good on basic 3d engine architecture and hope to make my own small contribution this way. </p>
<p>As I&#8217;m writing this, the engine is not finished yet. The basic plumbing is there, but a lot of the solutions I chose are naive and can use some more optimisation. I don&#8217;t believe in premature optimisation however, so optimisation will probably a topic for a future article.</p>
<div class="chapter">Feedback</div>
<p>Writing articles is not something I regularly do. Also, English is not my primary language. Any feedback is more than welcome, both on technical subjects and the writing itself. The preferred way is to just add a reply to an article. My e-mail address can be found on the &#8216;about&#8217; page of this site. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.qixis.com/2009/08/qixisengine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Blog</title>
		<link>http://www.qixis.com/2009/08/blog/</link>
		<comments>http://www.qixis.com/2009/08/blog/#comments</comments>
		<pubDate>Thu, 13 Aug 2009 14:08:25 +0000</pubDate>
		<dc:creator>Emiel</dc:creator>
				<category><![CDATA[Frontpage]]></category>

		<guid isPermaLink="false">http://www.qixis.com/?p=6</guid>
		<description><![CDATA[This spot will be used for the Qixis.com blog. In this space we will post tutorials, news, announcements, etc. 
]]></description>
			<content:encoded><![CDATA[<p>This spot will be used for the Qixis.com blog. In this space we will post tutorials, news, announcements, etc. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.qixis.com/2009/08/blog/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
