Tiling a texture
-
Frobaz
Tiling a texture
I load an object created with a 3d editor. In the editor, I have the texture tiled across the object so it isnt stretched out. After that, I exported it to .3ds but when I load the image into my game, the texture is stretched out. How do I keep the texture mapping created when I made the object?
-
Frobaz
-
needforhint
- Posts: 322
- Joined: Tue Aug 30, 2005 10:34 am
- Location: slovakia
could you set me right a bit? Is it possible to import a mesh to irrlicht, but not textered, and then call a irrlicht function for setting a material (setMaterialTexture()) and it will set the texture to the coordinates that had been set on a model in the 3d modeling program? can I do that somehow?
what is this thing...
Code: Select all
possible to import a mesh to irrlicht, but not textered, and then call a irrlicht function for setting a material (setMaterialTexture())u need to export as wavefront obj from the modeller
imprt obj file in uvMapper
chose a texture map type (like box)
u may like to rearange the objects -or not
save the map
SAVE THE MODEL!!!
import the resaved model in the modeller
export as .3ds
paint the map
....irrlicht part *phew*
Code: Select all
scene::IAnimatedMesh* mesh0 = smgr->getMesh(
"../media/model.3ds");
smgr->getMeshManipulator()->makePlanarTextureMapping(
mesh0->getMesh(0), 0.008f);
scene::ISceneNode* nodePt = 0;
nodePt = smgr->addAnimatedMeshSceneNode(mesh0);
nodePt->setMaterialTexture(0, driver->getTexture("../media/modelTexmap.bmp"));
jan 10-06 Jazz-E posts an addon specific for MAX users and *.x model files. This can be found here:
http://irrlicht.sourceforge.net/phpBB2/ ... 3765#63765
Last edited by bearSoft on Tue Jan 10, 2006 12:42 pm, edited 1 time in total.
Regards.
Tech: win98se| 320mb ram| abitbe6| 433mhzceleron| atiRadeon7000.64mb| soundblaster125| dx9.0b | devCPP | IRR 0.12.0 |
Tech: win98se| 320mb ram| abitbe6| 433mhzceleron| atiRadeon7000.64mb| soundblaster125| dx9.0b | devCPP | IRR 0.12.0 |
-
Frobaz
share it plz
if you managed to keep the texture tiled after importing it in irrlicht, plz post the way cause i have the same problem.
