Texturing own 3ds Files

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
JEB

Texturing own 3ds Files

Post by JEB »

Hi!
I'm really happy with Irrlicht because i've only worked with OpenGL primitives before. So now I started to create Models with http://www.wings3d.com on my own. I exported it as 3ds, but i couldn't texture it. Somebody in the german irrlicht board told me to set materials onto the model. I created a material called 'mymat' and added it to a cube. Exporting works fine, so it isn't the error. But still, irrlicht can't map textures on it :cry: . My cube can be found here:http://www.jebdev.net/others/mesh.3ds
I'm also searching for a tool running on linux which allows me to animate my 3ds model. I don't like blender's 3ds exoporting, so i won't use it. is there any other tool?

mfg, jeb
bearSoft
Posts: 165
Joined: Fri Apr 01, 2005 9:55 pm
Location: Denmark

Post by bearSoft »

Regards.
Tech: win98se| 320mb ram| abitbe6| 433mhzceleron| atiRadeon7000.64mb| soundblaster125| dx9.0b | devCPP | IRR 0.12.0 |
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

There are 2 ways to load textured 3ds models into Irrlicht:

1. You create your model in a package like 3dsmax, uv map it there, texture it properly, export it to 3ds, place your 3ds in your Irrlicht project "media" folder ensuring you're copying the textures you used for the model into the same folder. The you just load the 3ds in irrlicht and the textures load auotmatically:

Code: Select all

scene::IAnimatedMesh* alienmesh = 0;
alienmesh = smgr->getMesh("./data/alien.3ds);
scene::IAnimatedMeshSceneNode* aliennode = 0;
aliennode = smgr->addAnimatedMeshSceneNode(alienmesh);
2. The second way is loading any 3ds model you have created (even untextured) and assign a generic texture to it and a defult planar texture mapping (which is how Niko loads the room in the spcialfx tutorial):

Code: Select all

scene::IAnimatedMesh* alienmesh = 0;
alienmesh = smgr->getMesh("./data/alien.3ds");
smgr->getMeshManipulator()->makePlanarTextureMapping(alienmesh->getMesh(0), 0.008f);
aliennode->setMaterialTexture(0, driver->getTexture("./data/alien.jpg"));
the 2nd way may end up in weird results, specially in characters, but if you need for stuff like walls or rocks it will work fine.
Last edited by afecelis on Fri Nov 11, 2005 9:35 pm, edited 1 time in total.
jeb
Posts: 3
Joined: Thu Nov 10, 2005 9:48 pm
Location: TG - Switzerland
Contact:

Post by jeb »

i got a possibility to create UV-Mapping in wings3d. But I have to choose either 'direct' or 'force segment' uv-mapping. What are the differences between them?
jeb
Posts: 3
Joined: Thu Nov 10, 2005 9:48 pm
Location: TG - Switzerland
Contact:

Post by jeb »

Yearh, i got it. I can create UV-Maps. But there's still one problem: I can't export my UV-Map to edit in an graphic programm like the gimp. but texturing is possible now. anybody friendly with wings3d and can told me how to do? So I only need a programm to animate my 3ds models. anybody got one (not blender)?

mfg, jeb

EDIT: programm should run on linux
Post Reply