Hello Irrlicht community.
I'm new to Irrlicht engine and programming. I found out, downloaded, and started using this engine only yesterday. I went through several tutorials and learned quite a bit, like how to load objects, apply a single texture to them. But I still don't know how to apply more than one texture to my map, created in 3d Studio Max 9. I did apply textures in 3d max, but when I loaded the level into my game, it had no textures at all.
I couldn't find any examples, or tutorials to do that, I searched forum, read wiki, but I had no luck. Can you point me to some tutorials, or tell me how to apply several textures to my map? (Floor, walls, ceiling, etc.) Any help is appreciated. Thanks alot
- Lukas
Applying textures
-
Heresiarch
- Posts: 14
- Joined: Mon Mar 16, 2009 1:21 pm
- Location: Finland
-
FuzzYspo0N
- Posts: 914
- Joined: Fri Aug 03, 2007 12:43 pm
- Location: South Africa
- Contact:
Hi Lukas,
There are a number of possible problems.
1) Did you export materials with the objects in question?
2) Have you checked the console output (it normally explains what its doing and why)
3) Have you any more information except "its not working".
Most times we can try guess , but you might be doing something incorrectly code side (for example setMaterialTexture is not needed if the mesh has a texture applied already in 3dsmax) and you could be resetting stuff, who knows right ?
The best way to get a good answer is to be careful how you respond as well , you would hate to come across as too sarcastic when you are the one seeking help (this is normal in any community)
There are a number of possible problems.
1) Did you export materials with the objects in question?
2) Have you checked the console output (it normally explains what its doing and why)
3) Have you any more information except "its not working".
Most times we can try guess , but you might be doing something incorrectly code side (for example setMaterialTexture is not needed if the mesh has a texture applied already in 3dsmax) and you could be resetting stuff, who knows right ?
The best way to get a good answer is to be careful how you respond as well , you would hate to come across as too sarcastic when you are the one seeking help (this is normal in any community)
just 2 common errors when using 3ds meshes:
1st: are the textures in the same folder the mesh is in (they should be) ???
2nd: are the texture names in 8.3 (DOS) format (they should be) ???
1st: are the textures in the same folder the mesh is in (they should be) ???
2nd: are the texture names in 8.3 (DOS) format (they should be) ???
while(!asleep) sheep++;
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
IrrExtensions:

http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
Hello,
It seems that I didn't have textures I used in my map in the same directory as my map. I also had this code :
Thanks alot.
- Lukas
It seems that I didn't have textures I used in my map in the same directory as my map. I also had this code :
Code: Select all
node->setMaterialTexture(0, driver->getTexture("Data/Materials/Wall01.png"));Thanks to you, I managed to clear those lines of code, and my map now has 2 textures applied. But I wanted to ask, if there is a way to make my Testmap.3ds file load the textures from different directory? I would like to keep my maps in Maps folder, and the textures in Materials folder.for example setMaterialTexture is not needed if the mesh has a texture applied already in 3dsmax
I didn't mean to sound rude in my last post, I was just thinking that it couldn't be the way to make maps, that's all.The best way to get a good answer is to be careful how you respond as well , you would hate to come across as too sarcastic when you are the one seeking help (this is normal in any community)
Thanks alot.
- Lukas
-
FuzzYspo0N
- Posts: 914
- Joined: Fri Aug 03, 2007 12:43 pm
- Location: South Africa
- Contact:
No worries!
Also, on the same folder issue, no this is how 3ds files work. As with obj etc (which i would suggest as 3ds is crappy).
Another note is normally you manage meshes and textures via setMaterialTexture, manually ( at least in most game frameworks, for the reason of seperating data and sharing a common /textures folder).
Also, on the same folder issue, no this is how 3ds files work. As with obj etc (which i would suggest as 3ds is crappy).
Another note is normally you manage meshes and textures via setMaterialTexture, manually ( at least in most game frameworks, for the reason of seperating data and sharing a common /textures folder).
Thanks for the info, but wouldn't setMaterialTexture function apply only one texture to the whole model? As I mentioned before, I only started using this engine yesterday. Could you give me an example?
EDIT - I also have another problem with textures in my map. Take a look at screenshots
Rendered in 3ds Max :

In Game :

This happens if I use .obj file as my map. Here's the code I use to load my map :
Sorry for asking so many things, really.
- Lukas
EDIT - I also have another problem with textures in my map. Take a look at screenshots
Rendered in 3ds Max :

In Game :

This happens if I use .obj file as my map. Here's the code I use to load my map :
Code: Select all
// Load map mesh
scene::IAnimatedMesh* mesh = smgr->getMesh("Data/Maps/Hospital.obj");
scene::ISceneNode* node = 0;
node = smgr->addAnimatedMeshSceneNode(mesh);
node->getMaterial(0).SpecularColor.set(0,0,0,0);- Lukas