Textures not showing up in Irrlicht
Textures not showing up in Irrlicht
So I've made my scene in coppercube, and the texturing looks just fine.
But then when I load the scene into Irrlicht, I have this instead
The texture is definitely being loaded and applied, yet for some reason I cannot see it. This seems to be happening on every imported mesh in my scene. I am using .obj files.
Does anyone have any suggestions?
But then when I load the scene into Irrlicht, I have this instead
The texture is definitely being loaded and applied, yet for some reason I cannot see it. This seems to be happening on every imported mesh in my scene. I am using .obj files.
Does anyone have any suggestions?
Re: Textures not showing up in Irrlicht
Play around with the MTL file.
Re: Textures not showing up in Irrlicht
hi,
i think you have forgotten to add a light source or simply turn off lighting.
regards
zerochen
i think you have forgotten to add a light source or simply turn off lighting.
regards
zerochen
Re: Textures not showing up in Irrlicht
I think the problem is, if you specify a bump map, the material type is set to PARALLAX_MAP. If you then specify no lighting, the object appears black because PARALLAX_MAP uses a shader, and the shader expects one or two light sources. The solution would be to remove the bump map or add a light.
Re: Textures not showing up in Irrlicht
Yeah, I'm not sure. The thing is that I definitely have lighting, and I'm not using any effects of any kind. It's just a standard diffuse texture on an obj model. What's also strange is that I've had it working perfectly fine before, but now any mesh I load into coppercube has no texture at all as soon as I load it into irrlicht.
Edit: With some further tests, I've found that it doesn't happen if I set the lighting on the meshes to be dynamic, so it appears to be an issue with the lightmaps. Does anyone have any idea why this would be?
Edit: With some further tests, I've found that it doesn't happen if I set the lighting on the meshes to be dynamic, so it appears to be an issue with the lightmaps. Does anyone have any idea why this would be?
Re: Textures not showing up in Irrlicht
Hi Exuro,
What 3D software are you exporting your scene from.
I had a similar problem when exporting from 3ds max. I had ambient set to black in the obj exporter.
If ambient is set to black then no amount of light will light up your 3d object. Even if you have a texture on it will appear black.
I notice around the bottom of your stool that you have not applied a smoothing group. It looks a little angled, and if you apply smoothing in max that will get rid of this.
What 3D software are you exporting your scene from.
I had a similar problem when exporting from 3ds max. I had ambient set to black in the obj exporter.
If ambient is set to black then no amount of light will light up your 3d object. Even if you have a texture on it will appear black.
I notice around the bottom of your stool that you have not applied a smoothing group. It looks a little angled, and if you apply smoothing in max that will get rid of this.
Re: Textures not showing up in Irrlicht
Hey Asimov!
The models are exported from Maya. I'm something of a rookie at all this 3D modelling business, so I'm just sort of making it up as I go along!
I will look into your suggestions and get back to you, thanks
Edit: I'm not sure about the ambient, but smoothing groups have been applied to the model and it still has this angular look. Do you have much experience with Maya?
The models are exported from Maya. I'm something of a rookie at all this 3D modelling business, so I'm just sort of making it up as I go along!
I will look into your suggestions and get back to you, thanks
Edit: I'm not sure about the ambient, but smoothing groups have been applied to the model and it still has this angular look. Do you have much experience with Maya?
Re: Textures not showing up in Irrlicht
Hi Exuro,
I have no experience with Maya, but quite an expert in 3ds max.
Whether it is max or maya all the polys around the base of the stool have to be in the same smoothing group. It looks like there is no smoothing group applied at the moment.
If you have exported as an obj 3ds max could import it, and then the smoothing groups could be put right.
If you haven't got max. I can quickly add the smoothing groups for you, and re-export to obj for you,but I would need access to your model for that.
I have no experience with Maya, but quite an expert in 3ds max.
Whether it is max or maya all the polys around the base of the stool have to be in the same smoothing group. It looks like there is no smoothing group applied at the moment.
If you have exported as an obj 3ds max could import it, and then the smoothing groups could be put right.
If you haven't got max. I can quickly add the smoothing groups for you, and re-export to obj for you,but I would need access to your model for that.
Re: Textures not showing up in Irrlicht
Check the console output. If it can't find the texture there should be some message about that.
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: Textures not showing up in Irrlicht
Fair enough Asimov. Like I said, I am far from an expert in 3D modelling, but I will look into what you've said!
CuteAlien, it's definitely loading the textures, I know this much. Interestingly, I've been able to get it to work by baking the lightmaps, then setting the models to use no light. For some reason, on the models that aren't working, they continue being lit even with no lighting turned on, and appear lit in irrlicht once loaded in. It's rather odd.
CuteAlien, it's definitely loading the textures, I know this much. Interestingly, I've been able to get it to work by baking the lightmaps, then setting the models to use no light. For some reason, on the models that aren't working, they continue being lit even with no lighting turned on, and appear lit in irrlicht once loaded in. It's rather odd.
Re: Textures not showing up in Irrlicht
When you have no lighting the models will just use the texture. When you enable lighting then it's black - until you add a light to the scene. So you probably have to add a light.
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: Textures not showing up in Irrlicht
There are several lights though? The only lighting that I have enabled on the models is static lightmaps, which I am baking into the level. I still don't see why this is causing my models to show up black.
Re: Textures not showing up in Irrlicht
Hi Exuro,
Not sure about Maya, but in max when you add a material to a model, the ambient light and texture are linked.
I had a problem with one of my models that I imported into irrlicht where a model was showing even when there was no light on.
This was because the obj I exported had ambient light in, but it was too bright, so it was being lit even though there was no light.
On the opposite side. If you model has no ambient light in the obj, it will appear black, even if you add light in the scene.
I wish I could help you with Maya, but I didn't get on with it. Much prefer 3ds max's interface.
Not sure about Maya, but in max when you add a material to a model, the ambient light and texture are linked.
I had a problem with one of my models that I imported into irrlicht where a model was showing even when there was no light on.
This was because the obj I exported had ambient light in, but it was too bright, so it was being lit even though there was no light.
On the opposite side. If you model has no ambient light in the obj, it will appear black, even if you add light in the scene.
I wish I could help you with Maya, but I didn't get on with it. Much prefer 3ds max's interface.
Re: Textures not showing up in Irrlicht
Maybe the light is too weak? I don't know how you create your scene in Irrlicht. Note that there are no lights in obj files - that's just a model format. You need to have a light in your scene. For testing you can use the meshviewer in Irrlicht which adds a light by default. If it doesn't show up there then I guess the texture does not load. In which case you should have an error on the console.
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: Textures not showing up in Irrlicht
I'm not sure we're understanding eachother, I think maybe things have got a bit confused!
I'll try to be clearer;
I've used the level editor coppercube to create my scene in Irrlicht. There are several lights in the scene, and they're perfectly strong enough, as they are visibly illuminating my scene. I'm using static lightmaps baked into my scene by coppercube in order to light my scene, and the lighting looks perfectly good.
However, when I load it in to Irrlicht, the lighting looks nothing like it did in my editor. Sometimes, only a couple of faces of a model are black, other times its the whole model. The textures are definitely loading.
I'll try to be clearer;
I've used the level editor coppercube to create my scene in Irrlicht. There are several lights in the scene, and they're perfectly strong enough, as they are visibly illuminating my scene. I'm using static lightmaps baked into my scene by coppercube in order to light my scene, and the lighting looks perfectly good.
However, when I load it in to Irrlicht, the lighting looks nothing like it did in my editor. Sometimes, only a couple of faces of a model are black, other times its the whole model. The textures are definitely loading.