# juglarx

Member Since 04 Nov 2012
Offline Last Active Nov 05 2012 12:29 AM

### Spherical World and HeightMaps

04 November 2012 - 08:13 PM

Hi everyone!

So, i'm working on a project of procedural planet, my problem now is how to map from a spherical coodinate (xyx from my planet) to a qad coordinate (xy form my hightmap grayscale texture). basicaly what i have right now is


// here is all the grayscale data

float hm[] = heightmap.getHeightMap();

// this is the append on the OpenGL Buffer for all the points on the sphere
posBuf.put(dotX);

posBuf.put( hm[ CALCULATE_FROM_SPHERICAL_COORD] );

posBuf.put(dotZ);



any clue on that, are my approach correct or to do it i need another techniques ??