<?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>cannontrodder's world &#187; XNA</title>
	<atom:link href="http://www.cannontrodder.net/category/xna/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cannontrodder.net</link>
	<description>cannontrodder - Getting nothing done since 1975.</description>
	<lastBuildDate>Sat, 06 Feb 2010 22:19:25 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Installing Blender and the Collada exporter</title>
		<link>http://www.cannontrodder.net/2008/03/19/installing-blender-and-the-collada-exporter/</link>
		<comments>http://www.cannontrodder.net/2008/03/19/installing-blender-and-the-collada-exporter/#comments</comments>
		<pubDate>Wed, 19 Mar 2008 01:01:12 +0000</pubDate>
		<dc:creator>cannontrodder</dc:creator>
				<category><![CDATA[XNA with Blender]]></category>

		<guid isPermaLink="false">http://www.cannontrodder.net/2008/03/19/installing-blender-and-the-collada-exporter/</guid>
		<description><![CDATA[This is a guide on how to set up Blender and the Collada exporter plug-in. You&#8217;ll need to follow this guide in order to be able to use my XNA Blender importer.

First you will need to install Blender itself. There are new versions released quite often but at the time of writing, the current stable [...]]]></description>
			<content:encoded><![CDATA[<p>This is a guide on how to set up Blender and the Collada exporter plug-in. You&#8217;ll need to follow this guide in order to be able to use my XNA Blender importer.</p>
<p><span id="more-84"></span></p>
<p>First you will need to install Blender itself. There are new versions released quite often but at the time of writing, the current stable version is 2.45 and I suggest downloading it <a title="link Blender download page" href="http://www.blender.org/download/get-blender/" target="_blank">directly from the Blender Foundation</a>.</p>
<p>Installation should be simple, just use the defaults but make sure you have the following selected when the installer asks you:</p>
<p align="center"><img height="272" alt="Image" src="http://www.cannontrodder.net/wp-content/image-3.jpg" width="424" /></p>
<p>I chose the installation folder of <strong>&#8220;C:\Program Files\Blender Foundation\Blender&#8221;</strong> but if you install somewhere else, that is fine &#8211; just remember where as you are going to need to install the Collada exporter plugin there shortly.</p>
<p>Next, you need to install Python. Blender requires you to have Python installed as it&#8217;s what most of the custom Blender import/export plugins are written in. Blender 2.45 was compiled against Python 2.5 and you need to <a title="link to Python 2.5 download" href="http://www.python.org/download/releases/2.5/" target="_blank">download</a> and install that too. The Python project releases bug fixes from time to time while maintaining compatibility and currently the latest version of Python 2.5 is actually numbered 2.5.2. If a new version is released, anything matching 2.5.x will do. Just install Python with all the default options.</p>
<p><img height="103" alt="Image" src="http://www.cannontrodder.net/wp-content/image-4.jpg" width="376" align="right" />When you open Blender after this, you will notice that it opens a separate window apart from the main Blender one. In this window you will see the debug output from any Python plugins. If you installed Blender and Python correctly, you should see it confirm that Python has been detected.</p>
<p>Finally, we need to get the Collada Export plugin for Blender. You might notice if you look at the Blender export plugins in the File-&gt;Export menu, that there is already an entry for the Collada 1.4 exporter. Don&#8217;t use it. It&#8217;s the version that comes with the Blender installer and it&#8217;s broken. It bombs out when you try to export meshes so you need to get the latest bleeding-edge version from Sourceforge, directly from the subversion repository.</p>
<p><strong>Subversion?</strong></p>
<p>In case you don&#8217;t know about it, Subversion is a source-code revision control system which allows developers to collaborate on the same project, checking in their changes when they are happy and updating their local copy to bring in changes from other developers working along with them. I happen to use a Subversion repository at home and at work for my professional and part-time coding projects and highly recommend it. The developers of the Collada Blender export plugin also use a Subversion repository hosted at <a title="link to Sourceforge" href="http://sourceforge.net/" target="_blank">Sourceforge</a>. To get the latest version of the code, you&#8217;ll need to install a Subversion client to connect to and export the code to your local machine.</p>
<p>TortoiseSVN is the de-facto client for Windows and I&#8217;m currently running an alpha version of their up-coming 1.5.0 release. If you&#8217;d prefer not to install alpha version software, install the most recent stable version from <a title="TortoiseSVN download page" href="http://tortoisesvn.net/downloads" target="_blank">here</a>. I&#8217;m using <a title="TortoiseSVN Alpha download page" href="http://tortoisesvn.net/node/310" target="_blank">this one</a> but the instructions are the same, you just need to be aware that my screenshot will differ from yours cosmetically.</p>
<p>Once you have installed TortoiseSVN and rebooted, browse to the Blender installation folder. Remember, the default is &#8220;C:\Program Files\Blender Foundation\Blender\&#8221;. Then navigate to the .blender folder in there to find where all the plugins live. Right-click on the &#8220;scripts&#8221; folder and choose the option &#8220;TortoiseSVN-&gt;Export&#8221; from the context menu that pops up.</p>
<p>In the &#8220;URL of repository&#8221; text box, put this:</p>
<pre>
<code>https://colladablender.svn.sourceforge.net/svnroot/colladablender/trunk</code>
</pre>
<p>Then select the &#8220;<em>Immediate children, including folders</em>&#8221; option from the dropdown. It should look like this:</p>
<p align="center"><img height="389" alt="Image" src="http://www.cannontrodder.net/wp-content/image-5.jpg" width="555" /></p>
<p>Hit ok and it will export the latest version of the plugin, directly from the source-code repository the developers use, into your machines Blender plugin folder. It may be slow, and do not be surprised at data transfer rates of 1k/s &#8211; luckily the plugin is very small. If it asks you if you are sure, confirm your paths are exactly as in the image above and hit yes.</p>
<p>You are now ready to launch Blender and start exporting Blender models into Collada files!<img height="348" alt="Image" src="http://www.cannontrodder.net/wp-content/image-6.jpg" width="237" align="right" /></p>
<p>To do this, go to the File-&gt;Export menu in Blender and choose &#8220;COLLADA 1.4&#8243; and be sure to select the options in the image to the right, to avoid any errors.</p>
<p>Choosing to export to triangles is important as Blender allows you to model using quads which, while great for modelling, is not much use to hardware rendering code which requires geometry to be passed as triangles.</p>
<p>Disabling physics is important as the ability to export this is still under development and will cause an error if you do not disable it.</p>
<p>It will export the files with a .dae extension. Visual C# Express will still display it as an XML file with collapsible nodes to make browsing it easier. It also helps identify the file when added as content in an XNA project as the BlenderXNA Content Importer is setup to be automatically applied to .dae files by default.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cannontrodder.net/2008/03/19/installing-blender-and-the-collada-exporter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Even more fun with PIX</title>
		<link>http://www.cannontrodder.net/2008/03/17/even-more-fun-with-pix/</link>
		<comments>http://www.cannontrodder.net/2008/03/17/even-more-fun-with-pix/#comments</comments>
		<pubDate>Mon, 17 Mar 2008 01:43:58 +0000</pubDate>
		<dc:creator>cannontrodder</dc:creator>
				<category><![CDATA[XNA]]></category>
		<category><![CDATA[XNA General]]></category>

		<guid isPermaLink="false">http://www.cannontrodder.net/2008/03/17/even-more-fun-with-pix/</guid>
		<description><![CDATA[This is turning out to be a series in itself! Not much of an update here, more a triumphant fist in the air for when things actually work as they should.


The image on the left is a render of Suzanne from Blender, and the one on the right is a render from within the Windows [...]]]></description>
			<content:encoded><![CDATA[<p>This is turning out to be a series in itself! Not much of an update here, more a triumphant fist in the air for when things actually work as they should.</p>
<p><span id="more-77"></span></p>
<p align="center"><img height="193" alt="blender render" src="http://www.cannontrodder.net/wp-content/blender-render.png" width="228" /><img height="193" alt="xna render" src="http://www.cannontrodder.net/wp-content/xna-render.png" width="228" /></p>
<p>The image on the left is a render of Suzanne from Blender, and the one on the right is a render from within the Windows build of my current codebase. No more <a title="Link to previous progress *with* distortion" href="http://www.cannontrodder.net/2008/03/16/more-fun-with-pix/" target="_blank">distortion</a>! The distortion was caused by incorrectly creating the Quaternion rotations from the x, y and z planes in the Collada model which, when combined with my translate and scale transformations, caused <em>all kinds</em> of weirdness.</p>
<p>I would never have got this far without PIX, I think I quite like it!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cannontrodder.net/2008/03/17/even-more-fun-with-pix/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>More fun with PIX</title>
		<link>http://www.cannontrodder.net/2008/03/16/more-fun-with-pix/</link>
		<comments>http://www.cannontrodder.net/2008/03/16/more-fun-with-pix/#comments</comments>
		<pubDate>Sun, 16 Mar 2008 00:05:44 +0000</pubDate>
		<dc:creator>cannontrodder</dc:creator>
				<category><![CDATA[XNA]]></category>
		<category><![CDATA[XNA General]]></category>

		<guid isPermaLink="false">http://www.cannontrodder.net/2008/03/16/more-fun-with-pix/</guid>
		<description><![CDATA[Just another progress update&#8230;


The above is a screen capture from the windows version of my current code-base. Blender-heads will recognise the (slightly distorted) image of Suzanne, the built-in Blender equivalent to the teapot model.
PIX was able to show me that I was not passing my transformation matrices to the correct parameter in the vertex shader. [...]]]></description>
			<content:encoded><![CDATA[<p>Just another progress update&#8230;</p>
<p><span id="more-74"></span></p>
<p align="center"><img height="373" alt="suzanne" src="http://www.cannontrodder.net/wp-content/suzanne.png" width="210" /></p>
<p>The above is a screen capture from the windows version of my current code-base. Blender-heads will recognise the (slightly distorted) image of <a title="Wiki page showing background of Suzanne in Blender" href="http://en.wikipedia.org/wiki/Blender_(software)#Suzanne" target="_blank">Suzanne</a>, the built-in Blender equivalent to the <a title="Wiki page on the standard teapot reference model" href="http://en.wikipedia.org/wiki/Utah_teapot" target="_blank">teapot model</a>.</p>
<p>PIX was able to show me that I was not passing my transformation matrices to the correct parameter in the vertex shader. As a result they all defaulted to empty matrices and every vertex position output from it was then (0,0,0). I was simply telling my effect technique to use the wrong vertex shader in my .fx file, and that shader expected the &#8220;WorldViewProjection&#8221; parameter. Unfortunately, I was populating the &#8220;World&#8221;, &#8220;View&#8221; and &#8220;Projection&#8221; parameters!</p>
<p>After fixing the error in my .fx file, I managed to render <em>something</em>. And a quick Visual C# debug session later, I realised that I had a silly bug in the parsing code I use to pull the data out of the Collada files. And now I can render a monkey!</p>
<p>There&#8217;s clearly some work to be done to fix the distortion issues above but real progress has been made. I&#8217;ll fix those issues, tidy up the code and probably release a simple demo just for people who are interested.</p>
<p>I&#8217;ll be continuing the <a title="Blender and XNA part 1" href="http://www.cannontrodder.net/2008/03/08/blender-and-xna-part-1/" target="_blank">Blender and XNA</a> series soon which should help those who wonder how I have achieved the above.</p>
<p>I&#8217;ve posted <a title="Even More Fun With PIX" href="http://www.cannontrodder.net/2008/03/17/even-more-fun-with-pix/"> an update</a> to this.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cannontrodder.net/2008/03/16/more-fun-with-pix/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Fun with PIX</title>
		<link>http://www.cannontrodder.net/2008/03/13/fun-with-pix/</link>
		<comments>http://www.cannontrodder.net/2008/03/13/fun-with-pix/#comments</comments>
		<pubDate>Thu, 13 Mar 2008 22:47:07 +0000</pubDate>
		<dc:creator>cannontrodder</dc:creator>
				<category><![CDATA[XNA]]></category>
		<category><![CDATA[XNA General]]></category>

		<guid isPermaLink="false">http://www.cannontrodder.net/2008/03/13/fun-with-pix/</guid>
		<description><![CDATA[Just a quick update from my last post.

I mentioned that I was just getting the following output from my current rendering code:

I had posted on the XNA Forums that I was &#8220;completely in the dark&#8221; as to what was going on after a call to draw my model. The suggestion there was to use PIX, [...]]]></description>
			<content:encoded><![CDATA[<p>Just a quick update from my <a href="http://www.cannontrodder.net/2008/03/10/blender-and-xna-part-2/">last post</a>.</p>
<p><span id="more-72"></span></p>
<p>I mentioned that I was just getting the following output from my current rendering code:</p>
<p align="center"><img style="WIDTH: 222px; HEIGHT: 202px" alt="image-2.jpg" hspace="0" src="http://www.cannontrodder.net/wp-content/image-2.jpg" border="0" /></p>
<p>I had <a title="Link to forum post" href="http://forums.xna.com/thread/50280.aspx" target="_blank">posted</a> on the XNA Forums that I was &#8220;completely in the dark&#8221; as to what was going on after a call to draw my model. The suggestion there was to use <a title="PIX msdn article" href="http://msdn2.microsoft.com/en-us/library/bb173085(VS.85).aspx">PIX</a>, which is part of the <a title="DirectX SDK download" href="http://msdn2.microsoft.com/en-us/directx/aa937788.aspx" target="_blank">DirectX SDK</a> for Windows. Well, one 438MB download later and feeling like a challenge, it seems PIX has helped me at least identify the issue.</p>
<p>I am sending the position, normal and colour information to the graphics device plus the indices to tell it how to arrange that data into triangles. Well for testing purposes, I have told it to draw 1 triangle and I seem to be getting the right size vertex buffer to be passed to the graphics device but <strong>all its values are 0</strong>.</p>
<p>This essentially means I am drawing an object so small it has no dimensions, in black and on a black background. Working as intended then&#8230;</p>
<p>I am clearly missing the point somewhere when I construct my VertexBuffer in my ContentProcessor but at least PIX showed me the way!</p>
<p>I&#8217;ve posted <a title="More Fun With PIX" href="http://www.cannontrodder.net/2008/03/16/more-fun-with-pix/"> an update</a> to this.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cannontrodder.net/2008/03/13/fun-with-pix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Blender and XNA &#8211; Part 2</title>
		<link>http://www.cannontrodder.net/2008/03/10/blender-and-xna-part-2/</link>
		<comments>http://www.cannontrodder.net/2008/03/10/blender-and-xna-part-2/#comments</comments>
		<pubDate>Mon, 10 Mar 2008 15:50:02 +0000</pubDate>
		<dc:creator>cannontrodder</dc:creator>
				<category><![CDATA[XNA]]></category>
		<category><![CDATA[XNA with Blender]]></category>

		<guid isPermaLink="false">http://www.cannontrodder.net/2008/03/10/blender-and-xna-part-2/</guid>
		<description><![CDATA[In part 1, I looked at the Content Pipeline and it&#8217;s components. In this article, I will be looking at the files I am going to be importing and the tool I will be using to create them.

Why Blender?
Blender is an open-source 3D modelling package which is under active development by the Blender Foundation, a [...]]]></description>
			<content:encoded><![CDATA[<p>In part 1, I looked at the Content Pipeline and it&#8217;s components. In this article, I will be looking at the files I am going to be importing and the tool I will be using to create them.</p>
<p><span id="more-68"></span></p>
<p><strong>Why Blender?</strong></p>
<p><a title="Blender home page" href="http://www.blender.org/">Blender</a> is an open-source 3D modelling package which is under active development by the <a title="About Blender Foundation" href="http://www.blender.org/blenderorg/blender-foundation/">Blender Foundation</a>, a non-profit public benefit corporation. It is released under the terms of the <a title="GNU License" href="http://www.gnu.org/copyleft/gpl.html">GNU Public License</a> and is free for anyone to download and run on a wide-range of platforms, including Windows. There is a <a title="Blender Newbies" href="http://blendernewbies.blogspot.com/">huge</a> <a title="Blender nation" href="http://www.blendernation.com/">active</a> <a title="Blender artists site" href="http://blenderartists.org/">community</a> <a title="Blender website list of other community sites." href="http://www.blender.org/community/user-community/">around</a> the world currently using Blender.</p>
<p>It offers functionality to rival that of commercial packages, it&#8217;s very quick and it has a user interface that is centred on making your workflow as fast as possible.</p>
<p>Because Blender is free, there&#8217;ll be no worry that you&#8217;ll have to ditch it&#8217;s use when you one day decide to release a game. That might not be the case with using a <a title="maya learning edition" href="http://usa.autodesk.com/adsk/servlet/item?siteID=123112&amp;id=7679058">learning edition</a> version of a commercial package.</p>
<p><strong>Exporting from Blender</strong></p>
<p><img height="564" alt="A screenshot of the Blender export menu." src="http://www.cannontrodder.net/wp-content/blender-exportlist.png" width="295" align="left" />Because of the open nature of Blender people can extend it to provide export tools for others to use. This is made possible by having Blender integrated with <a title="Python" href="http://www.python.org/">Python</a>, another open-source package. Python is a script-based language that is often used to enable macros or scripting support in other applications.</p>
<p>As you can see from the image, there are quite a few different export plugins that come with Blender upon install. You might notice that XNA already supports two of the formats in this list: FBX (Autodesk) and X (DirectX). I actually don&#8217;t want to those though. I want to use <a title="COLLAborative Design Activity" href="http://www.collada.org/mediawiki/index.php/Main_Page">Collada</a>.</p>
<p><strong>Why Collada?</strong></p>
<p>Collada files are XML files, firstly. This makes them really easy to parse and also really easy to explore in Visual C# Express.</p>
<p>It&#8217;s an open standard which has the remit to provide a standard format for exchange of 3D assets between applications. The potential in the future is that this plugin can support all those other applications.</p>
<p><strong>The Plan</strong></p>
<p>By using Collada, I hope to make my ContentImporter support as much of it&#8217;s flexibility as possible. Then it would be useful just as a general purpose Collada importer for interfacing with other packages and tools you may wish to create. A level editor, for example.</p>
<p>It should be possible to use the plugin to read Collada files into the standard XNA Model class (which I think many users would want) but I also want to explore using it to import into custom classes. My plan is not to just use this to import meshes, but to import other things such as bounding boxes, level floor plans or skeletal animations.</p>
<p><strong>The Code</strong></p>
<p>Right now it is not ready for release in any form. The current status is I have written the ContentImporter, ContentProcessor, ContentTypeWriter, and ContentTypeReader and I&#8217;ve dropped a few test blender meshes into my current version of my framework:</p>
<p><strong>A centred cube.</strong></p>
<p><strong>Two cube meshes in different positions and rotations.</strong></p>
<p><img height="187" alt="Image" src="http://www.cannontrodder.net/wp-content/image-1.jpg" width="207" align="right" /><strong>Two instances of the same cube mesh but in different positions and rotations.</strong></p>
<p><strong>A cube made from multiple materials.</strong></p>
<p><strong>The Blender Suzanne built-in test model (<em>pictured right</em>).</strong></p>
<p>The good news?</p>
<p>They all import without errors. By tracing through the whole process with the simple cube models, I can see that the data is being passed through to my rendering code. The issue I have is that I have written the full pipeline form scratch and could be introducing problems at any point. In fact the current screen display is this:</p>
<p align="center"><img height="202" alt="Errrmm....." src="http://www.cannontrodder.net/wp-content/image-2.jpg" width="222" /></p>
<p>I&#8217;m literally in the dark as to what is happening in the code. The data is passed to the graphics device and I just have to cross my fingers and hope it will work.</p>
<p>To investigate this, I need to use <a title="PIX" href="http://msdn2.microsoft.com/en-us/library/bb173085(VS.85).aspx">PIX</a> the DirectX debugging tool.</p>
<p>I&#8217;ll put up an unsupported demo once I can iron out the rendering bugs, just so people can take a look but then the next task is to package it into more user-friendly plugins they can just drop into their existing projects.</p>
<h1>Next time&#8230;</h1>
<p>I&#8217;ll be looking at the Collada file format in more detail with a glimpse of some code examples to show how it will be parsed. I&#8217;ll also document progress on my work with PIX, something I think will be an interesting task.</p>
<p><a title="Blender and XNA - Part 2" href="http://www.cannontrodder.net/2008/03/08/blender-and-xna-part-1/">Read part 1</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.cannontrodder.net/2008/03/10/blender-and-xna-part-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Blender and XNA &#8211; Part 1</title>
		<link>http://www.cannontrodder.net/2008/03/08/blender-and-xna-part-1/</link>
		<comments>http://www.cannontrodder.net/2008/03/08/blender-and-xna-part-1/#comments</comments>
		<pubDate>Sat, 08 Mar 2008 00:20:49 +0000</pubDate>
		<dc:creator>cannontrodder</dc:creator>
				<category><![CDATA[XNA]]></category>
		<category><![CDATA[XNA with Blender]]></category>

		<guid isPermaLink="false">http://www.cannontrodder.net/2008/03/08/blender-and-xna/</guid>
		<description><![CDATA[It&#8217;s been a long time since I&#8217;ve posted on XNA on this blog. In fact, a long time since I posted on anything! After a re-shuffle of projects I have been undertaking in my own personal time, I&#8217;ve managed to make far more time to play around with XNA, my real passion.
When I first started [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been a long time since I&#8217;ve posted on XNA on this blog. In fact, a long time since I posted on anything! After a re-shuffle of projects I have been undertaking in my own personal time, I&#8217;ve managed to make far more time to play around with XNA, my real passion.</p>
<p>When I first started playing with XNA, I was intrigued as to how XNA allows developers to get their game assets into XNA. Out-of-the box, XNA allows you to easily include certain graphics formats such as .PNG or .JPEG images and 3D file formats such as .X (DirectX) or .FBX (3D Studio Max). Great if your 3D modelling package exports these formats but not so convenient if it does not. I want to import from <a href="http://www.blender.org/">Blender</a> but this is not supported directly by XNA&#8230;.</p>
<p>However, XNA does have one pretty clever trick up its sleeve:</p>
<p align="center"><strong>The Content Pipeline</strong></p>
<p><span id="more-67"></span></p>
<p>This is a customisable process in which XNA can read source file formats and convert them into binary files for distribution with your game in a format that your game can then read in at run-time. Drop an FBX 3D model file into the content folder in your project and Visual C# Express will use the appropriate Content Pipeline class to parse it and package it into a binary file (an XNB file) during the build process. For your game to use it, you simple have to call the Load method in the XNA run-time content manager to pull the data in and populate a nice, clean runtime Model class.</p>
<p>Things get even more interesting when you realise that you can write your own Content Pipeline components to customise things to your liking. And if I want to import Blender models into my games and use them, I need to understand them.</p>
<p>So in this article, and subsequent ones to follow I am going to look at using the Content Pipeline to import Blender 3D models and render them in an XNA game. As this article is published, I am about 2 or 3 blog-posts ahead of what I am describing &#8211; and I&#8217;m still working it out as I go along!</p>
<p>What I&#8217;d like to share is what I&#8217;ve needed to learn in order to accomplish this, plus how I overcame any problems along the way. If you too are looking to create your own Content Pipeline plugins, this may be of use to you. Even if you are not, learning more about the Pipeline could open up some avenues in your game development that hadn&#8217;t really occurred to you. Let&#8217;s take a look at the Content Pipeline and its fundamental components.</p>
<p>The pipeline consists of 4 distinct parts:</p>
<p><strong>ContentImporter</strong>, <strong>ContentProcessor</strong>, <strong>ContentTypeWriter</strong>, and <strong>ContentTypeReader</strong>.</p>
<p>In Visual C# Express, when you add content you can specify which Content Importer and Content Processor it should us to compile that data into your project. If you wanted to, you could create just a ContentImporter and bolt that onto an existing ContentProcessor in order to support a new file format that XNA does not support already. The flexibility is there though if you wish to go one stage further and customise the entire pipeline for a particular type of game asset.</p>
<p>I&#8217;ll briefly run through the components mentioned above to explain what they do.</p>
<p><strong>ContentImporter</strong></p>
<p>The <a title="msdn class reference" href="http://msdn2.microsoft.com/en-us/library/bb195424(MSDN.9).aspx">ContentImporter</a> parses the content file and fills a set of appropriate classes with the data it contains. XNA provides a set of content classes ready to store such data. For example, if your file contained 3D geometry, you would populate a MeshContent class. For 2D bitmap graphics, you would use a TextureContent class. These content classes can be arranged in a hierarchy so you could pull in multiple images or multiple 3D meshes and arrange them in a parent-child configuration. The important thing to remember about a Content Importer is that it <em>does not care</em> about what the final use of the data will be. Its job is simply to retrive information from the file the content is contained in and make it available to the rest of the Pipeline to do with as it pleases.</p>
<p><strong>ContentProcessor</strong></p>
<p>A <a title="msdn class reference" href="http://msdn2.microsoft.com/en-us/library/bb195449.aspx">ContentProcessor</a> converts those standard data types mentioned above into something that resembles the run-time data structure. If you simply wished to support a new fileformat that XNA does not natively support, a ContentImporter would be all you needed, you could then use the built-in XNA Processors to prepare that content into one of the built-in types, such as <a title="msdn class reference" href="http://msdn2.microsoft.com/en-us/library/microsoft.xna.framework.graphics.model.aspx">Model</a> . So if you wanted to support the <a title="Wiki article about the ILBM format" href="http://en.wikipedia.org/wiki/ILBM">ILBM</a> format for textures (showing my age there), then a ContentImporter would do just fine providing it populated a TextureContent class properly ready for processing by the built-in XNA texture processor.</p>
<p>Conversely, if you wanted to ditch the standard XNA runtime classes, such as Model and use your own, you would need to create a ContentProcessor to spit out your custom class. You could still take advantage of the built-in ContentImporters to save you having to write a class to parse FBX files, for example.</p>
<p>Using your own class instead of the built-in XNA-provided ones might seem risky but it&#8217;s positively encouraged. And if Shawn Hargreaves, one of lead developers of the XNA framework <a href="http://blogs.msdn.com/shawnhar/archive/2007/09/19/note-to-self-model-hammer.aspx">endorses that approach</a> , you shouldn&#8217;t feel too worried about going down that route also.</p>
<p>A moment ago I said that the ContentProcessor creates something that &#8220;<em>resembles the run-time data structure</em> &#8220;. I don&#8217;t want to confuse the reader too much right now, but I&#8217;ll give one example of why this is necessary or useful:</p>
<p>You might wish to specify a particular shader or texture for your model when you import the model itself. That same shader or texture might well be used again in other models in your project. Without going into too much detail too soon, the pipeline allows you to put a placeholder in your content to refer to this other asset. The pipeline will then pull this particular asset in at runtime and plug it into every class that needs it. This ensures that you do not pull the same dependencies in more than once.</p>
<p><strong>ContentTypeWriter</strong></p>
<p>You only need to implement a <a title="msdn class reference" href="http://msdn2.microsoft.com/en-us/library/microsoft.xna.framework.content.pipeline.serialization.compiler.contenttypewriter.aspx">ContentTypeWriter</a> when you are going to use your own custom runtime class to hold your content asset. This is a surprisingly simple class to write as it simply dumps the intermediary class output from your ContentProcessor to an XNB file. An XNB file is what every item of content in the XNA framework is stored in after the project is built. You don&#8217;t need to understand what the exact format of the file is because &#8230;.. <em>it doesn&#8217;t have one</em> !</p>
<p>If you want to store 10 3D meshes in your XNB file, you can. You would simple write out the number of meshes and then follow that by writing out the meshes themselves. XNA looks after the hard part of serialising these objects into a binary format and your code just looks something like this:</p>
<pre>
<code>output.Write(Meshes.Count);
output.WriteObject(listOfVertices1);
output.WriteObject(listOfTriangles1);
..
..
output.WriteObject(listOfVertices10);
output.WriteObject(listOfTriangles10);
</code>
</pre>
<p>I&#8217;ve simplified the above but it illustrates that you can just dump out whatever you please, providing you write the part that <em>reads it in</em> to use the same order. That brings us nicely to the final part:</p>
<p><strong>ContentTypeReader</strong></p>
<p>Again, like ContentTypeWriter, you only need to implement a <a title="msdn class reference" href="http://msdn2.microsoft.com/en-us/library/microsoft.xna.framework.content.contenttypereader(MSDN.9).aspx?ref=ZindeShop.Com">ContentTypeReader</a> class if you are not going to be using the built-in run-time classes such as Model or Texture and instead plan to use your own custom class. Using the pseudo-code above as an example, the complementary ContentTypeReader would do something like:</p>
<pre>
<code>meshCount = input.ReadInt32();
for (i=0; i &lt; meshCount; i++)
{
   listOfVertices[i] = input.ReadObject();
   listOfTrangles[i] = input.ReadObject();
}
</code>
</pre>
<p>The ContentReader creates an instance of your run-time custom class that will hold your game asset, populates it and returns it. When you ask the ContentManager in your game to load in your asset, the ContentManagers load method calls this ContentTypeReader and returns your custom content class ready to use in your game at runtime.</p>
<h1>Next time&#8230;</h1>
<p>In my next article, I am going to explain why I decided to use Blender for my game content generation and discuss the various ways to get content out of Blender. I&#8217;ll explain why I chose the export method I did and we&#8217;ll look at the file format directly so you can better understand how we actually go about pulling the data it contains into the XNA environment.</p>
<p><a title="Blender and XNA - Part 2" href="http://www.cannontrodder.net/2008/03/10/blender-and-xna-part-2/">Read part 2</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.cannontrodder.net/2008/03/08/blender-and-xna-part-1/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Game programming with XNA &#8211; part 1</title>
		<link>http://www.cannontrodder.net/2007/07/27/part-1-the-xna-framework/</link>
		<comments>http://www.cannontrodder.net/2007/07/27/part-1-the-xna-framework/#comments</comments>
		<pubDate>Fri, 27 Jul 2007 20:55:28 +0000</pubDate>
		<dc:creator>cannontrodder</dc:creator>
				<category><![CDATA[XNA]]></category>
		<category><![CDATA[XNA Tutorial]]></category>

		<guid isPermaLink="false">http://www.cannontrodder.net/2007/07/27/part-1-the-xna-framework/</guid>
		<description><![CDATA[This is the first of a series of programming tutorials focusing on games programming. This first article is going to try to give an overview of what we are going to be using to accomplish this and a little history of the tools themselves. Don&#8217;t worry if some of this is confusing, try to pick [...]]]></description>
			<content:encoded><![CDATA[<p>This is the first of a series of programming tutorials focusing on games programming. This first article is going to try to give an overview of what we are going to be using to accomplish this and a little history of the tools themselves. Don&#8217;t worry if some of this is confusing, try to pick up what you can and then more forward to the first lesson. Do at least snag the files from the <strong>&#8220;What will I need?&#8221;</strong> section to get everything installed though.<br />
<span id="more-8"></span></p>
<h1>Who is this for?</h1>
<p>This is for people who have an interest in learning to program games for fun but wouldn&#8217;t know where to start. I&#8217;ll assume no programming experience at all but this won&#8217;t be an in-depth tutorial on pure programming. I&#8217;ll point out the basics as we go and refer the reader to more in-depth information so they can fill in any gaps as they gain more experience.</p>
<h1>What will I need?</h1>
<p>Well, you won&#8217;t need any money. Everything we will be using will be free and legal. Specifically, we will be using XNA Games Studio Express to program our games.</p>
<p>Any reasonably powered pc from the last 5 years should be capable of building and running the demonstrations I&#8217;ll be sharing. There is also the option to run the demos on an Xbox 360. That does <a href="http://msdn2.microsoft.com/en-us/xna/bb219592.aspx">cost money</a> but isn&#8217;t a requirement at all, you will be able to follow along just as well on a PC.</p>
<p>The official hardware recommendation from Microsoft is:</p>
<blockquote><p>&#8220;To run XNA Framework games on Windows, you will need a graphics card that supports Shader Model 1.1 or greater and DirectX 9.0c. We recommend that you use a graphics card that supports Shader Model 2.0 because some samples and starter kits may require it.&#8221;</p></blockquote>
<p>You&#8217;ll need a couple of downloads. These are fairly big but if you are on broadband, it shouldn&#8217;t take you too long to get them. First, download and install <a href="http://msdn.microsoft.com/vstudio/express/downloads/default.aspx">Visual C# Express Edition</a>. You are also going to need the <a href="http://download.microsoft.com/download/7/7/3/7737290f-98e8-45bf-9075-85cc6ae34bf1/VS80sp1-KB926749-X86-INTL.exe">Visual C# Express Service Pack</a> too. Install Visual C# Express Edition and then run the service pack.</p>
<p>Run Visual C# Express Edition and then register it. Although you can register later, you&#8217;ll need to run Visual C# Express <strong>at least once</strong> before installing the XNA Game Studio in the next step.</p>
<p>Finally, you need to install <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=12ADCD12-7A7B-4413-A0AF-FF87242A78DE&amp;displaylang=en">Microsoft XNA Game Studio Express 1.0 Refresh edition</a>.</p>
<p>They are quite some download, aren&#8217;t they? While you are waiting for the files to download, read ahead and find out a bit more about Game Studio Express, XNA Framework, C# and the other new terms that are mentioned above.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cannontrodder.net/2007/07/27/part-1-the-xna-framework/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Optimising XNA Performance With Resource Pooling</title>
		<link>http://www.cannontrodder.net/2007/07/23/optimising-xna-performance-with-resource-pooling/</link>
		<comments>http://www.cannontrodder.net/2007/07/23/optimising-xna-performance-with-resource-pooling/#comments</comments>
		<pubDate>Mon, 23 Jul 2007 11:50:22 +0000</pubDate>
		<dc:creator>cannontrodder</dc:creator>
				<category><![CDATA[XNA]]></category>
		<category><![CDATA[XNA General]]></category>

		<guid isPermaLink="false">http://www.cannontrodder.net/2007/07/23/optimising-xna-performance-with-resource-pooling/</guid>
		<description><![CDATA[I&#8217;m just working on the code which will form the basis of my upcoming tutorial and it&#8217;s a huge learning experience for me. One thing I haven&#8217;t really focussed on before was optimisation of .NET code. While I&#8217;ve re-factored code because it was doing things in a &#8217;roundabout&#8217; way that could be optimised, I haven&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m just working on the code which will form the basis of my upcoming tutorial and it&#8217;s a huge learning experience for me. One thing I haven&#8217;t really focussed on before was optimisation of .NET code. While I&#8217;ve re-factored code because it was doing things in a &#8217;roundabout&#8217; way that could be optimised, I haven&#8217;t had to ever worry about real-time performance before. With XNA, a sudden pause or glitch is going to be bad for a game.</p>
<p>One thing that will cause glitches in XNA games is if the garbage collector kicks in at an inappropriate time so a strategy to avoid this needs to be adopted quite early on in development of your game engine.</p>
<p><span id="more-29"></span>An excellent <a href="http://blogs.msdn.com/shawnhar/archive/2007/07/02/twin-paths-to-garbage-collector-nirvana.aspx">post</a> by <a href="http://blogs.msdn.com/shawnhar/default.aspx">Shawn Hargreaves</a> gives an overview of two distinct strategies to reduce the impact of garbage collection on your code. By picking one of these and sticking to it, you can either ensure that when garbage collection occurs, it doesn&#8217;t affect performance adversely or avoid garbage collection altogether.</p>
<h1>Approach 1</h1>
<p>Don&#8217;t allocate <em>anything</em>. This sounds quite hard to achieve but it isn&#8217;t as difficult as it sounds. You can allocate memory still  (your game will be pretty limited if you cannot) but you allocate it all up-front.</p>
<p>The challenge with allocating everything up-front is that you have to know before-hand in your game how many objects you will need exactly. Well that&#8217;s pretty straightforward for storing something like meshes as you will know at compile time how many you need. It&#8217;s when you want to show multiple instances of those meshes on-screen at runtime that you are faced with a problem.</p>
<p>For example, if you have a car model and want to show a street scene in your game, you may wish to re-use that car model to place 3 cars on the road at night but put 20 on the road at peak times. You&#8217;ll need to allocate enough of those objects during the games initialisation to deal with all possibilities.</p>
<h1>Approach 2</h1>
<p>Allocate what you want, whenever you want but keep the managed heap simple. Each time you create a new object and store the reference, that is one more reference the GC needs to keep track of. The more references you have, the longer GC takes &#8211; bad news during a screen update. A lot of data with plenty of references to other objects is going to slow things down come GC time and the fact you are constantly allocating means that GC <em>will </em>occur sooner or later &#8211; always when you least need it.</p>
<p>To keep references to a minimum, you could use arrays to store your object collections and use a simple integer reference to link them instead. See <a href="http://blogs.msdn.com/shawnhar/archive/2007/07/02/twin-paths-to-garbage-collector-nirvana.aspx">Shawn&#8217;s post</a> for more details.</p>
<h1>My choice?</h1>
<p>I went for <strong>Approach 1</strong> &#8211; don&#8217;t allocate mid-game. The main reasons were that <strong>Approach 2</strong> required that I maintain references between objects using integer indexes to look-up a required object in a collection. That then means that I have to manage those references myself. I find that idea a little crazy as c# is more than capable of maintaining those references out-of-the-box and the idea that I would ditch that and implement my own reference management code sounds like a recipe for disaster! As soon as I destroy an object, I would then have to go through all my data structures looking for references to it to clean up. That sounds a lot like a garbage collector to me and I have to wonder whether the performance benefit of reducing object references would be cancelled out by my own &#8216;DIY&#8217; garbage collector.</p>
<p>One thing that made <strong>Approach 1</strong> easier for me was to implement resource pooling. The idea is that you allocate an arbitrary number of objects up-front and then use a resource pool class to maintain the collection. When you need a new object, rather than allocate and risk garbage collection, you simply get a &#8216;ready-rolled&#8217; one from the pool.</p>
<p>Luckily for me, <a href="http://swampthingtom.blogspot.com/">Thomas H. Aylesworth</a> has <a href="http://swampthingtom.blogspot.com/2007/06/generic-pool-collection-class.html">written</a> a pretty cool generic class to allow you to pool any type of object. The only constraint is that the object must have a parameterless constructor. The reason is that you will need to be able to get an &#8216;empty&#8217; object out of this pool and fill it with your data before it can be used. If it didn&#8217;t have a parameterless constructor, the pool would have trouble allocating all the objects you need up front as it would not know what parameters were appropriate for the constructor &#8211; it <em>is</em> a generic class after all.</p>
<p>I&#8217;ve added the class to my own engine, and you can too provided you leave his copyright and license information intact as I have done.</p>
<h1>Using the pool class</h1>
<p><code> </code></p>
<pre>
modelPool = new Pool<model>(10);
effectPool = new Pool<effect>(5);
instancePool = new Pool<modelinstance>(100);
</modelinstance></effect></model></pre>
<p>This code shows how you would initialise the pool. Note, the Effect class in XNA does not have a parameterless constructor so cannot be used directly with the Pool class. I simply created my own Effect class and wrapped the XNA Effect class up in it. To ensure my code then refers to my Effect class rather than the XNA one, I add the following uses directive to the top of each source code file:</p>
<p><code> </code></p>
<pre>
using Effect = XNAEngine.Graphics.Effect;
using XnaEffect = Microsoft.Xna.Framework.Graphics.Effect;</pre>
<p>Then I made sure my Effect class had a parameterless constructor. This was all made a lot simpler by the fact that I wanted to customise the Effect and Model classes myself anyway and while the XNA classes are useful, your own class can be less generic than theirs and ideally faster.</p>
<p><code> </code></p>
<pre>
Pool<effect>.Node effectNode = effectPool.Get();
</effect></pre>
<p>This doesn&#8217;t allocate any memory. The Get() method on the Pool object simply marks one of it&#8217;s unused pre-allocated objects as &#8216;in-use&#8217; and returns a reference to it. To access the Effect object itself, simply use the .item property.</p>
<p><code> </code></p>
<pre>
effectPool.Return(effectNode);</pre>
<p>This code returns the node back to the Pool, ready for re-use later. It isn&#8217;t destroying the object though, it&#8217;s there waiting if we need it again!</p>
<h1>Conclusion</h1>
<p>As Shawn said, &#8220;you must pick just one path and follow it to the bitter end&#8221;, which I plan on doing. I don&#8217;t think I ever would have taken the <strong>Approach 2</strong> path he describes, but there may come a time when I need it so it&#8217;s nice to know the option exists.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cannontrodder.net/2007/07/23/optimising-xna-performance-with-resource-pooling/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Professional XNA Game Programming</title>
		<link>http://www.cannontrodder.net/2007/07/12/professional-xna-game-programming/</link>
		<comments>http://www.cannontrodder.net/2007/07/12/professional-xna-game-programming/#comments</comments>
		<pubDate>Thu, 12 Jul 2007 21:57:31 +0000</pubDate>
		<dc:creator>cannontrodder</dc:creator>
				<category><![CDATA[Book Reviews]]></category>
		<category><![CDATA[XNA]]></category>
		<category><![CDATA[XNA General]]></category>

		<guid isPermaLink="false">http://www.cannontrodder.net/2007/07/12/professional-xna-game-programming/</guid>
		<description><![CDATA[I&#8217;ve been carrying around £40 worth of Waterstone&#8217;s vouchers for almost two years now and decided to stop wandering in there on the off-chance I would see something I really liked to use them up. Instead, I waited for something I really wanted and ordered it into the local branch.

I stumbled across the website of [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been carrying around £40 worth of <a href="http://www.waterstones.com/">Waterstone&#8217;s</a> vouchers for almost two years now and decided to stop wandering in there on the off-chance I would see something I really liked to use them up. Instead, I waited for something I really wanted and ordered it into the local branch.<br />
<span id="more-22"></span></p>
<p>I stumbled across the <a href="http://abi.exdream.com/">website</a> of Benjamin Nitschke after reading an <a href="http://blog.wired.com/games/2007/03/the_xna_challen.html">article</a> about a Microsoft competition to write an XNA game in 4 days. I think you&#8217;ll agree that the <a href="http://www.cannontrodder.net/wp-content/dungeonquest.jpg" title="Dungeon Quest Screenshot" rel="lightbox">results</a> are staggering! So, it&#8217;s Ben&#8217;s book I decided to buy and here is a mini-review of it. The book is <a href="http://www.amazon.com/Professional-XNA-Game-Programming-Windows/dp/0470126779">available now</a> and I got it at Waterstone&#8217;s for £26.99.</p>
<h1>Who is it for?</h1>
<p>The book is aimed at newcomers to XNA but NOT newcomers to programming. In my opinion, this was a good move. There are a lot of C# books out there that cover the basics and I would have been disappointed had this book dedicated the initial chapters to re-iterating the basics and leaving less room for XNA goodness.</p>
<p>If you are a beginner, I would still recommend the book if you are interested in games programming as the initial chapters focus on simple games that could serve as an excellent way to brush up on your programming skills &#8211; much more fun than &#8220;Hello World!&#8221; It would be wise to have another text on pure C# programming though.</p>
<h1>What it covers</h1>
<p>Subjects covered (and this is an abbreviated list) are:</p>
<ul>
<li>Setting up the development environment.</li>
<li>Using the Agile Method to develop games.</li>
<li>Simple 2D games such as Pong and Breakout.</li>
<li>Displaying a simple 3D model.</li>
<li>Using shaders, normal mapping and other techniques to produce professional visuals such as bloom, motion blur, glass effects etc.</li>
<li>Sound.</li>
<li>Landscape design and implementation.</li>
<li>Physics.</li>
</ul>
<p>What&#8217;s refreshing is that by leaving out elementary basics, Benjamin is able to dedicate a large chunk of the book to advanced topics.</p>
<p>Each chapter tends to focus on a particular topic by showing how to implement it in a real game. There are a number of games created in the book ranging from the simple 2D games mentioned earlier, up to a fantastic 3D racing game in which you throw your car around a track that snakes in and out of a realistic rocky landscape.</p>
<p>Ben says early on how much he prefers XNA to DirectX programming and in fairness to him, he delivers the goods to back up his claims. The games he creates throughout the book certainly have that professional polish and don&#8217;t feel amateurish or compromised  in any way.</p>
<h1>How to use the book</h1>
<p>The author does not list the code for each game in its entirety. Instead, he chooses to focus on the really important snippets of code that illustrate his point, leaving it up to the reader to download the source code from <a href="http://www.wrox.com/WileyCDA/WroxTitle/productCd-0470126779,descCd-download_code.html">Wrox</a> and read through to gain more insight. I think this is a good move on his part as I would have been just as disappointed with the book being &#8216;filled&#8217; with code dumps, as I would if it dedicated chunks of pages to explaining how variables work.</p>
<p>When it comes to 3D, he focusses more on how to get XNA to do what you need it to do rather than explaining every single aspect of 3D, such as matrices. I&#8217;ve always found such texts on 3D very dry and at least with this method, you can actually get something done <em>and</em> become more comfortable with the concepts. It&#8217;s always less frustrating when you can actually experiment with real code to get instant feedback.</p>
<h1>Agile</h1>
<p>Benjamin is a <strong>big</strong> fan of the Agile Method and it really suits game development on XNA. I must admit I was initially shocked to see it promoted so much in the book but as I have progressed, the benefits have been realised. I won&#8217;t explain it in full but the process goes a bit like this:</p>
<ul>
<li>Think about a part of the game you want to implement (eg drawing the paddle in breakout and moving it around).</li>
<li>Write a unit test which calls some (as yet uncoded) methods to accomplish this task.</li>
<li>Write the methods which actually do the work.</li>
<li>Run the unit test until you get the required result.</li>
</ul>
<p>It&#8217;s a useful way of working as you focus on just one thing at a time and gradually tick off all the functionality your game requires. At the end you still have your unit tests so you can quickly identify any new bugs you have inadvertently created by just running each in isolation. I&#8217;ve always coded by dividing a problem into small chunks but this way formalises that a bit and really helps you focus on solving one problem at a time while doing it well.</p>
<h1>Verdict</h1>
<p>As you have hopefully gathered from this article, I like the book. It&#8217;s excellent value for money as it doesn&#8217;t re-iterate programming basics, doesn&#8217;t pad out the book with endless listings but <strong>does</strong> take you from being a beginner with XNA to being able to handle some very advanced topics. My gut instinct is once you have exhausted this book, you&#8217;ll be a pretty accomplished XNA games developer in your own right.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cannontrodder.net/2007/07/12/professional-xna-game-programming/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XNA Font Support</title>
		<link>http://www.cannontrodder.net/2007/07/12/xna-font-support/</link>
		<comments>http://www.cannontrodder.net/2007/07/12/xna-font-support/#comments</comments>
		<pubDate>Thu, 12 Jul 2007 19:56:33 +0000</pubDate>
		<dc:creator>cannontrodder</dc:creator>
				<category><![CDATA[XNA]]></category>
		<category><![CDATA[XNA General]]></category>

		<guid isPermaLink="false">http://www.cannontrodder.net/2007/07/12/xna-font-support/</guid>
		<description><![CDATA[With the new release of XNA Refresh, you can now easily add fonts to your projects. While it is nice to just specify a true type font in an xml file and have XNA import the resulting bitmap generated from it, I prefer to be able to edit the bitmap in photoshop to make it [...]]]></description>
			<content:encoded><![CDATA[<p>With the new release of XNA Refresh, you can now easily add fonts to your projects. While it is nice to just specify a true type font in an xml file and have XNA import the resulting bitmap generated from it, I prefer to be able to edit the bitmap in photoshop to make it look better.</p>
<p>Thankfully, someone else has <a href="http://creators.xna.com/Headlines/utilities/archive/2007/04/26/Bitmap-Font-Maker-Utility.aspx">written a nice tool</a> to create the intermediary bitmap for you. All you then need to do is select the white characters in photoshop and start applying effects!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cannontrodder.net/2007/07/12/xna-font-support/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
