Coppercube Material Problem
Coppercube Material Problem
Hi all,
I wonder if anyone had any trouble with materials in coppercube.
I have imported my scene from max. First I used 3ds format and for some reason coppercube only showed one material.
So instead I export to obj and then coppercube could only see 4 of my 7 materials.
That is why my table has got the incorrect material on it.
Has anyone else come across this problem before?
And if so which model format did you export from 3ds max to get it working.
I wonder if anyone had any trouble with materials in coppercube.
I have imported my scene from max. First I used 3ds format and for some reason coppercube only showed one material.
So instead I export to obj and then coppercube could only see 4 of my 7 materials.
That is why my table has got the incorrect material on it.
Has anyone else come across this problem before?
And if so which model format did you export from 3ds max to get it working.
Re: Coppercube Material Problem
Hi all,
This is really strange. After reloading my obj file into coppercube about a dozen times it still wouldn't show my textures.
So I changed my lighting to dynamic lighting and then changed it back to static and suddenly an extra texture slot showed up and I have got it in.
If I change it back to dynamic lighting the texture slots disappears. This is not good for a professional piece of software. The number of texture slots should not depend on the lighting settings. It seems very buggy if you ask me.
However it should not have taken me a day to get a 3d file into coppercube. I did think about buying coppercube, because they have a special offer on at the moment, but after spending a day trying to get textures to show up on my model I don't think coppercube is refined enough for me to spend money on it yet. They really need to do a lot more work on coppercube before it is ready for anyone to actually lay out any money on it, and it isn't cheap. 99 euros full price.
Now the next problem is to get irrlicht to load my irr. So far it complains it cannot find it's textures, and nothing shows up for some reason.
Strange thing is that it is looking for my texture which are in my 3ds max folder and not local to the irr file. I didn't think it would take me this long to get the scene into irrlicht.
Has anyone else got experience with irr files and where to put the textures?
This is really strange. After reloading my obj file into coppercube about a dozen times it still wouldn't show my textures.
So I changed my lighting to dynamic lighting and then changed it back to static and suddenly an extra texture slot showed up and I have got it in.
If I change it back to dynamic lighting the texture slots disappears. This is not good for a professional piece of software. The number of texture slots should not depend on the lighting settings. It seems very buggy if you ask me.
However it should not have taken me a day to get a 3d file into coppercube. I did think about buying coppercube, because they have a special offer on at the moment, but after spending a day trying to get textures to show up on my model I don't think coppercube is refined enough for me to spend money on it yet. They really need to do a lot more work on coppercube before it is ready for anyone to actually lay out any money on it, and it isn't cheap. 99 euros full price.
Now the next problem is to get irrlicht to load my irr. So far it complains it cannot find it's textures, and nothing shows up for some reason.
Strange thing is that it is looking for my texture which are in my 3ds max folder and not local to the irr file. I didn't think it would take me this long to get the scene into irrlicht.
Has anyone else got experience with irr files and where to put the textures?
Re: Coppercube Material Problem
Hi all,
I am thinking it might be easier if I load my model straight into irrlicht without using an irr scene file. As the whole model is more or less whole with 6 texture maps.
The only thing is I don't know how to load a normalmap, and I suspect to have this ability I need to learn the arcane knowledge of the HLSL shader system, which I have no knowledge of at all.
I am thinking it might be easier if I load my model straight into irrlicht without using an irr scene file. As the whole model is more or less whole with 6 texture maps.
The only thing is I don't know how to load a normalmap, and I suspect to have this ability I need to learn the arcane knowledge of the HLSL shader system, which I have no knowledge of at all.
Re: Coppercube Material Problem
You don't have to add the normal map separately, and Irrlicht has a normal map shader so you don't have to write your own. I don't know much about the different file formats, but if you export your model as an OBJ file, it can be loaded into Irrlicht with its normal map. I know nothing about 3DS Max, either, but you may have to bake textures or something.
In summary, you can load models with normal maps into Irrlicht, but you may have difficulties exporting them from the modeller.
In summary, you can load models with normal maps into Irrlicht, but you may have difficulties exporting them from the modeller.
Re: Coppercube Material Problem
Hi mongoose,
Thank you for your help, but you cannot bake a normalmap into an obj. A normal map is baked from the high resolution model into the low resolution model.
A normalmap has to be separate from a texture file. If you say that a normalmap can be used as standard, do you know the command to load it in?
Thank you for your help, but you cannot bake a normalmap into an obj. A normal map is baked from the high resolution model into the low resolution model.
A normalmap has to be separate from a texture file. If you say that a normalmap can be used as standard, do you know the command to load it in?
Re: Coppercube Material Problem
You don't normally load maps, they are usually loaded with the model. If you (correctly) export a model with diffuse and normal maps, Irrlicht will read them. You don't load the maps separately.
For example, try exporting an OBJ file and look in the MTL file. You should see entries for all the textures. When Irrlicht loads the OBJ file, it reads the MTLfile and loads the textures. It applies these to the model as it loads it. (If you look in an OBJ file you can see the texture directives.)
The commands for setting textures on *nodes* are only for simple models. They can't be used on more complicated models, models with more than one material.
For example, try exporting an OBJ file and look in the MTL file. You should see entries for all the textures. When Irrlicht loads the OBJ file, it reads the MTLfile and loads the textures. It applies these to the model as it loads it. (If you look in an OBJ file you can see the texture directives.)
The commands for setting textures on *nodes* are only for simple models. They can't be used on more complicated models, models with more than one material.
Re: Coppercube Material Problem
Hi Mongoose,
You are absolutely right. I was trying to load the all the textures manually and didn't even bother to copy the mtl file, however there is a problem that I am having. Now it loads all my textures, except for my normalmaps.
In the console window that pops up it is complaining that it cannot load my normals maps. they are in the /maps folder with the rest and they are even in the mtl file, but for some reason they are not loading. Oh and for some reason the mtl file has renamed all my normalmap files for some reason, but they are all there, and they are in the mtl file, so I do not know why they are not loading.
Here is a quick paste of the first two textures in the mtl file.
# 3ds Max Wavefront OBJ Exporter v0.97b - (c)2007 guruware
# File Created: 02.01.2015 17:10:06
newmtl 02___Default
Ns 10.0000
Ni 1.5000
d 1.0000
Tr 0.0000
Tf 1.0000 1.0000 1.0000
illum 2
Ka 0.5882 0.5882 0.5882
Kd 0.5882 0.5882 0.5882
Ks 0.0000 0.0000 0.0000
Ke 0.0000 0.0000 0.0000
map_Ka maps\room_diffuse.tga
map_Kd maps\room_diffuse.tga
map_bump maps\Map__1_Normal Bump.tga
newmtl 09___Default
Ns 10.0000
Ni 1.5000
d 1.0000
Tr 0.0000
Tf 1.0000 1.0000 1.0000
illum 2
Ka 0.5882 0.5882 0.5882
Kd 0.5882 0.5882 0.5882
Ks 0.0000 0.0000 0.0000
Ke 0.0000 0.0000 0.0000
map_Ka maps\floor_diffuse.tga
map_Kd maps\floor_diffuse.tga
map_bump maps\Map__14_Normal Bump.tga
You are absolutely right. I was trying to load the all the textures manually and didn't even bother to copy the mtl file, however there is a problem that I am having. Now it loads all my textures, except for my normalmaps.
In the console window that pops up it is complaining that it cannot load my normals maps. they are in the /maps folder with the rest and they are even in the mtl file, but for some reason they are not loading. Oh and for some reason the mtl file has renamed all my normalmap files for some reason, but they are all there, and they are in the mtl file, so I do not know why they are not loading.
Here is a quick paste of the first two textures in the mtl file.
# 3ds Max Wavefront OBJ Exporter v0.97b - (c)2007 guruware
# File Created: 02.01.2015 17:10:06
newmtl 02___Default
Ns 10.0000
Ni 1.5000
d 1.0000
Tr 0.0000
Tf 1.0000 1.0000 1.0000
illum 2
Ka 0.5882 0.5882 0.5882
Kd 0.5882 0.5882 0.5882
Ks 0.0000 0.0000 0.0000
Ke 0.0000 0.0000 0.0000
map_Ka maps\room_diffuse.tga
map_Kd maps\room_diffuse.tga
map_bump maps\Map__1_Normal Bump.tga
newmtl 09___Default
Ns 10.0000
Ni 1.5000
d 1.0000
Tr 0.0000
Tf 1.0000 1.0000 1.0000
illum 2
Ka 0.5882 0.5882 0.5882
Kd 0.5882 0.5882 0.5882
Ks 0.0000 0.0000 0.0000
Ke 0.0000 0.0000 0.0000
map_Ka maps\floor_diffuse.tga
map_Kd maps\floor_diffuse.tga
map_bump maps\Map__14_Normal Bump.tga
Re: Coppercube Material Problem
1. It is the Max exporter that renamed the files.
2. Check your current working directory.
3. Change '\' to '/'.
4. Try some things for yourself. For example, substitute file names to see if that is the problem, etc.
2. Check your current working directory.
3. Change '\' to '/'.
4. Try some things for yourself. For example, substitute file names to see if that is the problem, etc.
Re: Coppercube Material Problem
Hi mongoose7,
Yeh I am still having problems getting the normalmaps to work. I think I might leave them for a bit and work on other parts of the game, and come back to them later.
I have tried different settings and exported quite a few times, but having problems. It keeps saying everytime it cannot find the normalmaps.
Hmm I wonder if the engine doesn't like 2k normalmaps.
However thanks you have helped me load my main textures without having manually load them in which helps a lot.
I will conduct more experiments on this later to see if i can get them to work, but want to concentrate on the coding.
Then I can go back and make things look pretty.
I now have houses in my game
The other thing I don't know how to do is to make the same fire that I made in coppercube. I know I have to use the particle system, but I have no idea at the moment, but like the normalmaps that is all just background stuff to the game.
Yeh I am still having problems getting the normalmaps to work. I think I might leave them for a bit and work on other parts of the game, and come back to them later.
I have tried different settings and exported quite a few times, but having problems. It keeps saying everytime it cannot find the normalmaps.
Hmm I wonder if the engine doesn't like 2k normalmaps.
However thanks you have helped me load my main textures without having manually load them in which helps a lot.
I will conduct more experiments on this later to see if i can get them to work, but want to concentrate on the coding.
Then I can go back and make things look pretty.
I now have houses in my game
The other thing I don't know how to do is to make the same fire that I made in coppercube. I know I have to use the particle system, but I have no idea at the moment, but like the normalmaps that is all just background stuff to the game.
Re: Coppercube Material Problem
Hi mongoose,
Found out why the normalmaps don't load. irrlicht apparently doesn't like any filenames with underscore or spaces.
If you rename them in the mtl file they will load.
However the normalmaps look rubbish for some reason. I am going to post this in a separate post, as it is a problem.
Found out why the normalmaps don't load. irrlicht apparently doesn't like any filenames with underscore or spaces.
If you rename them in the mtl file they will load.
However the normalmaps look rubbish for some reason. I am going to post this in a separate post, as it is a problem.
Re: Coppercube Material Problem
Hi Asimov, that filenames with underscores or spaces are not accepted is probably a bug (unless .obj/.mtl format never allows them). It's related to a similar bug in the past (http://irrlicht.sourceforge.net/forum/v ... =7&t=48090). I once started working on that until I realized there are a lot flags ignored so far and I never found time to investigate how to handle (or ignore) those. And I found another bugs while looking at the code that it sets the materialtype wrong if the filename starts with a number (*sigh*). It's all stuff I wish I could work at, but not seeing any chance currently that I'll find time for that.
Also can't help with normalmaps, as I've not worked with those so far (I tried once a for a short time, but gave up... but that was back when I was just starting to work with Irrlicht and had no clue about anything 3D).
Also can't help with normalmaps, as I've not worked with those so far (I tried once a for a short time, but gave up... but that was back when I was just starting to work with Irrlicht and had no clue about anything 3D).
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: Coppercube Material Problem
Hi CuteAlien,
It is not a big problem to rename files as most of my models only use one diffuse, and a normalmap, apart from the scene I have imported into my game which has multiple models and so 6 normalmaps were needed here.
It is just it took me a while to work out whey they were not loading the normalmaps in, and obviously it is down to the name.
Unfortunately it is not a case of just renaming the textures in 3ds max as the obj exporter automatically inserts these underscores and spaces.
However a few minutes with notepad+ and I can rename them all in the mtl file, now I know that is the problem.
Thanks,
Now I am off to work out how to add the 2D elements to my game heh heh.
It is not a big problem to rename files as most of my models only use one diffuse, and a normalmap, apart from the scene I have imported into my game which has multiple models and so 6 normalmaps were needed here.
It is just it took me a while to work out whey they were not loading the normalmaps in, and obviously it is down to the name.
Unfortunately it is not a case of just renaming the textures in 3ds max as the obj exporter automatically inserts these underscores and spaces.
However a few minutes with notepad+ and I can rename them all in the mtl file, now I know that is the problem.
Thanks,
Now I am off to work out how to add the 2D elements to my game heh heh.