<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://msmvps.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>Smart Terrain Rendering with Xna using Billod algorithm</title><link>http://msmvps.com/blogs/valentin/archive/2008/09/30/smart-terrain-rendering-with-xna.aspx</link><description>Version Fran&amp;ccedil;aise ici . If you&amp;#39;re a game developer you&amp;#39;ve already worked on terrain rendering. It is, in my opinion the critical point of a game. Not because conceptually speaking it is the most important visible thing on the screen but</description><dc:language>en</dc:language><generator>CommunityServer 2008.5 SP2 (Build: 40407.4157)</generator><item><title>re: Smart Terrain Rendering with Xna using Billod algorithm</title><link>http://msmvps.com/blogs/valentin/archive/2008/09/30/smart-terrain-rendering-with-xna.aspx#1737870</link><pubDate>Thu, 05 Nov 2009 20:14:41 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1737870</guid><dc:creator>valentin</dc:creator><description>&lt;p&gt;thx you for your great help :)&lt;/p&gt;
&lt;p&gt;i will correct this bug so :)&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1737870" width="1" height="1"&gt;</description></item><item><title>re: Smart Terrain Rendering with Xna using Billod algorithm</title><link>http://msmvps.com/blogs/valentin/archive/2008/09/30/smart-terrain-rendering-with-xna.aspx#1737822</link><pubDate>Thu, 05 Nov 2009 16:45:09 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1737822</guid><dc:creator>raygeee</dc:creator><description>&lt;p&gt;hi,&lt;/p&gt;
&lt;p&gt;first of all thanks for sharing the code and the thorough explanation.&lt;/p&gt;
&lt;p&gt;While integrating it into my project I found an ugly little bug:&lt;/p&gt;
&lt;p&gt;Suppose your quadtree is located at (0,0,0) and the width of the heightmap is 256. Then the far out vertex defining the quadtree should be located at (255,y,255) - it&amp;#39;s not. It&amp;#39;s at (256,y,256) which results in having two bad shaped sides of the quadtree.&lt;/p&gt;
&lt;p&gt;To fix this I had to change 2 lines in QuadNode.cs:&lt;/p&gt;
&lt;p&gt;in Initialize() replace&lt;/p&gt;
&lt;p&gt;float size = GetNodeSize();&lt;/p&gt;
&lt;p&gt;with&lt;/p&gt;
&lt;p&gt;float size = GetNodeSize() - 1;&lt;/p&gt;
&lt;p&gt;and in AddChild(NodeChild position, NodeContent flag) replace&lt;/p&gt;
&lt;p&gt;float size = node.GetNodeSize();&lt;/p&gt;
&lt;p&gt;with&lt;/p&gt;
&lt;p&gt;float size = node.GetNodeSize() - 1;&lt;/p&gt;
&lt;p&gt;So far this worked for me although with 4 quadtrees I still have a little gap between the quadtrees because the vertex positions aren&amp;#39;t the same.&lt;/p&gt;
&lt;p&gt;Cheers, raygeee&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1737822" width="1" height="1"&gt;</description></item><item><title>Tutoriaux Xna Game Studio : sommaire général</title><link>http://msmvps.com/blogs/valentin/archive/2008/09/30/smart-terrain-rendering-with-xna.aspx#1695908</link><pubDate>Fri, 19 Jun 2009 14:36:53 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1695908</guid><dc:creator>Graphic Stream</dc:creator><description>&lt;p&gt;(Tutoriaux adapt&amp;eacute;s au Xna Game Studio 3.1) Premi&amp;egrave;re partie : Apprentissage XNA Tutorial&lt;/p&gt;
&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1695908" width="1" height="1"&gt;</description></item><item><title>re: Smart Terrain Rendering with Xna using Billod algorithm</title><link>http://msmvps.com/blogs/valentin/archive/2008/09/30/smart-terrain-rendering-with-xna.aspx#1691683</link><pubDate>Fri, 01 May 2009 09:01:55 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1691683</guid><dc:creator>valentin</dc:creator><description>&lt;p&gt;Bert &amp;gt; I used to think it was that problem. Great good job&lt;/p&gt;
&lt;p&gt;Send me pictures of your world :)&lt;/p&gt;
&lt;p&gt;Payday Loans -&amp;gt; Thank you&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1691683" width="1" height="1"&gt;</description></item><item><title>Interesting Information</title><link>http://msmvps.com/blogs/valentin/archive/2008/09/30/smart-terrain-rendering-with-xna.aspx#1691681</link><pubDate>Fri, 01 May 2009 07:47:51 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1691681</guid><dc:creator>Payday Loans Canada</dc:creator><description>&lt;p&gt;I found lots of interesting information on msmvps.com. The post was professionally written and I feel like the author has extensive knowledge in the subject. msmvps.com keep it that way.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1691681" width="1" height="1"&gt;</description></item><item><title>re: Smart Terrain Rendering with Xna using Billod algorithm</title><link>http://msmvps.com/blogs/valentin/archive/2008/09/30/smart-terrain-rendering-with-xna.aspx#1691682</link><pubDate>Mon, 27 Apr 2009 14:45:43 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1691682</guid><dc:creator>Bert</dc:creator><description>&lt;p&gt;I have solved the problem :). It appears I have made a mistake in my own code due which the tree&amp;#39;s where not correctly positioned.&lt;/p&gt;
&lt;p&gt;Thanks for you help!&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1691682" width="1" height="1"&gt;</description></item><item><title>re: Smart Terrain Rendering with Xna using Billod algorithm</title><link>http://msmvps.com/blogs/valentin/archive/2008/09/30/smart-terrain-rendering-with-xna.aspx#1690166</link><pubDate>Thu, 23 Apr 2009 06:51:33 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1690166</guid><dc:creator>valentin</dc:creator><description>&lt;p&gt;but the trees are following the shape of the mountains ?&lt;/p&gt;
&lt;p&gt;so you just have to reduce the height maybe.&lt;/p&gt;
&lt;p&gt;you can send me your code here : lord.asriel [@] free dot fr&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1690166" width="1" height="1"&gt;</description></item><item><title>re: Smart Terrain Rendering with Xna using Billod algorithm</title><link>http://msmvps.com/blogs/valentin/archive/2008/09/30/smart-terrain-rendering-with-xna.aspx#1689998</link><pubDate>Wed, 22 Apr 2009 15:00:56 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1689998</guid><dc:creator>Bert</dc:creator><description>&lt;p&gt;Well I know that i have the right triangle from the quadtree, but when I try to get the height of the point in the triangle, I don&amp;#39;t get the right height.... All of the trees float above the terrain.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1689998" width="1" height="1"&gt;</description></item><item><title>re: Smart Terrain Rendering with Xna using Billod algorithm</title><link>http://msmvps.com/blogs/valentin/archive/2008/09/30/smart-terrain-rendering-with-xna.aspx#1689813</link><pubDate>Wed, 22 Apr 2009 06:00:05 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1689813</guid><dc:creator>valentin</dc:creator><description>&lt;p&gt;you have to know the exact position of your tree inside the triangle that contains the X, Z position of your tree, &lt;/p&gt;
&lt;p&gt;right ?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1689813" width="1" height="1"&gt;</description></item><item><title>re: Smart Terrain Rendering with Xna using Billod algorithm</title><link>http://msmvps.com/blogs/valentin/archive/2008/09/30/smart-terrain-rendering-with-xna.aspx#1689500</link><pubDate>Tue, 21 Apr 2009 13:41:42 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1689500</guid><dc:creator>Bert</dc:creator><description>&lt;p&gt;Well maybe my question was not that clear...&lt;/p&gt;
&lt;p&gt;But the problem is that I need to place tree&amp;#39;s( 3D model ) on the terrain. However I find it quite hard to get the height of a certain point on the quadtree.&lt;/p&gt;
&lt;p&gt;Therefore I lookup the childNode that contains the point of which I need to get the height. When I have found the child node containing that point, I look up which triangle contains the point of which I want to know the height. And then I calculate the height of the point in that triangle.&lt;/p&gt;
&lt;p&gt;Since the terrain is rendered with the help of the vertices it should give the exact height of the terrain on that point...&lt;/p&gt;
&lt;p&gt;I&amp;#39;m sorry that I can not give a better description of the problem.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1689500" width="1" height="1"&gt;</description></item><item><title>re: Smart Terrain Rendering with Xna using Billod algorithm</title><link>http://msmvps.com/blogs/valentin/archive/2008/09/30/smart-terrain-rendering-with-xna.aspx#1689473</link><pubDate>Tue, 21 Apr 2009 12:30:45 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1689473</guid><dc:creator>valentin</dc:creator><description>&lt;p&gt;by tree you mean the objet model Tree (like flower, grass ect.) ?&lt;/p&gt;
&lt;p&gt;I first think that you were speaking about quad tree so it was hard to understand your problem :)&lt;/p&gt;
&lt;p&gt;you only have to substract a delta that you have to substract to the height of each tree.&lt;/p&gt;
&lt;p&gt;I dont understand your point 2 &amp;quot;Measure the altitude between the point in the triangle and 0&amp;quot;.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1689473" width="1" height="1"&gt;</description></item><item><title>re: Smart Terrain Rendering with Xna using Billod algorithm</title><link>http://msmvps.com/blogs/valentin/archive/2008/09/30/smart-terrain-rendering-with-xna.aspx#1689077</link><pubDate>Mon, 20 Apr 2009 16:26:09 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1689077</guid><dc:creator>valentin</dc:creator><description>&lt;p&gt;i saw your question&lt;/p&gt;
&lt;p&gt;i will try to answer tomorrow :)&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1689077" width="1" height="1"&gt;</description></item><item><title>re: Smart Terrain Rendering with Xna using Billod algorithm</title><link>http://msmvps.com/blogs/valentin/archive/2008/09/30/smart-terrain-rendering-with-xna.aspx#1689015</link><pubDate>Mon, 20 Apr 2009 13:27:59 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1689015</guid><dc:creator>Bert</dc:creator><description>&lt;p&gt;I am trying to use the code of this project in order to build an terrain with tree&amp;#39;s. However when I try to place a tree on a certain position on the quadtree it appears to be floating in the air. &lt;/p&gt;
&lt;p&gt;I noticed that the QuadTree.GetHeight()-method is not that exact, therefore I try to calculate the height on my own with the following steps:&lt;/p&gt;
&lt;p&gt;1. Locate the triangle which contains the point&lt;/p&gt;
&lt;p&gt;2. Measure the altitude between the point in the triangle and 0&lt;/p&gt;
&lt;p&gt;This almost gives me the correct height, because I can see the trees following the shape of the mountains, how ever they still appear to be floating....&lt;/p&gt;
&lt;p&gt;Does anyone have an idea how I can solve this?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1689015" width="1" height="1"&gt;</description></item><item><title>re: Smart Terrain Rendering with Xna using Billod algorithm</title><link>http://msmvps.com/blogs/valentin/archive/2008/09/30/smart-terrain-rendering-with-xna.aspx#1680921</link><pubDate>Tue, 24 Mar 2009 08:59:29 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1680921</guid><dc:creator>valentin</dc:creator><description>&lt;p&gt;that&amp;#39;s great :) send me your code so that i can see :)&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1680921" width="1" height="1"&gt;</description></item><item><title>re: Smart Terrain Rendering with Xna using Billod algorithm</title><link>http://msmvps.com/blogs/valentin/archive/2008/09/30/smart-terrain-rendering-with-xna.aspx#1680914</link><pubDate>Thu, 19 Mar 2009 01:35:54 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1680914</guid><dc:creator>Armigus</dc:creator><description>&lt;p&gt;I&amp;#39;m actually getting some results with improving the terrain rendering, to the point of wanting the camera to maintain a bounding frustum and check the node children against it.&lt;/p&gt;
&lt;p&gt;The QuadNode class needs some refactoring first:&lt;/p&gt;
&lt;p&gt;public TerrainVertex SetVertex(float x, float z, Vector3 n)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;VertexPositionNormalTexture v0 = new VertexPositionNormalTexture ();&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;v0.Position = new Vector3(x, ParentTree.GetHeight(x, z), z);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;v0.Normal = n;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;v0.TextureCoordinate = GetTextureCoordinates(x, z);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return new TerrainVertex(v0);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;public Vector3 GetNormal(Vector3 nw, Vector3 ne, Vector3 sw, Vector3 se)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Vector3 n = new Plane(nw, ne, se).Normal * new Plane(nw, se, sw).Normal;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;n.Normalize();&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return n;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;public Vector3 GetNormal(float left, float right, float top, float bottom)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Vector3 nwp = new Vector3(left, ParentTree.GetHeight(left, top), top);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Vector3 nep = new Vector3(right, ParentTree.GetHeight(right, top), top);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Vector3 swp = new Vector3(left, ParentTree.GetHeight(left, bottom), bottom);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Vector3 sep = new Vector3(right, ParentTree.GetHeight(right, bottom), bottom);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return GetNormal(nwp, nep, swp, sep);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;public Vector3 GetNormal(TerrainVertex nw, TerrainVertex ne, TerrainVertex sw, TerrainVertex se)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Vector3 nwp = nw.Value.Position();&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Vector3 nep = ne.Value.Position();&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Vector3 swp = sw.Value.Position();&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Vector3 sep = se.Value.Position();&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return GetNormal(nwp, nep, swp, sep);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt;This will simplify the Initialize method considerably:&lt;/p&gt;
&lt;p&gt;public void Initialize()&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;float size = GetNodeSize();&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;float x = Location.X;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;float z = Location.Y;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;float xWhole = x + size;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;float zWhole = z + size;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;float zHalf = z + size / 2;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;float xHalf = x + size / 2;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//normal of the current quad&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Vector3 normal = GetNormal(x, xWhole, z, zWhole);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//first compute the 4 egdes of the current square&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//here we know all : position and height.&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (Parent != null)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//if we have a parent maybe &lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1680914" width="1" height="1"&gt;</description></item><item><title>re: Smart Terrain Rendering with Xna using Billod algorithm</title><link>http://msmvps.com/blogs/valentin/archive/2008/09/30/smart-terrain-rendering-with-xna.aspx#1675325</link><pubDate>Tue, 03 Mar 2009 03:54:25 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1675325</guid><dc:creator>Mohammad</dc:creator><description>&lt;p&gt;Wow! You are man! This is exactly what I was looking for!&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1675325" width="1" height="1"&gt;</description></item><item><title>re: Smart Terrain Rendering with Xna using Billod algorithm</title><link>http://msmvps.com/blogs/valentin/archive/2008/09/30/smart-terrain-rendering-with-xna.aspx#1674767</link><pubDate>Sat, 28 Feb 2009 07:45:05 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1674767</guid><dc:creator>valentin</dc:creator><description>&lt;p&gt;yes you just have tu replace in all the projet.&lt;/p&gt;
&lt;p&gt;For the generic i dont use it beacause if you want to make a special operation on vertex you will have to cast or try generic operation that cost more cpu than direct operation.&lt;/p&gt;
&lt;p&gt;In Xna, code optimization are not the best optimization...&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1674767" width="1" height="1"&gt;</description></item><item><title>Hmmm.... generics might be an option after all</title><link>http://msmvps.com/blogs/valentin/archive/2008/09/30/smart-terrain-rendering-with-xna.aspx#1674742</link><pubDate>Sat, 28 Feb 2009 05:47:34 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1674742</guid><dc:creator>Armigus</dc:creator><description>&lt;p&gt;If you need define a generic class so that the item is indeed a value type you could have&lt;/p&gt;
&lt;p&gt;public class QuadTree&amp;lt;T&amp;gt; : QuadNodeCollection, IDisposable where T : struct&lt;/p&gt;
&lt;p&gt;You would then have to convert all classes that refer to vertex structures to generics, a task in and of itself. &amp;nbsp;I haven&amp;#39;t tested this theory yet so no guarantees.&lt;/p&gt;
&lt;p&gt;BTW, check out what Dragoon did with Reimer&amp;#39;s material (&lt;a rel="nofollow" target="_new" href="http://dracocepheus.blogspot.com/"&gt;dracocepheus.blogspot.com&lt;/a&gt;). &amp;nbsp;It&amp;#39;s a component-based project. &amp;nbsp;Since I eventually want a full game engine I am trying to pull together GameComponent items that can be registered as services.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1674742" width="1" height="1"&gt;</description></item><item><title>re: Smart Terrain Rendering with Xna using Billod algorithm</title><link>http://msmvps.com/blogs/valentin/archive/2008/09/30/smart-terrain-rendering-with-xna.aspx#1674715</link><pubDate>Sat, 28 Feb 2009 04:11:28 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1674715</guid><dc:creator>Armigus</dc:creator><description>&lt;p&gt;If you want the terrain to render using a customized vertex format and a custom shader, isn&amp;#39;t it necessary to replace the vertex type project-wide? &amp;nbsp;It&amp;#39;s not like you can have a generic vertex struct Vertex&amp;lt;T&amp;gt; and have XNA recognize it because generics are not value types by default. &amp;nbsp;C# has no equivalent of VB&amp;#39;s ByVal to force a value type either.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1674715" width="1" height="1"&gt;</description></item><item><title>re: Smart Terrain Rendering with Xna using Billod algorithm</title><link>http://msmvps.com/blogs/valentin/archive/2008/09/30/smart-terrain-rendering-with-xna.aspx#1673754</link><pubDate>Wed, 25 Feb 2009 13:52:15 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1673754</guid><dc:creator>valentin</dc:creator><description>&lt;p&gt;can&amp;#39;t figure why too :)&lt;/p&gt;
&lt;p&gt;did you change all my VertexPositionNormalTexture by your own vertex structure type ?&lt;/p&gt;
&lt;p&gt;A blank screen is a common answer to this kind of mistake&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1673754" width="1" height="1"&gt;</description></item></channel></rss>