Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

How would you map the points on a spherical clipmap to a heightmap? My coarsest clipmap has an outer radius of PI and an inner radius of PI/2. My coarsest heightmap goes from -PI, PI on the x axis and 0, PI on the Y. The clipmap extends from 0,PI on the heightmap's Y axis and PI/4, 1.5 PI on the x axis.

My clipmaps are made up of 2D rings which I project onto a sphere. I'm attempting to take the points in each 2D ring and map them to the heightmap. But I'm wondering if I shouldn't take the xyz of the projected point and use that to map to the correct point on the heightmap. I'd prefer to the do the first as it should be less GPU intensive.

Here is a screen shot of my broken mapping. The 3 planes in the upper right hand corner from top to bottom are coarsest to third coarsest heightmaps. As you can see the mapping is horribly broken.

enter image description here

share|improve this question
    
Each point on the clipmap has to be rotated to the correct point on the sphere which gives me the XYZ of that point. It is a simple arctan and arccosine to get the phi and theta of that point. And while those functions are expensive, they would at least give me the exact location on the heightmap. –  merpnderp Aug 8 '13 at 21:47
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.