Page 1 of 1

[NooB] Blender + 3DS + UVmap

Posted: Sun Oct 22, 2006 12:35 pm
by Lideln
Hi all !

Here I come again with another typical noob question :lol:
(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 set EMF_LIGHTING to false, I get a white object (with a correct shape), and if I set it to true, I get a black one.
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.
(that's what I searched the forum for, but only found Hybrid telling the 25th september that it was a bug and corrected in the SVN version, that I updated, but still the same issue)

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 :wink:

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

Posted: Sun Oct 22, 2006 4:27 pm
by vermeer
almost sure you didnt asign well the material or teh texture in blender, and/or didnt put texture in same folder than the 3ds to be loaded.

you didnt upload the tga file...


Are you aware that the tga wont get embeded in the blend file, that you have to carry it with the 3ds exported file?

also, I dunno how th e3ds irrlicht loader works, so just in case, test also using load or replace image in blender's "UV editor"...the material texture slot you put is correct, and you have UV checked.

Also, comes to sound suspicious to me the route to your tga in the material slot : //map1.tga

Is that a correct path in your linux ?

Posted: Sun Oct 22, 2006 4:55 pm
by Lideln
Hi vermeer, thanks for your answer !

I guess I have done it well in Blender, cause I just tested with the wavefront .obj exporter, and irrlicht load it (quite) well, with the uvmap.

Yes, I put the map1.tga file with the .3ds file (the .3ds file is 150ko, the .tga file is 450ko).
I also tried with a .bmp file just in case...

The blend file is there :
http://www.filefactory.com/file/2e07e4/
The tga :
http://www.filefactory.com/file/6110ec/
The exported .3ds :
http://www.filefactory.com/file/a2bd3d/

The path "//map1.tga" seems strange, but that is what I get when loading the image in blender (blender tells me this is the path, so I guess it means './')

I'll try to modify the irrlicht 3ds loader code, in order to check what texture file Irrlicht is trying to set to the mesh.

Thanks for your help,

Lideln