Mesh Texture?
Posted: Mon Jul 23, 2007 7:09 am
I have my sky box, terrain, and .x mesh loaded. and yay i have figured out how to rotate it to its upright position.
but its black. pitch black.
How am i supposed to load the textue onto the mesh? and will it be the say way a uv mapped it in 3dstudio max?
I make al of my meshes in 3d studio. And i cant seem to export them into my game without them being black!
heres my code
and i even added
node->setMaterialTexture(0, driver->getTexture("home.bmp"));
in there but it diddnt do anything but say it loaded the texture in the dos box
but its black. pitch black.
How am i supposed to load the textue onto the mesh? and will it be the say way a uv mapped it in 3dstudio max?
I make al of my meshes in 3d studio. And i cant seem to export them into my game without them being black!
heres my code
Code: Select all
device->getFileSystem()->addZipFileArchive("home.x");
scene::IAnimatedMesh* mesh = smgr->getMesh("home.x");
scene::ISceneNode* node = 0;
if (mesh)
node = smgr->addOctTreeSceneNode(mesh->getMesh(0));
if (node)
node->setPosition(core::vector3df(150,3,50));
node->setRotation(core::vector3df(0,0,0));
node->setMaterialTexture(0, driver->getTexture("home.bmp"));
in there but it diddnt do anything but say it loaded the texture in the dos box