I have a model made in Blendar exported to b3d along with a png texture, to load the model in irrlicht is very simple, the only annoying thing is that i have to load the texture separately (setMaterialTexture...->getTexture)... Is there a way to make the model file handle the textures? Because in the b3d files theres a line referring to the texture "untitled.png".
It will be very very annoying if i have to link every texture manually in the code .
I have a model made in Blendar exported to b3d along with a png texture, to load the model in irrlicht is very simple, the only annoying thing is that i have to load the texture separately (setMaterialTexture...->getTexture)... Is there a way to make the model file handle the textures? Because in the b3d files theres a line referring to the texture "untitled.png".
It will be very very annoying if i have to link every texture manually in the code .
Thanks in advance.
hmm. all my models (made in blender and exported into .b3d) can load the textures by itself. when you export did you open the image in UV window?
Virion wrote:
hmm. all my models (made in blender and exported into .b3d) can load the textures by itself. when you export did you open the image in UV window?
For sure!
I was doing everything in Blender and the textures was packed inside blend files then i was exporting as png but the link breaks because the packed textures has no extension by default, so the right address is "Untitled" (for example) and not Untitled.png .
The easy fix in this case is to delete the texture extension or add the extension while saving the textures into blend files.
The best thing by the way is to work with external texture files, so such problems are avoided and it's much easier to organize and edit the files, and both the blender model and the ready to use b3d model loads the same texture. I'm used to pack everything inside blend files .
I wrote a tutorial for this http://zhieng.com/tutorials/b3d_texture.html
I'm not sure about the exact way to do this but at least this one works for me. I hope it could help other people as well.