<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.technet.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>Torgo 3000</title><link>http://blogs.technet.com/b/torgo3000/</link><description /><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>A change of direction... sort of</title><link>http://blogs.technet.com/b/torgo3000/archive/2009/04/13/a-change-of-direction-sort-of.aspx</link><pubDate>Mon, 13 Apr 2009 23:41:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3225942</guid><dc:creator>torgo3000</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.technet.com/b/torgo3000/rsscomments.aspx?WeblogPostID=3225942</wfw:commentRss><comments>http://blogs.technet.com/b/torgo3000/archive/2009/04/13/a-change-of-direction-sort-of.aspx#comments</comments><description>&lt;P&gt;Well folks, I'm still employed at MS (or rather re-employed at MS after having been canned with the rest of the group).&amp;nbsp; And I'm working on an as-yet-unannounced project.&amp;nbsp; So as long as the muzzle is still on, I'll try to cover some FSX stuff and some general technical art stuff.&amp;nbsp; I don't know how often I'll be posting (it's not like it can be any less frequent than it has been in the past ; P ) but I will try to get some useful information out there about making art for FSX or making art for games in general.&amp;nbsp; I've been doing a lot of shader writing recently, which I am really excited about (expecially now that the years of legacy code and requirements for supporting backwards-compatibility restrictions have been lifted).&amp;nbsp; It's been very freeing to be able to write a shader that does something incredibly ridiculous like use 5 separate world space cube-map lookups (diffuse w/ alpha, normal, specular, reflection and refraction).&amp;nbsp; Whether a shader like that would actually ever be used in production is totally beside the point.&amp;nbsp; It's just nice to see something really cool in the viewport, because there's always a way to optimize and make something almost as cool for half the performance cost.&lt;/P&gt;
&lt;P&gt;I will say one thing.&amp;nbsp; Performance is about priority number one from day one on the new project.&amp;nbsp; I definitely learned my lessons from FSX.&amp;nbsp; Creating a flexible content-driven shader system when there is already mountains of legacy&amp;nbsp;content not necessarily authored specifically for that system, and no time to go back and touch every single asset is a &lt;STRONG&gt;BAD &lt;/STRONG&gt;idea.&amp;nbsp; If you're in games and you are carrying forward legacy content and you decide to change your shader or draw system,&amp;nbsp;make absolutely sure you can either touch manually or at least do some kind of scripting pass on every piece of content.&amp;nbsp; Better yet, design a schema-based extensible shader system right from the start that can handle creating new values with defaults.&lt;/P&gt;
&lt;P&gt;Maybe my next post will be a performance post-mortem on the Flight Simulator engine and content system.&amp;nbsp; If you've got topics you'd like to get info on, feel free to post in the comments, I'll try to cover them.&amp;nbsp; And when I can talk about what I'm working on now, I'll let you know.&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3225942" width="1" height="1"&gt;</description></item><item><title>A really great look at performance in FSX...</title><link>http://blogs.technet.com/b/torgo3000/archive/2008/11/18/a-really-great-look-at-performance-in-fsx.aspx</link><pubDate>Tue, 18 Nov 2008 23:35:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3155954</guid><dc:creator>torgo3000</dc:creator><slash:comments>6</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.technet.com/b/torgo3000/rsscomments.aspx?WeblogPostID=3155954</wfw:commentRss><comments>http://blogs.technet.com/b/torgo3000/archive/2008/11/18/a-really-great-look-at-performance-in-fsx.aspx#comments</comments><description>&lt;P&gt;Lotus has a really great &lt;A class="" href="http://lotus-films.blogspot.com/2008/08/nuts-and-bolts-of-multiplayer.html" target=_blank mce_href="http://lotus-films.blogspot.com/2008/08/nuts-and-bolts-of-multiplayer.html"&gt;post about aircraft performance in FSX&lt;/A&gt;.&amp;nbsp; I highly reccomend reading the whole post.&amp;nbsp; It's a bit technical, but does put into practical terms a lot of the ideas about how to create performant aircraft (especially for multiplayer).&amp;nbsp; Draw calls are not always the single performance killer and reducing draw calls is not a silver bullet for creating objects that perform well in the engine.&amp;nbsp; I talk a little about this in my "&lt;A class="" href="http://blogs.technet.com/torgo3000/archive/2007/06/14/performance-art-2-when-is-a-draw-call-not-a-draw-call.aspx" target=_blank mce_href="http://blogs.technet.com/torgo3000/archive/2007/06/14/performance-art-2-when-is-a-draw-call-not-a-draw-call.aspx"&gt;When is a draw call not a draw call&lt;/A&gt;" post.&amp;nbsp; Lotus does a really great job of showing practical numbers from existing addon aircraft.&lt;/P&gt;
&lt;P&gt;The reason for some of his findings has to do with what is being updated and sent to the GPU from the CPU.&amp;nbsp; If each of the draw calls in an aircraft is close to 65,000 vertices, then each draw call is sending almost an entirely full vertex buffer update to the card every frame.&amp;nbsp; While it is still only a single draw call, it is a huge amount of data being sent across the pipe.&amp;nbsp; So 35 draw calls with 1000 vertices each does not equal 35 draw calls with 60,000 vertices each.&amp;nbsp; And if you are using poor UV and smoothing techniques, then it is very easy to get a 25,000 polygon model close to that limit for each draw call.&lt;/P&gt;
&lt;P&gt;Another comparison I'd love to see is the animation hierarchy in the aircraft.&amp;nbsp; An aircraft can be skinned and have 15 draw calls, but have 10 parallel animation hierarchies that are each 20 levels deep.&amp;nbsp; The amount of data needing to be updated during each frame becomes gigantic (something on the order of 2100 matrix transforms per frame).&amp;nbsp; If that same aircraft were animated with a flat hierarchy (not always easy or even possible to do) it would have about 200 transform matrix updates each frame.&lt;/P&gt;
&lt;P&gt;All in all, it's a great post and a very informative read.&amp;nbsp; Excellent work, Lotus!&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3155954" width="1" height="1"&gt;</description></item><item><title>Jetway IK tutorial</title><link>http://blogs.technet.com/b/torgo3000/archive/2008/06/09/jetway-ik-tutorial.aspx</link><pubDate>Mon, 09 Jun 2008 20:48:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3068378</guid><dc:creator>torgo3000</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.technet.com/b/torgo3000/rsscomments.aspx?WeblogPostID=3068378</wfw:commentRss><comments>http://blogs.technet.com/b/torgo3000/archive/2008/06/09/jetway-ik-tutorial.aspx#comments</comments><description>&lt;P&gt;I captured a tutorial about creating a Jetway using our IK system and Gmax over a year ago.&amp;nbsp; Due to software weirdness and a general lack of time, I was unable to render the video out.&amp;nbsp; However, thanks to &lt;A class="" href="http://msmvps.com/blogs/thenakedmvp/Default.aspx" target=_blank mce_href="http://msmvps.com/blogs/thenakedmvp/Default.aspx"&gt;Nick Whittome&lt;/A&gt; (a genius at getting me to do stuff and a prodigy at helping me out when I can't get it done on my own), the video has been rendered and&amp;nbsp;is now posted at the &lt;A class="" href="http://www.fsdeveloper.com/" target=_blank mce_href="http://www.fsdeveloper.com/"&gt;FSDeveloper website&lt;/A&gt;.&amp;nbsp; You can grab the video directly from &lt;A class="" href="http://www.fsdeveloper.com/downloads/Tutorials/IKJetway.avi" target=_blank mce_href="http://www.fsdeveloper.com/downloads/Tutorials/IKJetway.avi"&gt;this link&lt;/A&gt;.&amp;nbsp; Extra special thanks to Nick and Arno for getting me to do this and providing a place for it to live.&amp;nbsp; It's a little improvised, so if you can sit through some "Ums" and "Uhs", there's decent content in there.&lt;/P&gt;
&lt;P&gt;I also see that Nick has posted &lt;A class="" href="http://www.fsdeveloper.com/forum/showthread.php?p=68015#post68015" target=_blank mce_href="http://www.fsdeveloper.com/forum/showthread.php?p=68015#post68015"&gt;requests for future videos&lt;/A&gt;.&amp;nbsp; So hopefully I can get through some others over the coming months / years.&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3068378" width="1" height="1"&gt;</description></item><item><title>New Acceleration Pack missions.</title><link>http://blogs.technet.com/b/torgo3000/archive/2008/05/29/new-acceleration-pack-missions.aspx</link><pubDate>Fri, 30 May 2008 01:54:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3063039</guid><dc:creator>torgo3000</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.technet.com/b/torgo3000/rsscomments.aspx?WeblogPostID=3063039</wfw:commentRss><comments>http://blogs.technet.com/b/torgo3000/archive/2008/05/29/new-acceleration-pack-missions.aspx#comments</comments><description>&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Calibri size=3&gt;We just released &lt;A class="" href="http://www.fsinsider.com/downloads/Pages/BonusAccelerationRacingMissions.aspx" target=_blank mce_href="http://www.fsinsider.com/downloads/Pages/BonusAccelerationRacingMissions.aspx"&gt;three new multiplayer racing missions&lt;/A&gt; for Acceleration on FSInsider.&amp;nbsp; I haven't tried them out yet, but I hear they're a lot of fun.&amp;nbsp; Plus, you can't beat the price!&lt;/FONT&gt;&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3063039" width="1" height="1"&gt;</description></item><item><title>SDK MaxScript tools.</title><link>http://blogs.technet.com/b/torgo3000/archive/2008/05/19/sdk-maxscript-tools.aspx</link><pubDate>Mon, 19 May 2008 21:49:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3057487</guid><dc:creator>torgo3000</dc:creator><slash:comments>5</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.technet.com/b/torgo3000/rsscomments.aspx?WeblogPostID=3057487</wfw:commentRss><comments>http://blogs.technet.com/b/torgo3000/archive/2008/05/19/sdk-maxscript-tools.aspx#comments</comments><description>&lt;P&gt;There has been some confusion about what tools will work with which version of 3ds Max and I hope to set the record straight today (for those who might be using our SDK and 3ds Max).&amp;nbsp; In general, the SDK tools that were released for 3ds Max for FSX and FSX Acceleration (FSX SP2 SDK) were created and tested on 3ds Max 9 32-bit on 32-bit XP.&amp;nbsp; Since then, most of us have switched over to 64-bit Vista and are running 32-bit 3ds Max 9 on that platform.&amp;nbsp; All of the above configurations are supported.&amp;nbsp; Unfortunately, at this time, no 64-bit versions of 3ds Max are supported.&amp;nbsp; Additionally, 3ds Max 2009 is not supported at all (neither 32-bit nor 64-bit).&amp;nbsp; 3ds Max 2008 32-bit (on XP and Vista) should be supported, but extensive testing has not been performed yet.&lt;/P&gt;
&lt;P&gt;Here are the supported setups:&lt;/P&gt;
&lt;P&gt;32-bit XP with 32-bit 3ds Max 9&lt;BR&gt;32-bit Vista with 32-bit 3ds Max 9&lt;BR&gt;64-bit Vista with 32-bit 3ds Max 9&lt;BR&gt;32-bit XP with 32-bit 3ds Max 2008 (Supported, but not fully tested)&lt;BR&gt;32-bit Vista with 32-bit 3ds Max 2008 (Supported, but not fully tested)&lt;BR&gt;64-bit Vista with 32-bit 3ds Max 2008 (Supported, but not fully tested)&lt;/P&gt;
&lt;P&gt;The next SDK we ship will support whatever&amp;nbsp;the most recent version&amp;nbsp;of 3ds Max is at that time (we will likely try to support a version or two back as well, but at this point no promises are being made).&amp;nbsp; Addtionally, we are still working on the alternative solution to Gmax.&lt;/P&gt;
&lt;P&gt;Having said all of that, I know that the MaxScript tools shipped with FSX SP2 were a little buggy.&amp;nbsp; My bad (though I will say that&amp;nbsp;the fact that I was&amp;nbsp;the sole designer, developer and tester on the MaxScript tool suite pretty much guaranteed a certain amount of failure ;) )&amp;nbsp; I am making a real effort this time around to make all of the tools work as well out of house as they do in house. We also have more resources dedicated to guaranteeing a better user experience for developers.&amp;nbsp; As far as MaxScript tools are concerned, my philosophy is if we can use it in house, then you should be able to use it equally well wherever you are.&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3057487" width="1" height="1"&gt;</description></item><item><title>Cool new things...</title><link>http://blogs.technet.com/b/torgo3000/archive/2008/03/19/cool-new-things.aspx</link><pubDate>Wed, 19 Mar 2008 21:22:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3015379</guid><dc:creator>torgo3000</dc:creator><slash:comments>11</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.technet.com/b/torgo3000/rsscomments.aspx?WeblogPostID=3015379</wfw:commentRss><comments>http://blogs.technet.com/b/torgo3000/archive/2008/03/19/cool-new-things.aspx#comments</comments><description>&lt;P&gt;I must say, I am really excited about where we are heading as a team in terms of tools and content creation pipeline.&amp;nbsp; I think we've finally gotten on track.&amp;nbsp; And by "on track", I mean we're actually on the rails.&amp;nbsp; We may still be sitting in the station, but at least we aren't wandering around in the weeds trying to figure out where the track actually is.&lt;/P&gt;
&lt;P&gt;I can't promise or disclose too much, but I will say that there are some really cool things happening in the studio right now that&amp;nbsp;we hope to make available to 3rd party developers as well as SDK users.&amp;nbsp; In terms of Digital Content Creation tools, I am making a serious effort to try to expose all of our in house tools to 3rd party content creators.&amp;nbsp; Ideally, you should be able to use a tool out of house exactly how we use it in house.&amp;nbsp; We haven't made that effort much previously, but we are definitely focused on it now.&amp;nbsp; ESP really helps to be a driving factor in terms of tools and pipeline.&amp;nbsp; For 3rd party developers on our entertainment products, I think you're going to see some serious improvements in our SDK thanks in large part to the development of ESP.&lt;/P&gt;
&lt;P&gt;As for the "Gmax replacement issue", I can't say much about that right now.&amp;nbsp; It's definitely on our mind and something we are striving very hard to make happen.&amp;nbsp; I'll try to keep you updated as much as I can here.&amp;nbsp; Also, be sure to go to the &lt;A class="" href="http://www.fsinsider.com/developers/Pages/default.aspx" target=_blank mce_href="http://www.fsinsider.com/developers/Pages/default.aspx"&gt;FSinsider developer's corner&lt;/A&gt; as we are updating that more regularly.&amp;nbsp; Additionally, the &lt;A class="" href="http://fsdeveloper.com/" target=_blank mce_href="http://fsdeveloper.com/"&gt;FSDeveloper&lt;/A&gt; site is a great place to gather and share information.&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3015379" width="1" height="1"&gt;</description></item><item><title>Let's blow up the exporter real good!</title><link>http://blogs.technet.com/b/torgo3000/archive/2008/01/24/let-s-blow-up-the-exporter-real-good.aspx</link><pubDate>Fri, 25 Jan 2008 00:39:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:2777737</guid><dc:creator>torgo3000</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.technet.com/b/torgo3000/rsscomments.aspx?WeblogPostID=2777737</wfw:commentRss><comments>http://blogs.technet.com/b/torgo3000/archive/2008/01/24/let-s-blow-up-the-exporter-real-good.aspx#comments</comments><description>&lt;P&gt;I first came across our vertex limit issue when trying to debug the export of the trike model.&amp;nbsp; For some reason when we tried to export the Aircreation, it would continously throw up errors about exceeding the max vertex limit.&amp;nbsp; Huh?&amp;nbsp; We'd never run into this problem before.&amp;nbsp; Why were we suddenly seeing this?&lt;/P&gt;
&lt;P&gt;Well, in our quest to up the ante in terms of visual quality, we ended up creating a model that exceeded the 65,000 vertex limit for a single draw call.&amp;nbsp; "But it's only got 27,000 polygons and 15,000 vertices!" we thought to ourselves.&amp;nbsp; What we didn't realize at the time was that a) Non-perfect UV mapping and smoothing can convert single vertices in 3ds Max or Gmax into many vertices on the graphics card and b) in the quest to reduce draw calls, we had actually run into &lt;STRONG&gt;one big draw call.&lt;/STRONG&gt;&amp;nbsp; Too big, in fact.&lt;/P&gt;
&lt;P&gt;So lets look at issue &lt;STRONG&gt;a).&lt;/STRONG&gt;&amp;nbsp; At first blush, the polygon and vertex count should not be an issue at all.&amp;nbsp; One of our vertex buffers can hold roughly 65,000 vertices.&amp;nbsp; The trike should easily fit into one of those.&amp;nbsp; However, as we started to look at the UV mapping and smoothing, we realized that we were indeed exceeding the limit after processing.&amp;nbsp; Everywhere there is a seam in the UV map, those vertices get doubled on the graphics card.&amp;nbsp; If it is the corner of a seam, they get tripled or more.&amp;nbsp; The way this particular model was UVed, it had very unique seams around most of the geometry.&amp;nbsp; This resulted in&amp;nbsp;a whole&amp;nbsp;bunch&amp;nbsp;of the vertices being doubled or tripled.&amp;nbsp; So now our vertex count was around 30,000.&amp;nbsp; Additionally, every vertex that is on the edge of two smoothing groups also has to get doubled, tripled if it is one the edge of 3 smoothing groups.&amp;nbsp; And not all of the UV seams lined up with smoothing seams.&amp;nbsp; Suddenly our vertex counts were upwards of 40,000 to 50,000.&amp;nbsp; Oh, and we also had a bug where objects with normal maps were passing double the vertex counts.&amp;nbsp; Oops, now we had exceeded the 65,000 vertex buffer.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Which brings us to issue &lt;STRONG&gt;b).&amp;nbsp; &lt;/STRONG&gt;In our quest to reduce draw calls we had created a single texture sheet for the Aircreation.&amp;nbsp; So now the entire model was being fitted into a single vertex buffer, which it couldn't fit into.&lt;/P&gt;
&lt;P&gt;So how did we solve the problem?&amp;nbsp; Well, once we animated some parts, that broke up the draw calls.&amp;nbsp; Also, once we applied some different materials with different parameters, that also broke up the draw calls.&amp;nbsp; So if you're trying to export a model with 100,000 polygons and you are running into the vertex limit, first of all, shame on you.&amp;nbsp; ; )&amp;nbsp; But I know, it's fun to push the limits, so after getting over the initial shame, if you want to load huge models into Flightsim, you'll have to make sure that they are broken up into consumable chunks.&amp;nbsp;&amp;nbsp;So even if you want the same texture and material, you may have to create a second material and change specular power to be 56 instead of 55 (or something minimal like that) and apply it to half of your gigantic model.&amp;nbsp; Then it will export as two draw calls and fill two vertex buffers.&lt;/P&gt;
&lt;P&gt;So now you ask "Why didn't you automatically break up huge objects along vertex buffer seams so we don't have to do this hack?"&amp;nbsp; Well, unfortunately it was one of those things we just didn't get to.&amp;nbsp; And I'm sure you'd rather have a new sim engine or graphics feature than an exporter feature that has a simple work-around, right?&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=2777737" width="1" height="1"&gt;</description></item><item><title>Hmmm... er, what?</title><link>http://blogs.technet.com/b/torgo3000/archive/2008/01/24/hmmm-er-what.aspx</link><pubDate>Fri, 25 Jan 2008 00:32:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:2777382</guid><dc:creator>torgo3000</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.technet.com/b/torgo3000/rsscomments.aspx?WeblogPostID=2777382</wfw:commentRss><comments>http://blogs.technet.com/b/torgo3000/archive/2008/01/24/hmmm-er-what.aspx#comments</comments><description>&lt;P&gt;There seems to be a consensus amongst people I know (based on highly scientific poll results of course) that 2007 was one of the most strange, stressful and just plain&amp;nbsp;bizarre years on record.&amp;nbsp; Maybe it's just that all my friends are hitting their mid-thirties and freaking out, I don't know.&amp;nbsp; At any rate, after a much needed hibernation on top of a not-so-much needed year of chaos, disorder and growth, I think I've finally got the cobwebs out of my brain and am ready to start blogging and being active again.&amp;nbsp; So consider this the first shot across the bow (and no, it probably won't be a machine gun shot, more like a muzzle-loader, but at least it's a shot).&amp;nbsp; I'll follow this up with a post about our exporter and how you can blow it up real good.&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=2777382" width="1" height="1"&gt;</description></item><item><title>Performance Art 4:  Always use a texture and bones ain't free.</title><link>http://blogs.technet.com/b/torgo3000/archive/2007/09/17/performance-art-4-always-use-a-texture-and-bones-ain-t-free.aspx</link><pubDate>Mon, 17 Sep 2007 21:15:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:1977164</guid><dc:creator>torgo3000</dc:creator><slash:comments>4</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.technet.com/b/torgo3000/rsscomments.aspx?WeblogPostID=1977164</wfw:commentRss><comments>http://blogs.technet.com/b/torgo3000/archive/2007/09/17/performance-art-4-always-use-a-texture-and-bones-ain-t-free.aspx#comments</comments><description>&lt;P&gt;For this issue of the ever-continuing "Performance Art" series, I'll talk a little about flat-shaded or colored polygons and the use (or overuse) of bones in a model.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Always use a texture:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;In the past, when the memory on graphics cards was very small,&amp;nbsp;we tried to save texture space by flat-shading or assigning a single color to groups of polygons.&amp;nbsp; This provided color information to parts of a model that didn't need the detail of a texture and saved memory in the process.&amp;nbsp; However, with the advent of pixel shaders and graphics cards with a gig of memory on them, this is actually a performance killer now.&amp;nbsp; The reason for this is simple, every unique color is a new constant switch.&amp;nbsp; And every constant switch is a new draw call.&amp;nbsp; So those 100 flat shaded objects in our models that we thought would save texture space are now actually causing 100 new draw calls.&amp;nbsp; Sure, they're cheap draw calls, but they are draw calls none the less.&amp;nbsp; So how do we fix this problem?&amp;nbsp; Simple.&amp;nbsp; Save a small space in the texture sheet to have 4x4 blocks of solid color.&amp;nbsp; Anything that needs to reference that color, simply take all the UVs for those parts and shrink them way down to fit in the center of that 4x4 block (with room on the edges to compensate for mips).&amp;nbsp; Voila, it's still a single draw call and you get the benefit of saving texture space since you're only using the equivalent of a 64x64 texture sheet for a full 256 colors.&amp;nbsp; That can easily&amp;nbsp;be fit&amp;nbsp;in the gaps of a standard 1024x1024 texture sheet.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Bones Ain't Free (especially not ones in a big 'ol hierarchy)&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Bones are a wonderful thing.&amp;nbsp; They allow us to do animation on the vertex level without having to store transforms for each vertex in a mesh (anyone want to try storing matrix transforms for 1000 vertices?&amp;nbsp; Okay, I know, you can do it in a texture, but that's out of scope for this discussion and still not free!)&amp;nbsp; They also allow us to combine disparate animated&amp;nbsp;parts in a model into a single draw call.&amp;nbsp; However, there is a cost to having bones in a model.&amp;nbsp; The hierarchy must be traversed recursively for each update for each frame.&amp;nbsp; If you have a single node or possibly two&amp;nbsp;in the hierarchy (like is the case for most of our autoskinning), then this is relatively cheap. Update parent node, update child node with parent's transforms, update child node with child's transforms, draw.&amp;nbsp; 3 transforms and a draw.&amp;nbsp; Well adding a single node to the chain drastically increases the complexity of the updates: Update parent node, update child1 node with parent's transforms, update child2 node with parent's transforms, update child1 with child1's transforms, update child2 with child1's transforms, update child2 with child2's transforms, draw.&amp;nbsp; It's a geometric progression that goes from 3 updates for 2 bones&amp;nbsp;to 6 for 3 to 12 for 4&amp;nbsp;to 24 for 5.&amp;nbsp; And that's every frame.&amp;nbsp; I've seen some third party add-ons that have literally hundreds of bones, many with hierarchies 3 to 6 bones deep (and sometimes more).&amp;nbsp; That's great for saving draw calls, but not so great for performance overall.&amp;nbsp; That would be the equivalent of making an aircraft that has every single Half-Life 2 character you might see onscreen at once as the wings.&amp;nbsp; And that's only one instance of that aircraft.&amp;nbsp; Imagine multi-player...&lt;/P&gt;
&lt;P&gt;Hopefully this helps.&amp;nbsp; Keep your hierarchies simple and make sure to always have a texture.&amp;nbsp; We let out a lot of rope with this version of Flight Simulator.&amp;nbsp; As you watch us swinging from it, please listen to what we've got to say, that way only one of us has to hang.&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=1977164" width="1" height="1"&gt;</description></item><item><title>First preview of Acceleration</title><link>http://blogs.technet.com/b/torgo3000/archive/2007/07/12/first-preview-of-acceleration.aspx</link><pubDate>Thu, 12 Jul 2007 20:33:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:1509153</guid><dc:creator>torgo3000</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.technet.com/b/torgo3000/rsscomments.aspx?WeblogPostID=1509153</wfw:commentRss><comments>http://blogs.technet.com/b/torgo3000/archive/2007/07/12/first-preview-of-acceleration.aspx#comments</comments><description>&lt;P&gt;Gamespot put up our E3 preview video for the Acceleration expansion pack for FSX.&amp;nbsp; You can &lt;A class="" href="http://www.gamespot.com/video/938537/6174085/flight-simulator-x-acceleration-official-trailer-1" target=_blank mce_href="http://www.gamespot.com/video/938537/6174085/flight-simulator-x-acceleration-official-trailer-1"&gt;watch it&lt;/A&gt; or &lt;A class="" href="http://www.gamespot.com/pc/sim/flightsimulatorxadrenaline/download_ini.html?sid=6174085&amp;amp;id=6174085" target=_blank mce_href="http://www.gamespot.com/pc/sim/flightsimulatorxadrenaline/download_ini.html?sid=6174085&amp;amp;id=6174085"&gt;download it.&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Enjoy!&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=1509153" width="1" height="1"&gt;</description></item></channel></rss>