Hello there.
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.
Model format that links textures by itself.
-
- Posts: 88
- Joined: Tue Jul 29, 2008 11:48 am
Re: Model format that links textures by itself.
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?Repgahroll wrote:Hello there.
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.
My company: http://www.kloena.com
My blog: http://www.zhieng.com
My co-working space: http://www.deskspace.info
My blog: http://www.zhieng.com
My co-working space: http://www.deskspace.info
-
- Posts: 88
- Joined: Tue Jul 29, 2008 11:48 am
Re: Model format that links textures by itself.
For sure!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?
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 .
Thank you very much!
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.
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.
My company: http://www.kloena.com
My blog: http://www.zhieng.com
My co-working space: http://www.deskspace.info
My blog: http://www.zhieng.com
My co-working space: http://www.deskspace.info
-
- Posts: 88
- Joined: Tue Jul 29, 2008 11:48 am
By the way... two features that the b3d format doesn't have and would very useful:
-two-sided normals
(i have to duplicate the normals in blender and flip the twins)
-search textures in other directories
(for example, to have a structure like 'data/models' and 'data/textures')
EDIT: Useful tutorial, just a little bit too late
-two-sided normals
(i have to duplicate the normals in blender and flip the twins)
-search textures in other directories
(for example, to have a structure like 'data/models' and 'data/textures')
EDIT: Useful tutorial, just a little bit too late
-
- Posts: 88
- Joined: Tue Jul 29, 2008 11:48 am
it's (going to be) my portfolio page, but atm I'm still preparing some more artworks and tutorials before opening the page.Repgahroll wrote:I was looking your blog...
Man! look these nice textures:
Man! Seriously, i can't wait to see other stuff like cars etc. In low-poly models, good textures are everything
Sorry to steal bandwith from your site .
blog.zhieng.com is my blog
thanks.
My company: http://www.kloena.com
My blog: http://www.zhieng.com
My co-working space: http://www.deskspace.info
My blog: http://www.zhieng.com
My co-working space: http://www.deskspace.info