I've been working on a project for a while that involves planetary/spherical terrain. I plan on using height maps to displace the surface vertices and for generating normal maps to normal map the terrain as well. My spherical terrain setup consists of a quadrilateralized spherical cube - a cube morphed into sphere (see first image below) that is subdivided into smaller patches by a quad-tree subdivision algorithm (see second image below). To generate the heights for the height map I will be using a 3D perlin noise script. However, I don't understand what positions I plug into the perlin noise to get the heights for the height map (each terrain patch will have its own height map) and afterwards apply the height map to the mesh to displace the vertices.
My end goal is to generate a height map with a size of 192x192 but I have to make some optimizations before I can do that. The vertex "resolution" for each terrain patch is 16x16 (289 vertices per patch), I don't know if this helps or not though. To reiterate, my problem is that I don't know how to generate a height map (texture) using a 3D perlin noise function so that the height map could be then mapped to the sphere to displace vertices. Anybody have any experience with this? Could someone shed some light on what I'm missing here or point me in the right direction. I've been searching for weeks and haven't found anything really helpful. I know it is some sort of U,V to X,Y,Z mapping but I don't know how this would work just for the quadrilateral patches of the sphere, not the entire thing or one of the six faces of the cube.