I have a procedural planet generator in the works and my setup is I have a quadtree set up that splits the six faces of the cube into smaller, manageable quads. As the camera approaches the terrain, these quads split and as it recedes away from them, the terrain quads 'collapse' - just like any other quadtree terrain system. The problem is that, at the moment, to displace the vertices of the terrain I compute the vertex heights using 3D ridged multi fractals and have to directly displace the vertices using the outputs of the algorithm. Instead I want to generate a heightmap with a greater resolution than that of the vertices in the quadtree leaf nodes. That is, there has to be a lot more texels in the heightmaps than there are vertices in the quads of the planet. The vertex density of each quad is 17x17 (289 verts total) while the heightmap textures will have a resolution of 192x192 texels (36,864 texels total). I don't even know what positions I plug into the ridged multi fractals algorithm to generate the colors for texels that won't map to any vertices (as I plug in the vertex positions to generate all of the heights). Much less, I don't quite understand how to read the heightmap so that the heights do map to the vertices properly. The only reason I need the heightmap to have such a high resolution is because I will also use them for normal mapping.
-
You may want to go to one of the other CS branches([compsci](http://cs.stackexchange.com/) for example) of stack exchange. This is not a technical programming question and is more focused on CS constructs than programming. – Benjamin Trent May 28 '14 at 19:25
1 Answers
As a starting point, look up the Wikipedia article on Quadrilateralized Spherical Cube (QLSC) which was first proposed by F. K. Chan (analyst) and E. M. O'Neill (programmer) in 1973-1974 period. This abridged article is based on a 1975 Computer Sciences Corporation report prepared for the US Navy, referenced in that Wikipedia article. The QLSC is a mathematical construct for the division of the six spherical squares on a sphere into equal-area cells by an appropriate (nonlinear) transformation from the equal-area cells on the six planar squares of an inscribed cube. The cell resolution is selectable (user-specified) and is based on a hierarchical division of a square consistent with the quadtree structure. The cells are strung together serially in a "reversed Z-pattern" binary bit-string. By masking out the even or odd bits in the serial cell address, the x or y coordinates of the cell on a planar square are obtained.
The QLSC was used by the Navy for meteorological applications in 1977. It was also adopted by NASA for use in the Cosmic Background Explorer (COBE) in 1989. It has been used by astronomers and astrophysicists for all-sky star-mapping and radiation cataloging. Atmospheric and oceanic scientists use it for the database structure because of the efficiency in data archival and retrieval. It is used in geographical information systems (GIS) for hyperspectral data processing, and in geodetic representation of terrain data.
There are only a few copies of the original Navy report in existence. However, a reprint may be obtained (through Amazon) from the National Technical Information Service (NTIS) in Springfield, Virginia. There is a 25 page paper "A Quadrilateralized Spherical Cube Earth Data Base" by Chan in the Proceedings of the NASA/GSFC Fifth Annual Flight Mechanics/Estimation Theory Symposium, Greenbelt, Maryland (1980). A few articles in Stack Overflow may be obtained by searching (through Google) using the keywords Quadrilateralized Spherical Cube.

- 1