Shawn Hargreaves Blog
The DirectX Tool Kit has been updated with two new features:
There are also some minor tweaks and bugfixes:
So what is this GeoSphere thingie, you may well ask, and why might it be better than a plain old fashioned UV sphere primitive? Shamelessly plagiarizing an explanation from Adrian:
Generally speaking, geospheres are more efficient than non-geodesic spheres (which are typically generated by using rings of vertices along the latitudes/longitudes of the sphere). In an ideal geosphere each triangle has the same area, which means an even distribution of vertices around the sphere. This means geospheres can give better visual quality at the same vertex count.
My implementation approximates an ideal geosphere by recursively subdividing a starting shape – in this case an octahedron. Almost any regular polyhedron can be used, but octahedrons or icosahedrons typically give best results. Starting with an icosahedron would give slightly more accurate results (i.e. it would produce an output closer to an ideal geosphere) but would make the implementation more complex.
Each successive subdivision increases the number of vertices by a factor of four. Hence the total number of vertices is approximately 4^(N+1), where N is the number of tessellations specified in CreateGeoSphere. A value of 3 or 4 is usually enough to give good results.
CreateSphere Tessellation = 11 276 vertices CreateGeoSphere Tessellation = 3 277 vertices
CreateSphere Tessellation = 11 276 vertices
CreateGeoSphere Tessellation = 3 277 vertices
Better living through better algorithms!