I'm trying to create 3D scenes with textures with Blender to use in Irrlicht. Here is a screenshot of the scene in Blender:
https://user.oc-static.com/upload/2017/ ... C3%B6s.png
To use it in Irrlicht, I tried exporting it in OBJ and 3DS formats. In both cases, here is the result in Irrlicht:
https://user.oc-static.com/upload/2017/ ... C3%B6s.png
As you can see, there is a problem. Instead of textures, there is a unique color which is a mix of colors in the texture.
In case it's important, the texture's format is BMP, but I also tried with PNG and JPG.
Why isn't it working? How can I make it work?
PS: Sorry, the images were made to big and I can't get them to the correct size so the whole images aren't visible. To see the complete images, click on the URL under them.
Textures in meshes not working
-
- Posts: 34
- Joined: Sat Jan 21, 2017 6:51 pm
- Location: Duckburg
- Contact:
Re: Textures in meshes not working
Could be 2 things going wrong. First is something uv-mapping. Second is something with textures. When wrong uv-mapping then this might be the green part of your texture (maybe with slightly different lighting on top). When texture - maybe the color in Irrlicht is not the texture at all, but the material-color isntead.
Start by looking at the .mtl file when you export as .obj files. That is where the textures are written into. Is the correct texture mentioned in there? Also take a look at the console log when starting your application if it shows any errors (like missing texture warnings).
If it's wrong uv's... more tricky. Basically if you did set them correct in Blender then the export usually works. When it's just a plane you might still be able to see if something is wrong by checking uv's directly in the .obj format (it's a text-based format, so it's possible to read it...).
Can't tell much more without having concrete test-case (aka code and models).
Start by looking at the .mtl file when you export as .obj files. That is where the textures are written into. Is the correct texture mentioned in there? Also take a look at the console log when starting your application if it shows any errors (like missing texture warnings).
If it's wrong uv's... more tricky. Basically if you did set them correct in Blender then the export usually works. When it's just a plane you might still be able to see if something is wrong by checking uv's directly in the .obj format (it's a text-based format, so it's possible to read it...).
Can't tell much more without having concrete test-case (aka code and models).
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