<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: XNA Framework GameEngine Development. (Part 19, Hardware Instancing PC Only)</title>
	<atom:link href="http://roecode.wordpress.com/2008/03/17/xna-framework-gameengine-development-part-19-hardware-instancing-pc-only/feed/" rel="self" type="application/rss+xml" />
	<link>http://roecode.wordpress.com/2008/03/17/xna-framework-gameengine-development-part-19-hardware-instancing-pc-only/</link>
	<description>The few things I know, I like to share.</description>
	<lastBuildDate>Wed, 04 Nov 2009 15:43:45 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: roecode</title>
		<link>http://roecode.wordpress.com/2008/03/17/xna-framework-gameengine-development-part-19-hardware-instancing-pc-only/#comment-679</link>
		<dc:creator>roecode</dc:creator>
		<pubDate>Fri, 06 Mar 2009 13:12:43 +0000</pubDate>
		<guid isPermaLink="false">http://roecode.wordpress.com/?p=55#comment-679</guid>
		<description>Sure sounds interesting, honestly instancing seems a bit hokey to me anyway.  Currently, I am busy working on getting my game beta out, I am going to revist large portions of the engine after that project is finished.</description>
		<content:encoded><![CDATA[<p>Sure sounds interesting, honestly instancing seems a bit hokey to me anyway.  Currently, I am busy working on getting my game beta out, I am going to revist large portions of the engine after that project is finished.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sTeeL</title>
		<link>http://roecode.wordpress.com/2008/03/17/xna-framework-gameengine-development-part-19-hardware-instancing-pc-only/#comment-678</link>
		<dc:creator>sTeeL</dc:creator>
		<pubDate>Fri, 06 Mar 2009 06:42:34 +0000</pubDate>
		<guid isPermaLink="false">http://roecode.wordpress.com/?p=55#comment-678</guid>
		<description>Im not 100% sure if this is it because I cant actually get my instanced models to draw :) but I think this works better albeit VERY UGLY :)


public static void AddInstance(String modelName, Matrix matrix)
        {
            if (modelName == null) return;


            if (instanceMatrices.ContainsKey(modelName))
            {
                List update;
                instanceMatrices.TryGetValue(modelName, out update);
                instanceMatrices.Remove(modelName);
                instanceMatrices.Add(modelName, update);
            }
            else
            {
                var test = new List();
                test.Add(matrix);
                instanceMatrices.Add(modelName, test);
            }
       }</description>
		<content:encoded><![CDATA[<p>Im not 100% sure if this is it because I cant actually get my instanced models to draw <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  but I think this works better albeit VERY UGLY <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>public static void AddInstance(String modelName, Matrix matrix)<br />
        {<br />
            if (modelName == null) return;</p>
<p>            if (instanceMatrices.ContainsKey(modelName))<br />
            {<br />
                List update;<br />
                instanceMatrices.TryGetValue(modelName, out update);<br />
                instanceMatrices.Remove(modelName);<br />
                instanceMatrices.Add(modelName, update);<br />
            }<br />
            else<br />
            {<br />
                var test = new List();<br />
                test.Add(matrix);<br />
                instanceMatrices.Add(modelName, test);<br />
            }<br />
       }</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: roecode</title>
		<link>http://roecode.wordpress.com/2008/03/17/xna-framework-gameengine-development-part-19-hardware-instancing-pc-only/#comment-667</link>
		<dc:creator>roecode</dc:creator>
		<pubDate>Wed, 18 Feb 2009 13:43:05 +0000</pubDate>
		<guid isPermaLink="false">http://roecode.wordpress.com/?p=55#comment-667</guid>
		<description>Armigus, I actually have redone quite a bit of this in the new engine.  Still debating how much of it I want to release just yet, but would very much like seeing your implementations if you succeed.</description>
		<content:encoded><![CDATA[<p>Armigus, I actually have redone quite a bit of this in the new engine.  Still debating how much of it I want to release just yet, but would very much like seeing your implementations if you succeed.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Armigus</title>
		<link>http://roecode.wordpress.com/2008/03/17/xna-framework-gameengine-development-part-19-hardware-instancing-pc-only/#comment-665</link>
		<dc:creator>Armigus</dc:creator>
		<pubDate>Tue, 17 Feb 2009 18:00:43 +0000</pubDate>
		<guid isPermaLink="false">http://roecode.wordpress.com/?p=55#comment-665</guid>
		<description>@J2T:
My version of AddInstance is this:
public static void AddInstance(String modelName, Matrix matrix)
        {
            if (modelName == null) return;
            List matrices = new List();
            matrices.Add(matrix);
            instanceMatrices.Add(modelName, matrices);
        }
Remember that you are dealing with Dictionary&lt;string, List&gt;, meaning that you can&#039;t just add a matrix.  Not that this is the right answer either, but it does compile.

@RoeCode:
You were expecting us to use the ShaderManager for instancedshader.fx and didn&#039;t warn us.  That had me going for a while.

For upcoming tutorials, especially for terrain, look up Reimer&#039;s 4th series.  What I really want is a Quadtree implementation with nicer skies.  I can raytrace landscapes and sky textures of nearly unlimited size and can map skies on a sphere using a Gimp filter.

I&#039;ve already implemented his tutorial, but the performance from the result is abysmal (2-3 fps).  Indeed I took it a step further and implemented slope maps using

float angle = Vector3.Dot(vertices[i].Normal, Vector3.Up);
vertices[i].Slope = MathHelper.Clamp((angle - 0.9f) * 5.0f, 0.0f, 1.0f);

while generating the terrain data.  Now that I have practice using the ShaderGenerator I want to throw a serious shader at it.  I will look around online and see what I find.</description>
		<content:encoded><![CDATA[<p>@J2T:<br />
My version of AddInstance is this:<br />
public static void AddInstance(String modelName, Matrix matrix)<br />
        {<br />
            if (modelName == null) return;<br />
            List matrices = new List();<br />
            matrices.Add(matrix);<br />
            instanceMatrices.Add(modelName, matrices);<br />
        }<br />
Remember that you are dealing with Dictionary&lt;string, List&gt;, meaning that you can&#8217;t just add a matrix.  Not that this is the right answer either, but it does compile.</p>
<p>@RoeCode:<br />
You were expecting us to use the ShaderManager for instancedshader.fx and didn&#8217;t warn us.  That had me going for a while.</p>
<p>For upcoming tutorials, especially for terrain, look up Reimer&#8217;s 4th series.  What I really want is a Quadtree implementation with nicer skies.  I can raytrace landscapes and sky textures of nearly unlimited size and can map skies on a sphere using a Gimp filter.</p>
<p>I&#8217;ve already implemented his tutorial, but the performance from the result is abysmal (2-3 fps).  Indeed I took it a step further and implemented slope maps using</p>
<p>float angle = Vector3.Dot(vertices[i].Normal, Vector3.Up);<br />
vertices[i].Slope = MathHelper.Clamp((angle &#8211; 0.9f) * 5.0f, 0.0f, 1.0f);</p>
<p>while generating the terrain data.  Now that I have practice using the ShaderGenerator I want to throw a serious shader at it.  I will look around online and see what I find.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: TianYu</title>
		<link>http://roecode.wordpress.com/2008/03/17/xna-framework-gameengine-development-part-19-hardware-instancing-pc-only/#comment-614</link>
		<dc:creator>TianYu</dc:creator>
		<pubDate>Thu, 11 Dec 2008 11:34:48 +0000</pubDate>
		<guid isPermaLink="false">http://roecode.wordpress.com/?p=55#comment-614</guid>
		<description>When will the call DrawInstances?</description>
		<content:encoded><![CDATA[<p>When will the call DrawInstances?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: snoche</title>
		<link>http://roecode.wordpress.com/2008/03/17/xna-framework-gameengine-development-part-19-hardware-instancing-pc-only/#comment-613</link>
		<dc:creator>snoche</dc:creator>
		<pubDate>Thu, 11 Dec 2008 06:31:55 +0000</pubDate>
		<guid isPermaLink="false">http://roecode.wordpress.com/?p=55#comment-613</guid>
		<description>Nice engine, is looking promising

where is the link to download the source code of the engine? I can not found it. Thanks</description>
		<content:encoded><![CDATA[<p>Nice engine, is looking promising</p>
<p>where is the link to download the source code of the engine? I can not found it. Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Galantir</title>
		<link>http://roecode.wordpress.com/2008/03/17/xna-framework-gameengine-development-part-19-hardware-instancing-pc-only/#comment-569</link>
		<dc:creator>Galantir</dc:creator>
		<pubDate>Sun, 21 Sep 2008 19:40:08 +0000</pubDate>
		<guid isPermaLink="false">http://roecode.wordpress.com/?p=55#comment-569</guid>
		<description>Hi i just wanted to know i just love these tutorials and i&#039;m hoping that you will continue soon with a new one.

I&#039;m also very interrested in more details on texturing things like terrain. I&#039;ve been using programs like terragen and such to generate heightmaps and colormaps and such for use with the YATT plugin for nwn2 editor.

Thanks for the great info so far.</description>
		<content:encoded><![CDATA[<p>Hi i just wanted to know i just love these tutorials and i&#8217;m hoping that you will continue soon with a new one.</p>
<p>I&#8217;m also very interrested in more details on texturing things like terrain. I&#8217;ve been using programs like terragen and such to generate heightmaps and colormaps and such for use with the YATT plugin for nwn2 editor.</p>
<p>Thanks for the great info so far.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: roecode</title>
		<link>http://roecode.wordpress.com/2008/03/17/xna-framework-gameengine-development-part-19-hardware-instancing-pc-only/#comment-548</link>
		<dc:creator>roecode</dc:creator>
		<pubDate>Thu, 14 Aug 2008 13:34:29 +0000</pubDate>
		<guid isPermaLink="false">http://roecode.wordpress.com/?p=55#comment-548</guid>
		<description>Yes, I am planning on putting together additional tutorials in this series.  Just taking a break right now.</description>
		<content:encoded><![CDATA[<p>Yes, I am planning on putting together additional tutorials in this series.  Just taking a break right now.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Dixon</title>
		<link>http://roecode.wordpress.com/2008/03/17/xna-framework-gameengine-development-part-19-hardware-instancing-pc-only/#comment-547</link>
		<dc:creator>Jonathan Dixon</dc:creator>
		<pubDate>Thu, 14 Aug 2008 07:57:31 +0000</pubDate>
		<guid isPermaLink="false">http://roecode.wordpress.com/?p=55#comment-547</guid>
		<description>Hi, 

Brilliant tutorial, really interesting and very helpful, is there any chance you could do a mini tutorial on how to use the engine to its fully capacity for rendering, texturising, heightmaps and bump mapping for example. Just the basics for getting a nicely drawn world example.

Thanks for all your hard work and for sharing it</description>
		<content:encoded><![CDATA[<p>Hi, </p>
<p>Brilliant tutorial, really interesting and very helpful, is there any chance you could do a mini tutorial on how to use the engine to its fully capacity for rendering, texturising, heightmaps and bump mapping for example. Just the basics for getting a nicely drawn world example.</p>
<p>Thanks for all your hard work and for sharing it</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: J2t</title>
		<link>http://roecode.wordpress.com/2008/03/17/xna-framework-gameengine-development-part-19-hardware-instancing-pc-only/#comment-537</link>
		<dc:creator>J2t</dc:creator>
		<pubDate>Tue, 05 Aug 2008 23:36:39 +0000</pubDate>
		<guid isPermaLink="false">http://roecode.wordpress.com/?p=55#comment-537</guid>
		<description>Is there a sprecial reason why you don&#039;t release the source for this part?When not so would you please do so?!
ty</description>
		<content:encoded><![CDATA[<p>Is there a sprecial reason why you don&#8217;t release the source for this part?When not so would you please do so?!<br />
ty</p>
]]></content:encoded>
	</item>
</channel>
</rss>
