Details: I'm in the proccess of procedural planet generation; so far I'm doing the sphere work. Currently my sphere is a subdivided icosahedron. (20 sides all equilateral triangles)
Before, when I was subdividing using a software algorithm, one triangle would be split into four children across the midpoints forming something close to a sierpinski triangle every iteration...like this: http://puu.sh/1xFIx
As you can see, each triangle subdivided created more and more equilateral triangles.
But now that I am using the GPU to tessellate in HLSL, the result is definately not what I am looking for: http://puu.sh/1xFx7
Questions: Is there anything I can do in the Hull and Domain shaders to change the tessellation so that it subdivides into sets of equilateral triangles like the first image?
Should I be using the geometry shader for something like this? If so, would it be slower then the tessellator?
Hello gamedev! I am a high school student working on a procedural planet engine in my spare time using DirectX 11 and C++. Four weeks ago I was 100% new to DirectX 11, but I have learned a lot just by reading tutorials and getting inspiration from tech demos.
So far I'm taking the Icosahedron approach to generating a sphere. There's a lot of blogs, articles and theory on this, but not much raw code examples specifically for DX11 C++...most of them I have found are for OpenGL. It took me three weeks, but I managed to write my own version of Andrew True's nifty counterclockwise method. (here) I've created wrapper functions for properly subdividing and merging these triangles, now I need to work on dynamic LOD.
Unfortunately he doesn't seem to be active anymore, his website is gone, and he never posted anything on LOD with his tactic. :C So for the last week I've been trying to come up with the best solution to triangle based LOD. I've read up on various methods like quad trees, RTIN and ROAM, but they all deal with cube quads mapped to the sphere. I obviously need a different approach. ________________________________________________________
So I need something that works with my subdivided Icosahedron.
The first method I tried was very basic. I check distance on all triangles. If the distance was greater then a certain value I would subdivide the triangle, and vice versa for merging children back into a parent. At first this method was extreeeeemly expensive. I wasn't able to get past 3 subdivisions before the number of sqrt() calls per frame was taking a tole on my FPS.
I've optimized it since then by only checking distance on triangles of the current and previous LOD levels, but it's still waayyy too slow and it's all done on the CPU side.
My goal is to be able to go from planet to surface...seamlessly...but I can't figure out how I would do this.
Am I wrong about chunked LOD? Can RTIN, ROAM, or quad trees work with my triangle setup somehow?