
And the problem can be seen here:

I've verified that my texture tiles in all directions and the problem exists with polar mapped textures found on Google Images as well, so I don't believe it's my texture. What is the proper way to uv map the poles of a uv sphere? Am I doing something else wrong?
Edit:
The relevant section of the rather extensive code follows:
Code: Select all
IImage* img = driver->createImage(ECF_R8G8B8, dimension2du(planetTextureSize, planetTextureSize));
int v = 0;
for (u32 x = 0; x < planetTextureSize; x++) {
for (u32 y = 0; y < planetTextureSize; y++) {
if (planetTexturePolar) {
float a = x/(float)planetTextureSize*PI*2.0;
float b = y/(float)planetTextureSize*PI;
v = octave_noise_3d(planetTextureDetail, 1.0, 1, sin(a)*sin(b), cos(b), cos(a)*sin(b))*128+128;
}
else v = octave_noise_2d(8, 1.0, 0.001, x, y)*128+128;
img->setPixel(x, y, SColor(0, v, v, v));
}
}
driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, false);
ITexture* tex = driver->addTexture("noise", img);
driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, true);
IMeshSceneNode* planet = smgr->addSphereSceneNode(planetSize, planetDetail);
if (planet) {
planet->getMaterial(0).setTexture(0, tex);
}





