Here I come again with another typical noob question
(I searched the forum for an answer but did only find one topic, with unsuccessful method).
OS : Ubuntu
3D Modeler : Blender
Irrlicht : SVN version
I'm a really beginner, so please forgive me if the answer is obvious for you
I created a tree (very simple : a box with 4 "arms" -- sorry for my poor english) in blender, in order to put it on the "rivers.3ds" map.
To texture the tree, I followed a tutorial to use UV unwrapping, and finally successfully created an UVmap texture for my tree : map1.tga.
At this point, I don't know if I have to do something with the texture in blender, in order to "assign" it to the object, so I just made an export of the object in the 3DS format.
I put the arbre.3ds (arbre = tree in french) and the map1.tga in a subdir of my test project.
I load the tree with :
Code: Select all
mesh = hotp->scene->getMesh("data/objects/arbre.3ds");
ptiga = hotp->scene->addAnimatedMeshSceneNode(mesh);
ptiga->setMaterialFlag(video::EMF_NORMALIZE_NORMALS, true);
ptiga->setMaterialFlag(video::EMF_LIGHTING, false);
//ptiga->setMaterialTexture(0, hotp->driver->getTexture("data/objects/map1.tga"));
ptiga->setPosition(vector3df(0, 460, -200));
If I uncomment the setMaterialTexture, I can see the brown (and a bit of green) colors I used in my texture, but it is not at all well positionned on the mesh.
In all cases, I get this error :
Code: Select all
Found no matching material for Group in 3ds file.
I guess I did something wrong somewhere, but as a beginner, I can't find where, and I've been testing it for 2 days without results, so now I try to ask in the forums
Did I have to specify the texture in blender before exporting the object ? Also, in blender if I try to export to MD2 (since the girl in latex in the tutorials is in MD2, I thought i could do the same thing), I get a python script error... If there is a blender guru here, any explanation would be greatly appreciated
Thanks for your time and help, have a nice day,
Lideln