<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Cornflower Blue</title><link>http://blogs.msdn.com/b/etayrien/</link><description /><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>LostGarden</title><link>http://blogs.msdn.com/b/etayrien/archive/2008/11/07/lostgarden.aspx</link><pubDate>Sat, 08 Nov 2008 02:34:10 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9053289</guid><dc:creator>etayrien</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/etayrien/rsscomments.aspx?WeblogPostID=9053289</wfw:commentRss><comments>http://blogs.msdn.com/b/etayrien/archive/2008/11/07/lostgarden.aspx#comments</comments><description>&lt;p&gt;One of the blogs I read regularly is &lt;a href="http://lostgarden.com/"&gt;LostGarden&lt;/a&gt;. It’s got a lot of great info about game design, and every now and then there’s a “Game Prototyping Challenge,” where Danc posts a bunch of graphics and design doc, challenging his readers to see who can come up with the most fun game. Definitely worth checking out! I dig his graphics quite a bit :)&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9053289" width="1" height="1"&gt;</description></item><item><title>Audio input and output formats</title><link>http://blogs.msdn.com/b/etayrien/archive/2008/09/22/audio-input-and-output-formats.aspx</link><pubDate>Mon, 22 Sep 2008 05:19:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8960806</guid><dc:creator>etayrien</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/etayrien/rsscomments.aspx?WeblogPostID=8960806</wfw:commentRss><comments>http://blogs.msdn.com/b/etayrien/archive/2008/09/22/audio-input-and-output-formats.aspx#comments</comments><description>&lt;p&gt;We've had some questions about what audio formats the XNA content pipeline can take as input, and what formats they are converted to. Now that the 3.0 beta has shipped, I figure it's a good time to get some of that information out there. So, to be clear, this information is all true for the 3.0 beta, and will likely be true for the final release of 3.0 as well.&lt;/p&gt;  &lt;p&gt;In v3.0, there are three main ways to have your game make some noise. Two of these are new to v3.0. First up is XACT, and the AudioEngine, WaveBank, SoundBank, and Cue types.&lt;/p&gt;  &lt;h4&gt;XACT:&lt;/h4&gt;  &lt;p&gt;The version of the XACT used by XNA Game Studio only accepts .WAV files containing PCM data as input. By default, the XACT build process will keep your data in PCM format as it built. This means your data does not go through any kind of re-encoding.&lt;/p&gt;  &lt;p&gt;If you want, you can enable compression in XACT, which will change your assets to XMA data when built for Xbox 360, and ADPCM when built for Windows. Mitch has more information &lt;a href="http://blogs.msdn.com/mitchw/archive/2007/04/27/audio-compression-using-xact.aspx" mce_href="http://blogs.msdn.com/mitchw/archive/2007/04/27/audio-compression-using-xact.aspx"&gt;here&lt;/a&gt;. &lt;/p&gt;  &lt;h4&gt;MediaPlayer:&lt;/h4&gt;  &lt;p&gt;The MediaPlayer &amp;amp; Song API, which is new for v3.0, is designed for music playback in your game. To use it, drag a WMA or MP3 file into solution explorer, then use Content.Load to load it as a Song. Once you have a Song, you can use MediaPlayer.Play to play your music. &lt;/p&gt;  &lt;p&gt;WMA, MP3, and WAV files can all be built as Songs. This is the default setting for WMA and MP3 files, but not WAVs: if you want to load a WAV as a Song, you have to change its processor to SongProcessor. Regardless of the input format, the SongProcessor will convert your audio assets to WMA files for use at runtime, so your music will go through some re-encoding here. The bitrate of the WMA file depends on the Conversion Quality you select, as you can see below: &lt;/p&gt;  &lt;table border="0" cellpadding="2" cellspacing="0" width="400"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="200"&gt;&lt;b&gt;Conversion Quality:&lt;/b&gt;&lt;/td&gt;        &lt;td valign="top" width="200"&gt;&lt;b&gt;Bitrate:&lt;/b&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="200"&gt;Best (default)&lt;/td&gt;        &lt;td valign="top" width="200"&gt;192k&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="200"&gt;Medium&lt;/td&gt;        &lt;td valign="top" width="200"&gt;128k&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="200"&gt;Low&lt;/td&gt;        &lt;td valign="top" width="200"&gt;96k&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;h4&gt;SoundEffect:&lt;/h4&gt;  &lt;p&gt;The third way to play audio in v3.0 of the framework is via the SoundEffect and SoundEffectInstance types, which are (duh) designed for sound effect playback. These are the counterpart of the Media/Song API. To use it, drag a WAV file into solution explorer, and then use Content.Load to load the file as a SoundEffect. Once the SoundEffect has been loaded, use SoundEffect.Play to play it.&lt;/p&gt;  &lt;p&gt;WMA, MP3, and WAV files can all be built as SoundEffects. This is the default setting for WAV files, but not MP3 and WMA files. (Remember, their default setting is to be built as Songs.) If you want an MP3 or WMA file to be built as a SoundEffect, just change its processor from SongProcessor to SoundEffectProcessor.&lt;/p&gt;  &lt;p&gt;The SoundEffectProcessor’s output format depends on two things: the target platform and the quality you select. It breaks down like this:&lt;/p&gt;  &lt;table border="0" cellpadding="2" cellspacing="0" width="509"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="176"&gt;&lt;b&gt;ConversionQuality:&lt;/b&gt;&lt;/td&gt;        &lt;td valign="top" width="115"&gt;&lt;b&gt;Windows&lt;/b&gt;&lt;/td&gt;        &lt;td valign="top" width="115"&gt;&lt;b&gt;Xbox 360&lt;/b&gt;&lt;/td&gt;        &lt;td valign="top" width="101"&gt;&lt;b&gt;Zune&lt;/b&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="176"&gt;Best (default)&lt;/td&gt;        &lt;td valign="top" width="115"&gt;PCM&lt;/td&gt;        &lt;td valign="top" width="115"&gt;XMA 60&lt;/td&gt;        &lt;td valign="top" width="101"&gt;PCM&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="176"&gt;Medium&lt;/td&gt;        &lt;td valign="top" width="115"&gt;ADPCM&lt;/td&gt;        &lt;td valign="top" width="115"&gt;XMA 40&lt;/td&gt;        &lt;td valign="top" width="101"&gt;PCM 3/4*&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="176"&gt;Low&lt;/td&gt;        &lt;td valign="top" width="115"&gt;ADPCM 1/2*&lt;/td&gt;        &lt;td valign="top" width="115"&gt;XMA 20&lt;/td&gt;        &lt;td valign="top" width="101"&gt;PCM 1/2*&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;* The audio asset is down-sampled to either 3/4 or 1/2 of the original sample rate, with a lower limit of 8khz.&lt;/p&gt;  &lt;p&gt;XMA is an internally developed sound format which has better compression ratios and sound quality than ADPCM. The Xbox 360 can decode XMA data in hardware, making XMA a great choice for a sound effect data format. I’m not privy to the details of the XMA encoding algorithm, so I can’t tell you what the quality ratings of 60, 40, and 20 mean, exactly. They’re not bitrates; they’re more of a hint to the XMA encoder as how aggressively it should compress. In practice, almost no one needs a quality setting higher than 60, so we’ve set that as our upper bound. You should definitely experiment with the quality settings on all platforms, to see how much compression you can get away with before the artifacts start to get too objectionable. &lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8960806" width="1" height="1"&gt;</description></item><item><title>You are hearing me talk.</title><link>http://blogs.msdn.com/b/etayrien/archive/2008/09/03/you-are-hearing-me-talk.aspx</link><pubDate>Wed, 03 Sep 2008 02:10:36 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8920927</guid><dc:creator>etayrien</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/etayrien/rsscomments.aspx?WeblogPostID=8920927</wfw:commentRss><comments>http://blogs.msdn.com/b/etayrien/archive/2008/09/03/you-are-hearing-me-talk.aspx#comments</comments><description>&lt;p&gt;The powers that be have just posted slides and WMA audio recordings from GameFest! Here’s some links.&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://blogs.msdn.com/mitchw/"&gt;Mitch&lt;/a&gt;’s presentation, &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=aa03d4f1-7239-4aeb-b37f-4c0df7ec8a7d&amp;amp;displaylang=en"&gt;What’s New In XNA Game Studio 3.0&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.mobygames.com/developer/sheet/view/developerId,23484/"&gt;Frank&lt;/a&gt;’s perf talk: &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=76FA78D1-0974-4257-9324-87DCB37DA494&amp;amp;displaylang=en "&gt;XNA Game Studio Performance 2008: Multithreading and GPU&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;My Content Pipeline presentation! W00T! &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=5BA8DBD8-8F66-44F4-8D8D-E083327CDB47&amp;amp;displaylang=en "&gt;Real World Content Pipeline Examples&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/shawnhar/"&gt;Shawn&lt;/a&gt;’s Content Pipeline presentation: &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=39516640-3F30-40AF-BB71-C0EE9405BF3D&amp;amp;displaylang=en "&gt;Building Worlds with the Content Pipeline&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;Mitch gave a best practices talk: &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=0DFB0B32-DBCF-4D8F-A5E9-AA64236466DC&amp;amp;displaylang=en "&gt;Creating Great Community Games&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;Shawn’s networking talk. Lots of great info in here, even if you’re not using the XNA framework for networking. &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=07BC861A-BB03-4D25-B93E-FAFB390B75FB&amp;amp;displaylang=en "&gt;Networking, Traffic Jams, and Schrödinger's Cat&lt;/a&gt;.&lt;/li&gt; &lt;/ul&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8920927" width="1" height="1"&gt;</description></item><item><title>SoundEffect APIs in the CTP</title><link>http://blogs.msdn.com/b/etayrien/archive/2008/05/07/soundeffect-apis-in-the-ctp.aspx</link><pubDate>Wed, 07 May 2008 22:55:07 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8466835</guid><dc:creator>etayrien</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/etayrien/rsscomments.aspx?WeblogPostID=8466835</wfw:commentRss><comments>http://blogs.msdn.com/b/etayrien/archive/2008/05/07/soundeffect-apis-in-the-ctp.aspx#comments</comments><description>&lt;p&gt;We've just released the Community Technology Preview (CTP) of Game Studio Version 3.0. If you haven't read the post on our team blog yet, check it out &lt;a href="http://blogs.msdn.com/xna/archive/2008/05/07/announcing-xna-game-studio-3-0-community-technical-preview-ctp.aspx"&gt;here&lt;/a&gt;.&amp;nbsp;&lt;/p&gt; &lt;p&gt;One of the coolest new features (I'm a bit biased &lt;img alt="smile_regular" src="http://spaces.live.com/rte/emoticons/smile_regular.gif"&gt;) in version 3.0 is the SoundEffect API, which allows you to drag and drop wav files into your game project, and then use Content.Load&amp;lt;SoundEffect&amp;gt; to load SoundEffects.&lt;/p&gt; &lt;p&gt;A few people have asked about what this means for XACT. Well, the XACT APIs aren't going anywhere, they are still supported and we expect people to still use them! XACT is useful if you're looking for a more content-driven solution, where the majority of the sound design is done in the XACT tool. What the SoundEffect APIs offer is a more self-contained, code driven approach. Hope that clears things up a bit.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8466835" width="1" height="1"&gt;</description></item><item><title>Content Importers</title><link>http://blogs.msdn.com/b/etayrien/archive/2008/02/21/content-importers.aspx</link><pubDate>Thu, 21 Feb 2008 10:02:18 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7831908</guid><dc:creator>etayrien</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/etayrien/rsscomments.aspx?WeblogPostID=7831908</wfw:commentRss><comments>http://blogs.msdn.com/b/etayrien/archive/2008/02/21/content-importers.aspx#comments</comments><description>&lt;p&gt;If you've thumbed through the links in my last post on this subject, hopefully you'll have a bit more of an understanding of what problems the content pipeline is trying to solve, and what constraints it has. I'm going to start off by writing a bit about content importers, since (as we'll see) the importer is the first stage of the pipeline. The beginning is a good a place to start as any, I suppose. &lt;/p&gt; &lt;p&gt;Note that throughout these articles I'm going to refer to "assets". It sounds kind of fancy, but it's just a generic catch all for any game resource that isn't code. 3D models, textures, level data - all assets.&lt;/p&gt; &lt;p&gt;OK, so first, the big picture: as you build an asset, it passes through the content pipeline in a series of stages:&lt;/p&gt; &lt;ol&gt; &lt;li&gt;Import the asset from disk, and load it into memory&lt;/li&gt; &lt;li&gt;Do some additional processing on that in-memory asset&lt;/li&gt; &lt;li&gt;save the processed asset to disk&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;At each stage, the content pipeline farms the work out to a helper object. The helper objects in charge of each of those steps are the ContentImporter, ContentProcessor, and ContentTypeWriter, respectively.&lt;/p&gt; &lt;p&gt;The content importer's job is to load a file from disk and into memory. For every file that the content pipeline wants to build, it will call the &lt;a href="http://msdn2.microsoft.com/en-us/library/bb197436.aspx"&gt;Import&lt;/a&gt; function on a content importer, and then wait for the importer to return the object. &lt;/p&gt; &lt;p&gt;For example, Game Studio ships with the FbxImporter, which&amp;nbsp;loads Autodesk .fbx files. These&amp;nbsp;files&amp;nbsp;contain models and meshes in a 3D scene. Most 3D modeling tools support the .fbx format. The FbxImporter will read and parse the content in an .FBX file and change it into a NodeContent, which represents a 3d scene. (More about NodeContent objects and 3d scenes&amp;nbsp;&lt;a href="http://msdn2.microsoft.com/en-us/library/bb975254.aspx"&gt;here&lt;/a&gt;.) &lt;/p&gt; &lt;p&gt;Different importers read different file formats, and convert the data into different types. &lt;a href="http://msdn2.microsoft.com/en-us/library/bb447762.aspx"&gt;This&lt;/a&gt; help page has more information about&amp;nbsp;all of the importers&amp;nbsp;that Game Studio ships with,&amp;nbsp;the file formats they import, and what kind of objects they are imported to.&lt;/p&gt; &lt;p&gt;While the asset is being imported, the importer should also do it's best to get rid of any&amp;nbsp;file-format specific nuances that are a result of the file format, and "normalize" the asset as much as possible.&amp;nbsp;After the importer is finished, the rest of the stages of the pipeline shouldn't have to worry about whether the asset was originally .FBX or .X, or whether it was .TGA or .JPG. This will make it much easier for the next stage, the content processor,&amp;nbsp;to do its work. I'll talk more about this when I write about content processors.&lt;/p&gt; &lt;p&gt;The content pipeline was designed with extensibility in mind, and so it's pretty easy to move beyond the standard importers and&amp;nbsp;plug your importer (or someone elses!) into the content build and use it to bring in other formats. &lt;a href="http://msdn2.microsoft.com/en-us/library/bb447754.aspx#ID2E6E"&gt;This&lt;/a&gt; help page shows how to create a new importer, and &lt;a href="http://msdn2.microsoft.com/en-us/library/bb447743.aspx"&gt;this&lt;/a&gt; one tells how to tell the content pipeline to use your the assembly containing new content importer. For a sample of how to actually implement an importer, I strongly recommend you check out the &lt;a href="http://creators.xna.com/Headlines/developmentaspx/archive/2007/01/01/Custom-Model-Importer-Sample.aspx"&gt;Custom Model Importer&lt;/a&gt;&amp;nbsp;sample, which'll import models from the .OBJ file format.&lt;/p&gt; &lt;p&gt;So, that's it for importers. Feel free to comment with any questions and I'll do my best to answer them.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=7831908" width="1" height="1"&gt;</description></item><item><title>Useful Content Pipeline Links</title><link>http://blogs.msdn.com/b/etayrien/archive/2008/02/15/useful-content-pipeline-links.aspx</link><pubDate>Sat, 16 Feb 2008 02:30:45 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7724486</guid><dc:creator>etayrien</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/etayrien/rsscomments.aspx?WeblogPostID=7724486</wfw:commentRss><comments>http://blogs.msdn.com/b/etayrien/archive/2008/02/15/useful-content-pipeline-links.aspx#comments</comments><description>&lt;p&gt;As I wrote the other day, I'd like to help out people that are having trouble understanding the content pipeline, and I'm planning on writing some blog posts about it. I don't have a lot of time right now to dedicate to this, but I was digging around the other day trying to see what information was already out there, and I found several links that might be useful.&lt;/p&gt; &lt;p&gt;&lt;a href="http://klucher.com/"&gt;Michael Klucher&lt;/a&gt; wrote a &lt;a href="http://blogs.msdn.com/xna/archive/2006/08/29/730168.aspx"&gt;high level overview&lt;/a&gt; of the content pipeline for our team blog back when we shipped v1. (memories....) &lt;a href="http://blogs.msdn.com/shawnhar/"&gt;Shawn&lt;/a&gt; also wrote several useful blog posts explaining various concepts about the content pipeline,&amp;nbsp;including:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;an &lt;a href="http://blogs.msdn.com/shawnhar/archive/2006/08/25/724737.aspx"&gt;example&lt;/a&gt; of the way most people will use the content pipeline  &lt;li&gt;some of the &lt;a href="http://blogs.msdn.com/shawnhar/archive/2006/08/24/717622.aspx"&gt;design assumptions&lt;/a&gt; we made  &lt;li&gt;why we &lt;a href="http://blogs.msdn.com/shawnhar/archive/2006/11/07/build-it-ahead-of-time.aspx"&gt;pre-build&lt;/a&gt; content, instead of building it when the game runs  &lt;li&gt;an &lt;a href="http://blogs.msdn.com/shawnhar/archive/2006/08/26/725954.aspx"&gt;overview&lt;/a&gt; of how the pipeline can be extended  &lt;li&gt;and common&amp;nbsp;ways to &lt;a href="http://blogs.msdn.com/shawnhar/archive/2006/12/07/what-to-extend-in-the-content-pipeline.aspx"&gt;extend&lt;/a&gt; the content pipeline.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;From the help pages, we've got a good &lt;a href="http://msdn2.microsoft.com/en-us/library/bb447756(MSDN.9).aspx"&gt;overview&lt;/a&gt; and &lt;a href="http://msdn2.microsoft.com/en-us/library/bb447745(MSDN.9).aspx"&gt;architecture&lt;/a&gt;&amp;nbsp;page. One of the best pages is this &lt;a href="http://msdn2.microsoft.com/en-us/library/bb447754(MSDN.9).aspx"&gt;How to&lt;/a&gt;, which is a walkthrough that adds a custom type&amp;nbsp;to the pipeline and creates a custom importer and processor. It imports pixel shaders as an example, but&amp;nbsp;don't be afraid to read this even if you're not interested in importing pixel shaders!&amp;nbsp;There's a gold mine of info in there.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Ok, that's it. Hope this helps - hopefully in the next few weeks I'll find some time to sit down and give this topic a bit more detail.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=7724486" width="1" height="1"&gt;</description></item><item><title>Quick N Dirty Tutorial: Making Nice Explosion Sprites</title><link>http://blogs.msdn.com/b/etayrien/archive/2008/02/15/quick-n-dirty-tutorial-making-nice-explosion-sprites.aspx</link><pubDate>Fri, 15 Feb 2008 05:10:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7704989</guid><dc:creator>etayrien</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/etayrien/rsscomments.aspx?WeblogPostID=7704989</wfw:commentRss><comments>http://blogs.msdn.com/b/etayrien/archive/2008/02/15/quick-n-dirty-tutorial-making-nice-explosion-sprites.aspx#comments</comments><description>&lt;p&gt;When&amp;nbsp;I was working on the &lt;a href="http://blogs.msdn.com/etayrien/archive/2006/12/19/alpha-blending-part-3.aspx" mce_href="http://blogs.msdn.com/etayrien/archive/2006/12/19/alpha-blending-part-3.aspx"&gt;alpha blending&lt;/a&gt; posts, I found myself in need of a texture to demonstrate how additive blending could be used to make an explosion effect. When I worked on a shooter a few years back I learned a little bit about how to do that, but couldn't really remember the specifics. So, I bugged an artist friend of mine, &lt;a href="http://www.ghostscape.com/" mce_href="http://www.ghostscape.com/"&gt;Michael Clark&lt;/a&gt;, and asked him how to do it. I saved the chat log, and I've been meaning to clean it up into a proper tutorial, but I just never had the time. Anyway, here's a really really rough edit of the chat log. Maybe I'll get around to cleaning&amp;nbsp;it up eventually - or maybe&amp;nbsp;someone else can work from this and post better instructions?&lt;/p&gt; &lt;p&gt;These instructions are for Photoshop but&amp;nbsp;you should be able to&amp;nbsp;accomplish something similar&amp;nbsp;with Paint.Net. If I remember correctly, to use this technique you'll have to download a plugin to do more complex gradients.&lt;/p&gt; &lt;p&gt;For reference; the end goal should look something like the image below. I know it looks really dark, but that's OK. Remember we're layering a whole bunch of them together with additive blending. You can check out the particle samples (&lt;a href="http://creators.xna.com/Headlines/developmentaspx/archive/2007/01/01/Particle-Sample.aspx" mce_href="http://creators.xna.com/Headlines/developmentaspx/archive/2007/01/01/Particle-Sample.aspx"&gt;2D&lt;/a&gt; and &lt;a href="http://creators.xna.com/Headlines/developmentaspx/archive/2007/01/01/Particle-3D-Sample.aspx" mce_href="http://creators.xna.com/Headlines/developmentaspx/archive/2007/01/01/Particle-3D-Sample.aspx"&gt;3D&lt;/a&gt;) to see how this looks in practice.&lt;/p&gt; &lt;p&gt;&lt;img src="http://blogs.msdn.com/blogfiles/etayrien/WindowsLiveWriter/QuickNDirtyTutorialMakingNiceExplosionSp_FA25/explosion%5B2%5D.png" mce_src="http://blogs.msdn.com/blogfiles/etayrien/WindowsLiveWriter/QuickNDirtyTutorialMakingNiceExplosionSp_FA25/explosion%5B2%5D.png" height="225" width="225"&gt;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;So, enough ado - here's the chat log. Again, sorry this isn't the greatest quality... but hopefully it's better than nothing.&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;Talented Artist: first make a 512x512 image or whatever. then hit D to pick black and white as your default colors.&lt;br&gt;Talented Artist: then filter-render-clouds &lt;br&gt;Talented Artist: then ctrl-shift-L for auto levels &lt;br&gt;Talented Artist: then filter-render-difference clouds &lt;br&gt;Talented Artist: then ctrl-shift-L for auto levels.&lt;br&gt;Talented Artist: if you don't have some white bits in the middle then hit ctrl-i to invert.&lt;/p&gt;&lt;/blockquote&gt; &lt;blockquote&gt; &lt;p&gt;&lt;br&gt;Talented Artist: now make a new layer &lt;br&gt;Talented Artist: select the gradient tool and select circular gradient and make a circular gradient with a white middle and a black edge. you want the radius to be 2-3 pixels less than the size of the texture, and centered.&lt;br&gt;Talented Artist: set the blending mode of the gradient layer to multiple &lt;br&gt;Talented Artist: hit ctrl-L and adjust the levels so you get a nice slope - put a point in the middle or so and move it up some so that you brighten the gradient a bit. You'll have to play around with the control points a bit. Make sure the outside of the circle doesn't become visible.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Talented Artist: now make a new adjustment layer(in the layer palette click the middle button on the bottom, the one that looks like a circle thats half black half white) and make a gradient map layer &lt;br&gt;Talented Artist: double click the black and white gradient in the window that pops up and make a gradient that... &lt;br&gt;Talented Artist: okay have you made custom gradients before &lt;/p&gt; &lt;p&gt;Me: once or twice  &lt;/p&gt;&lt;p&gt;Talented Artist: okay basically you want to make a gradient that is like black at the 0.0 mark, dark red at the 0.75 mark, orangey-yellow at the .5 mark, and yellow-white at the 1.0 mark. You'll probably wind up needing to tweak this.  &lt;/p&gt;&lt;p&gt;Me: explain what you mean by orangeyred  &lt;/p&gt;&lt;p&gt;Talented Artist: one sec &lt;br&gt;Talented Artist: the orangey color was 231,188,85 &lt;br&gt;Talented Artist: and the yellow white is 253 255 213  &lt;/p&gt;&lt;p&gt;Talented Artist: also this whole thing might need to be tweaked and have like a solid black at 20% opacity laid over it to darken it.&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&amp;nbsp; &lt;/p&gt;&lt;p&gt;That's it! So, does your explosion sprite look anything like mine? And more importantly, are there any brave souls out there willing to try this out and turn it into a proper tutorial?&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=7704989" width="1" height="1"&gt;</description></item><item><title>What's the Most Confusing Part of the Content Pipeline?</title><link>http://blogs.msdn.com/b/etayrien/archive/2008/02/05/what-s-the-most-confusing-part-of-the-content-pipeline.aspx</link><pubDate>Wed, 06 Feb 2008 02:32:25 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7478330</guid><dc:creator>etayrien</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/etayrien/rsscomments.aspx?WeblogPostID=7478330</wfw:commentRss><comments>http://blogs.msdn.com/b/etayrien/archive/2008/02/05/what-s-the-most-confusing-part-of-the-content-pipeline.aspx#comments</comments><description>&lt;p&gt;&lt;/p&gt; &lt;p&gt;I've started to look through some of the feedback from our recent survey, and noticed that there's a lot of you out there who are having trouble understanding the content pipeline. Documentation was a frequent complaint, and a few people mentioned a lack of a high level overview. &lt;/p&gt; &lt;p&gt;&lt;br&gt;To remedy this, I'm considering starting a series of blog posts on the content pipeline. Are there any topics in particular you would like me to cover, or any parts that you find particularly confusing? I'll see what I can do to pay particular attention to those areas. Please, remember to be specific! "It's no good" doesn't help! &lt;img alt="smile_regular" src="http://spaces.live.com/rte/emoticons/smile_regular.gif"&gt; &lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;I've filed a &lt;a href="http://forums.xna.com/thread/44596.aspx"&gt;forum post&lt;/a&gt; asking the exact same question. Feel free to leave a comment or reply to the thread, I'll be checking both.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=7478330" width="1" height="1"&gt;</description></item><item><title>Extending the ContentManager for Models</title><link>http://blogs.msdn.com/b/etayrien/archive/2007/05/03/extending-the-contentmanager-for-models.aspx</link><pubDate>Thu, 03 May 2007 03:38:21 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2383757</guid><dc:creator>etayrien</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/etayrien/rsscomments.aspx?WeblogPostID=2383757</wfw:commentRss><comments>http://blogs.msdn.com/b/etayrien/archive/2007/05/03/extending-the-contentmanager-for-models.aspx#comments</comments><description>&lt;p&gt;I don't know about everyone else, but usually the first thing I do after loading models is loop over their effects and set up their lighting. (Check Shawn's blog to read more about the &lt;a href="http://blogs.msdn.com/shawnhar/archive/2007/04/09/the-standard-lighting-rig.aspx"&gt;standard lighting rig&lt;/a&gt;&amp;nbsp;and &lt;a href="https://blogs.msdn.com/shawnhar/archive/2007/04/19/basiceffect-preferperpixellighting.aspx"&gt;per pixel lighting&lt;/a&gt;. ) The other day I thought of a neat way to tuck this code away a little, so I thought I'd share.&lt;/p&gt; &lt;p&gt;A subclass of ContentManager could easily handle the model setup code for us automatically. It could check what kind of content it's being asked to load, and if the content type is a Model, it can set up the model automatically.&lt;/p&gt; &lt;p&gt;first, make a subclass of ContentManager.&amp;nbsp;I've called mine SmarterContentManager, because I couldn't think of a better name.&amp;nbsp;&lt;/p&gt;&lt;pre class="csharpcode"&gt;    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; SmarterContentManager : ContentManager
    {
        &lt;span class="kwrd"&gt;public&lt;/span&gt; SmarterContentManager(IServiceProvider serviceProvider)
            : &lt;span class="kwrd"&gt;base&lt;/span&gt;(serviceProvider)
        {
        }
    }&amp;nbsp;&lt;/pre&gt;
&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;

&lt;p&gt;The next step is to override the Load function, and do the extra bit of set up for models.&amp;nbsp;&lt;/p&gt;&lt;pre class="csharpcode"&gt;    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;override&lt;/span&gt; T Load&amp;lt;T&amp;gt;(&lt;span class="kwrd"&gt;string&lt;/span&gt; assetName)
    {
        T t = &lt;span class="kwrd"&gt;base&lt;/span&gt;.Load&amp;lt;T&amp;gt;(assetName);
        Model model = t &lt;span class="kwrd"&gt;as&lt;/span&gt; Model;
        &lt;span class="kwrd"&gt;if&lt;/span&gt; (model != &lt;span class="kwrd"&gt;null&lt;/span&gt;)
        {
            &lt;span class="kwrd"&gt;foreach&lt;/span&gt; (ModelMesh mesh &lt;span class="kwrd"&gt;in&lt;/span&gt; model.Meshes)
            {
                &lt;span class="kwrd"&gt;foreach&lt;/span&gt; (Effect e &lt;span class="kwrd"&gt;in&lt;/span&gt; mesh.Effects)
                {
                    BasicEffect basic = e &lt;span class="kwrd"&gt;as&lt;/span&gt; BasicEffect;
                    &lt;span class="kwrd"&gt;if&lt;/span&gt; (basic != &lt;span class="kwrd"&gt;null&lt;/span&gt;)
                    {
                        basic.EnableDefaultLighting();
                        basic.PreferPerPixelLighting = &lt;span class="kwrd"&gt;true&lt;/span&gt;;
                    }
                }
            }
        }
        &lt;span class="kwrd"&gt;return&lt;/span&gt; t;
    }&lt;/pre&gt;
&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;

&lt;p&gt;This might not be the best design for larger projects, because it ties the content loading part of your engine to graphics rendering. You might argue that a better place to set up this stuff is in some other class that manages lights and rendering state or something. But for me, this works just fine. Most of my XNA games just use BasicEffect with the default lighting rig.&lt;/p&gt;
&lt;p&gt;One more cool thing you can put in this content manager is a bit of code to calculate the absolute bone transforms. (Shawn writes in &lt;a href="https://blogs.msdn.com/shawnhar/archive/2006/11/20/models-meshes-parts-and-bones.aspx"&gt;this post&lt;/a&gt; about models and bones and what absolute bone transforms are.) For static models that don't animate, the bones won't change. This means that rather than recalculating the bone transforms every frame, I can calculate them once and save the results. You can do this by adding this function to the SmarterContentManager:&lt;/p&gt;&lt;pre class="csharpcode"&gt;    &lt;span class="kwrd"&gt;public&lt;/span&gt; Model LoadModel(&lt;span class="kwrd"&gt;string&lt;/span&gt; assetName, &lt;span class="kwrd"&gt;out&lt;/span&gt; Matrix[] absoluteBoneTransforms)
    {
        Model model = Load&amp;lt;Model&amp;gt;(assetName);
        absoluteBoneTransforms = &lt;span class="kwrd"&gt;new&lt;/span&gt; Matrix[model.Bones.Count];
        model.CopyAbsoluteBoneTransformsTo(absoluteBoneTransforms);

        &lt;span class="kwrd"&gt;return&lt;/span&gt; model;
    }&lt;/pre&gt;
&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;

&lt;p&gt;Now, if&amp;nbsp;I change my game to use the SmarterContentManager, I can just load my models like this:&lt;/p&gt;&lt;pre class="csharpcode"&gt;Model model;
Matrix[] bones;&lt;/pre&gt;&lt;pre class="csharpcode"&gt;model = content.LoadModel(&lt;span class="str"&gt;"models\\asteroid1"&lt;/span&gt;, &lt;span class="kwrd"&gt;out&lt;/span&gt; bones);&lt;/pre&gt;
&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;

&lt;p&gt;and&amp;nbsp;draw them like this:&lt;/p&gt;&lt;pre class="csharpcode"&gt;    &lt;span class="kwrd"&gt;foreach&lt;/span&gt; (ModelMesh mesh &lt;span class="kwrd"&gt;in&lt;/span&gt; model.Meshes)
    {
        &lt;span class="kwrd"&gt;foreach&lt;/span&gt; (BasicEffect basic &lt;span class="kwrd"&gt;in&lt;/span&gt; mesh.Effects)
        {
            basic.Projection = projection;
            basic.View = view;
            basic.World = bones[mesh.ParentBone.Index] * world;
        }
        mesh.Draw();
    }&lt;/pre&gt;
&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;

&lt;p&gt;Shawn's probably going to hassle me for linking to his blog &lt;em&gt;three &lt;/em&gt;times in one post (What's the matter - don't you have any content of your own?) but oh well. Maybe someone will find this interesting.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=2383757" width="1" height="1"&gt;</description></item><item><title>SwampThingTom on Performance Analysis:</title><link>http://blogs.msdn.com/b/etayrien/archive/2007/04/19/swampthingtom-on-performance-analysis.aspx</link><pubDate>Thu, 19 Apr 2007 19:43:02 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2194029</guid><dc:creator>etayrien</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/etayrien/rsscomments.aspx?WeblogPostID=2194029</wfw:commentRss><comments>http://blogs.msdn.com/b/etayrien/archive/2007/04/19/swampthingtom-on-performance-analysis.aspx#comments</comments><description>&lt;p&gt;&lt;a href="http://swampthingtom.blogspot.com/2007/04/software-efficiency-and-optimization.html"&gt;Interesting read&lt;/a&gt; on SwampThingTom's blog today. I'd never heard of the NProf tool before, but the information it gives seems to be very similar to what you can get from much more expensive tools. Definitely worth reading.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=2194029" width="1" height="1"&gt;</description></item></channel></rss>