I am really new at this and I am using blender to make a model of planet earth. I create a UVsphere mesh, mark a seam down the center and unwrap its UV faces. I load in a .bmp as a texture and set it to sphere under the map input tab. It looks great in Blender rendered.
When I export to .3ds and load it into irrlicht the texture is only on about half of the sphere and it is also not scaled like it was in blender. For example, on the half that shows textured the tip of South America takes up about half of the space and Antartica takes up the rest.
Here is my code:
IAnimatedMesh* animMesh = mgr->getMesh("media/planet.3ds");
IMeshManipulator* manipulator = mgr->getMeshManipulator();
IMesh* planetMesh = manipulator->createMeshCopy(animMesh->getMesh(0));
matrix4 m;
m.setScale (core::vector3df(100,100,100));
manipulator->transformMesh(planetMesh, m);
node = mgr->addMeshSceneNode(planetMesh);
node->setPosition(position);
exporting mesh/texture to .3ds and into irrlicht
You could try using IrrEdit too if you're on Windows to see if your mesh loads properly inside of Irrlicht. That way you would have no doubts about whether it's your code or your mesh that is incorrect.
Is your texture's dimensions to the power of two? (512, 256, 128)
btw, map to sphere or map to flat doesn't matter, since you've UV wrapped it.
Is your texture's dimensions to the power of two? (512, 256, 128)
btw, map to sphere or map to flat doesn't matter, since you've UV wrapped it.
no, it doesn't matter as far as the dimensions are in power of 2 (2^n), so 512 x 256 is perfectmillhouse wrote:My .bmp is 512 X 256. Do the deimensions have to be the same?
while(!asleep) sheep++;
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java