<?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/"
		>
<channel>
	<title>Comments on: Enhanced Crowd Rendering</title>
	<atom:link href="http://deadshift.com/blog/enhanced-crowd-rendering/feed" rel="self" type="application/rss+xml" />
	<link>http://deadshift.com/blog/enhanced-crowd-rendering</link>
	<description>Making something killer &#62;:]</description>
	<lastBuildDate>Wed, 01 Sep 2010 20:03:23 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Cody</title>
		<link>http://deadshift.com/blog/enhanced-crowd-rendering/comment-page-5#comment-262</link>
		<dc:creator>Cody</dc:creator>
		<pubDate>Tue, 08 Jun 2010 07:08:43 +0000</pubDate>
		<guid isPermaLink="false">http://deadshift.com/?p=199#comment-262</guid>
		<description>the MS points to US currency is simple
80 Points = $1</description>
		<content:encoded><![CDATA[<p>the MS points to US currency is simple<br />
80 Points = $1</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: PolyVector</title>
		<link>http://deadshift.com/blog/enhanced-crowd-rendering/comment-page-5#comment-250</link>
		<dc:creator>PolyVector</dc:creator>
		<pubDate>Sat, 29 May 2010 05:43:23 +0000</pubDate>
		<guid isPermaLink="false">http://deadshift.com/?p=199#comment-250</guid>
		<description>Correction: The DualQuat gets converted to a Matrix once for each recursion through to the Parent... The DualQuats are used to tween/blend animations, then the final matrix is used to adjust for the parent... Since there&#039;s so much math, I decided to have a hand at optimizing the conversion function and managed to eliminate 23 multiplications on top of my old optimizations that cut out 11!... So the function now uses 34 less multiplication instructions than the example I based it on.  Here&#039;s the crazy-optimized code, maybe someone has a clever way of optimizing it further? ;)

float4x4 DualQuatToMatrix(float2x4 dQ)
{	
	float4 Qn = dQ[0];
	float4 Qd = dQ[1];
	Matrix M = 0;
    
	//Qn Squared...
	float4 Qn2 = Qn * Qn;
	M[0][0] = Qn2.w + Qn2.x - Qn2.y - Qn2.z;
	M[1][1] = Qn2.w + Qn2.y - Qn2.x - Qn2.z;
	M[2][2] = Qn2.w + Qn2.z - Qn2.x - Qn2.y;
	
	//x*y, y*z, z*w, w*x...
	float4 Qn2_1 = Qn * Qn.yzwx;
	M[0][1] = Qn2_1.x + Qn2_1.z;
	M[1][0] = Qn2_1.x - Qn2_1.z;
	M[1][2] = Qn2_1.y + Qn2_1.w;
	M[2][1] = Qn2_1.y - Qn2_1.w;
	
	//x*z, y*w, z*x, w*y...
	float4 Qn2_2 = Qn * Qn.zwxy;
	M[0][2] = Qn2_2.x - Qn2_2.y;
	M[2][0] = Qn2_2.x + Qn2_2.y;

	float4 Qdx_X_Qn = Qn * Qd.x;
	float4 Qdy_X_Qn = Qn * Qd.y;
	float4 Qdz_X_Qn = Qn * Qd.z;
	float4 Qdw_X_Qn = Qn * Qd.w;
	M[3][0] = Qdx_X_Qn.w - Qdy_X_Qn.z + Qdz_X_Qn.y - Qdw_X_Qn.x;
	M[3][1] = Qdx_X_Qn.z - Qdz_X_Qn.x + Qdy_X_Qn.w - Qdw_X_Qn.y;
	M[3][2] = Qdy_X_Qn.x + Qdz_X_Qn.w - Qdx_X_Qn.y - Qdw_X_Qn.z;

	//Batch all the various 2x&#039;s here to save instructions ;)
	M[0] *= float4(1, 2, 2, 1);
	M[1] *= float4(2, 1, 2, 1);
	M[2] *= float4(2, 2, 1, 1);
	M[3] *= float4(2, 2, 2, 1);

	float len2 = dot(Qn, Qn);
	M[3][3] = len2;
	M /= len2;

	return M;	
}</description>
		<content:encoded><![CDATA[<p>Correction: The DualQuat gets converted to a Matrix once for each recursion through to the Parent&#8230; The DualQuats are used to tween/blend animations, then the final matrix is used to adjust for the parent&#8230; Since there&#8217;s so much math, I decided to have a hand at optimizing the conversion function and managed to eliminate 23 multiplications on top of my old optimizations that cut out 11!&#8230; So the function now uses 34 less multiplication instructions than the example I based it on.  Here&#8217;s the crazy-optimized code, maybe someone has a clever way of optimizing it further? <img src='http://deadshift.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>float4x4 DualQuatToMatrix(float2x4 dQ)<br />
{<br />
	float4 Qn = dQ[0];<br />
	float4 Qd = dQ[1];<br />
	Matrix M = 0;</p>
<p>	//Qn Squared&#8230;<br />
	float4 Qn2 = Qn * Qn;<br />
	M[0][0] = Qn2.w + Qn2.x &#8211; Qn2.y &#8211; Qn2.z;<br />
	M[1][1] = Qn2.w + Qn2.y &#8211; Qn2.x &#8211; Qn2.z;<br />
	M[2][2] = Qn2.w + Qn2.z &#8211; Qn2.x &#8211; Qn2.y;</p>
<p>	//x*y, y*z, z*w, w*x&#8230;<br />
	float4 Qn2_1 = Qn * Qn.yzwx;<br />
	M[0][1] = Qn2_1.x + Qn2_1.z;<br />
	M[1][0] = Qn2_1.x &#8211; Qn2_1.z;<br />
	M[1][2] = Qn2_1.y + Qn2_1.w;<br />
	M[2][1] = Qn2_1.y &#8211; Qn2_1.w;</p>
<p>	//x*z, y*w, z*x, w*y&#8230;<br />
	float4 Qn2_2 = Qn * Qn.zwxy;<br />
	M[0][2] = Qn2_2.x &#8211; Qn2_2.y;<br />
	M[2][0] = Qn2_2.x + Qn2_2.y;</p>
<p>	float4 Qdx_X_Qn = Qn * Qd.x;<br />
	float4 Qdy_X_Qn = Qn * Qd.y;<br />
	float4 Qdz_X_Qn = Qn * Qd.z;<br />
	float4 Qdw_X_Qn = Qn * Qd.w;<br />
	M[3][0] = Qdx_X_Qn.w &#8211; Qdy_X_Qn.z + Qdz_X_Qn.y &#8211; Qdw_X_Qn.x;<br />
	M[3][1] = Qdx_X_Qn.z &#8211; Qdz_X_Qn.x + Qdy_X_Qn.w &#8211; Qdw_X_Qn.y;<br />
	M[3][2] = Qdy_X_Qn.x + Qdz_X_Qn.w &#8211; Qdx_X_Qn.y &#8211; Qdw_X_Qn.z;</p>
<p>	//Batch all the various 2x&#8217;s here to save instructions <img src='http://deadshift.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
	M[0] *= float4(1, 2, 2, 1);<br />
	M[1] *= float4(2, 1, 2, 1);<br />
	M[2] *= float4(2, 2, 1, 1);<br />
	M[3] *= float4(2, 2, 2, 1);</p>
<p>	float len2 = dot(Qn, Qn);<br />
	M[3][3] = len2;<br />
	M /= len2;</p>
<p>	return M;<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: PolyVector</title>
		<link>http://deadshift.com/blog/enhanced-crowd-rendering/comment-page-5#comment-249</link>
		<dc:creator>PolyVector</dc:creator>
		<pubDate>Sat, 29 May 2010 01:58:15 +0000</pubDate>
		<guid isPermaLink="false">http://deadshift.com/?p=199#comment-249</guid>
		<description>@T
Thank you. :)
You actually have me second guessing the Dual Quaternion thing... I believe I was using them because they&#039;re easy to lerp, but I switched to them from matrices quite a while back when I was much newer to 3d programming (not that I&#039;m an expert now)... So perhaps their use is unfounded... They are quite expensive to convert back into a matrix, but that only happens once per processed bone..., hrmmmmm..... Now I&#039;m going to have to rethink them. ;)

It sounds like you understand what I&#039;m doing, except I&#039;m traversing the tree in the reverse order CurrentBone-&gt;Parent-&gt;Parent-&gt;Parent until I hit root, this makes it much simpler.

I&#039;m using a shader constant array and a modified &quot;Fullscreen Quad&quot; that&#039;s now more of a &quot;Partial-screen Quad&quot;  The instance is determined by Texel.Y, and the bone by the Texel.X.</description>
		<content:encoded><![CDATA[<p>@T<br />
Thank you. <img src='http://deadshift.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
You actually have me second guessing the Dual Quaternion thing&#8230; I believe I was using them because they&#8217;re easy to lerp, but I switched to them from matrices quite a while back when I was much newer to 3d programming (not that I&#8217;m an expert now)&#8230; So perhaps their use is unfounded&#8230; They are quite expensive to convert back into a matrix, but that only happens once per processed bone&#8230;, hrmmmmm&#8230;.. Now I&#8217;m going to have to rethink them. <img src='http://deadshift.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>It sounds like you understand what I&#8217;m doing, except I&#8217;m traversing the tree in the reverse order CurrentBone->Parent->Parent->Parent until I hit root, this makes it much simpler.</p>
<p>I&#8217;m using a shader constant array and a modified &#8220;Fullscreen Quad&#8221; that&#8217;s now more of a &#8220;Partial-screen Quad&#8221;  The instance is determined by Texel.Y, and the bone by the Texel.X.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: T</title>
		<link>http://deadshift.com/blog/enhanced-crowd-rendering/comment-page-4#comment-248</link>
		<dc:creator>T</dc:creator>
		<pubDate>Fri, 28 May 2010 23:02:41 +0000</pubDate>
		<guid isPermaLink="false">http://deadshift.com/?p=199#comment-248</guid>
		<description>Firstly, you&#039;re awesome (and inspiring). Secondly, dual quaternions?! Really?! That&#039;s hardcore.  Why didn&#039;t you go with quaternion(rotation)/vector(translation) out of curiosity?  Is it slower or less accurate?  It&#039;s certainly less confounding.  This is a really clever technique to leverage the strength of the Xbox&#039;s GPU and I&#039;d like to say thanks for sharing.  I think I understand it except for the Animation Processor Shader (most important part).  My understanding: In its most basic form you read the relative bone position for current bone for the current frame and read that bone&#039;s parent index so you can read the parent bones relative position.  You multiply this bone matrix and its parent bone&#039;s matrix to get it&#039;s absolute transform. 
How do you ensure that the tree is traversed appropriately (ie root, child of root, child of child of root)?
Then you read the bone&#039;s inverse bind pose matrix and multiply it by it&#039;s absolute transform.  Then spit out this matrix to three rendertargets.  
How are you calculating over 200 animations in one draw call.  Is the current frame index for each instance being written to a dynamic vertex buffer or shader contant array?  I&#039;m soo confused. Help me (so I can ask you more questions). ;)

PS I love you.</description>
		<content:encoded><![CDATA[<p>Firstly, you&#8217;re awesome (and inspiring). Secondly, dual quaternions?! Really?! That&#8217;s hardcore.  Why didn&#8217;t you go with quaternion(rotation)/vector(translation) out of curiosity?  Is it slower or less accurate?  It&#8217;s certainly less confounding.  This is a really clever technique to leverage the strength of the Xbox&#8217;s GPU and I&#8217;d like to say thanks for sharing.  I think I understand it except for the Animation Processor Shader (most important part).  My understanding: In its most basic form you read the relative bone position for current bone for the current frame and read that bone&#8217;s parent index so you can read the parent bones relative position.  You multiply this bone matrix and its parent bone&#8217;s matrix to get it&#8217;s absolute transform.<br />
How do you ensure that the tree is traversed appropriately (ie root, child of root, child of child of root)?<br />
Then you read the bone&#8217;s inverse bind pose matrix and multiply it by it&#8217;s absolute transform.  Then spit out this matrix to three rendertargets.<br />
How are you calculating over 200 animations in one draw call.  Is the current frame index for each instance being written to a dynamic vertex buffer or shader contant array?  I&#8217;m soo confused. Help me (so I can ask you more questions). <img src='http://deadshift.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>PS I love you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David</title>
		<link>http://deadshift.com/blog/enhanced-crowd-rendering/comment-page-4#comment-247</link>
		<dc:creator>David</dc:creator>
		<pubDate>Thu, 27 May 2010 14:03:10 +0000</pubDate>
		<guid isPermaLink="false">http://deadshift.com/?p=199#comment-247</guid>
		<description>I&#039;ll have a look at that, looks promising Thank you ;)</description>
		<content:encoded><![CDATA[<p>I&#8217;ll have a look at that, looks promising Thank you <img src='http://deadshift.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: PolyVector</title>
		<link>http://deadshift.com/blog/enhanced-crowd-rendering/comment-page-4#comment-242</link>
		<dc:creator>PolyVector</dc:creator>
		<pubDate>Tue, 25 May 2010 23:44:04 +0000</pubDate>
		<guid isPermaLink="false">http://deadshift.com/?p=199#comment-242</guid>
		<description>@David
My version is mixed up in a ShapeBuilder class, but I actually learned from this sample: (if I remember correctly)

http://creators.xna.com/en-US/sample/meshinstancing</description>
		<content:encoded><![CDATA[<p>@David<br />
My version is mixed up in a ShapeBuilder class, but I actually learned from this sample: (if I remember correctly)</p>
<p><a href="http://creators.xna.com/en-US/sample/meshinstancing" rel="nofollow">http://creators.xna.com/en-US/sample/meshinstancing</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David</title>
		<link>http://deadshift.com/blog/enhanced-crowd-rendering/comment-page-4#comment-241</link>
		<dc:creator>David</dc:creator>
		<pubDate>Tue, 25 May 2010 20:24:32 +0000</pubDate>
		<guid isPermaLink="false">http://deadshift.com/?p=199#comment-241</guid>
		<description>Really cool, I&#039;m trying to implement the same kind of thing based on the Gems 3, however implementing shader instancing is a pain. The InstanceSkinnedModelMesh.cs is killing me, would you mind posting  the ReplicateVertexData method :)?</description>
		<content:encoded><![CDATA[<p>Really cool, I&#8217;m trying to implement the same kind of thing based on the Gems 3, however implementing shader instancing is a pain. The InstanceSkinnedModelMesh.cs is killing me, would you mind posting  the ReplicateVertexData method <img src='http://deadshift.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: PolyVector</title>
		<link>http://deadshift.com/blog/enhanced-crowd-rendering/comment-page-4#comment-121</link>
		<dc:creator>PolyVector</dc:creator>
		<pubDate>Fri, 26 Mar 2010 19:37:57 +0000</pubDate>
		<guid isPermaLink="false">http://deadshift.com/?p=199#comment-121</guid>
		<description>@Ben
It&#039;s worth considering, there&#039;s also this site and the playtest area of CCO. ;)</description>
		<content:encoded><![CDATA[<p>@Ben<br />
It&#8217;s worth considering, there&#8217;s also this site and the playtest area of CCO. <img src='http://deadshift.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben</title>
		<link>http://deadshift.com/blog/enhanced-crowd-rendering/comment-page-4#comment-120</link>
		<dc:creator>Ben</dc:creator>
		<pubDate>Fri, 26 Mar 2010 17:19:01 +0000</pubDate>
		<guid isPermaLink="false">http://deadshift.com/?p=199#comment-120</guid>
		<description>Sounds good, I&#039;m all for taking the time to release quality. Please do consider uploading test builds to,
http://www.xblig.co.uk/forums/index.php

I think your game could be the one that draws more people to the press A forums. With a playable demo, I think you could even ask for donations. Bypassing the marketplace if you wish. I don&#039;t know if you&#039;re down for that sort of thing but it is a possibility.</description>
		<content:encoded><![CDATA[<p>Sounds good, I&#8217;m all for taking the time to release quality. Please do consider uploading test builds to,<br />
<a href="http://www.xblig.co.uk/forums/index.php" rel="nofollow">http://www.xblig.co.uk/forums/index.php</a></p>
<p>I think your game could be the one that draws more people to the press A forums. With a playable demo, I think you could even ask for donations. Bypassing the marketplace if you wish. I don&#8217;t know if you&#8217;re down for that sort of thing but it is a possibility.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: PolyVector</title>
		<link>http://deadshift.com/blog/enhanced-crowd-rendering/comment-page-4#comment-119</link>
		<dc:creator>PolyVector</dc:creator>
		<pubDate>Fri, 26 Mar 2010 04:55:34 +0000</pubDate>
		<guid isPermaLink="false">http://deadshift.com/?p=199#comment-119</guid>
		<description>@Ben
Oh, you meant actually create a mini game to fund the larger game&#039;s dev.  That could work, I do plan on releasing mini games eventually... We&#039;ll have to see how long it takes me to even get a fully playable demo of anything.  There&#039;s too many collision/physics/art/performance issues at the moment to just rush something out.  I want to release games I&#039;m proud of. :)</description>
		<content:encoded><![CDATA[<p>@Ben<br />
Oh, you meant actually create a mini game to fund the larger game&#8217;s dev.  That could work, I do plan on releasing mini games eventually&#8230; We&#8217;ll have to see how long it takes me to even get a fully playable demo of anything.  There&#8217;s too many collision/physics/art/performance issues at the moment to just rush something out.  I want to release games I&#8217;m proud of. <img src='http://deadshift.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>
