.obj

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
P1SQ4M
Posts: 66
Joined: Sat Sep 19, 2009 1:47 am

.obj

Post by P1SQ4M »

Ok, I modeled something in max or maya, I want to export it as .obj. I do. Now I want to add it into Irrlicht, but it has multipule textures, and the model is on one node. It did export with a .mtl file, but it didn't drag all the images with it like collada. How can I get all my images to display on my mesh?
CuteAlien
Admin
Posts: 10012
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

I don't think .obj supports several materials per polygon. So it's probably the wrong format to use. I don't know much about available Max3D or Maya exporters as I use Blender myself, but I hacked something together so an artist can add lightmaps to .obj files exported from Maya.

This is basically an .obj format with a few extensions so I can use a second texture as lightmap:
http://www.michaelzeilfelder.de/irrlicht.htm#Lightmaps
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
P1SQ4M
Posts: 66
Joined: Sat Sep 19, 2009 1:47 am

Post by P1SQ4M »

Unfortunately I think that link is down.
CuteAlien
Admin
Posts: 10012
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

P1SQ4M wrote:Unfortunately I think that link is down.
Probably a momentary problem. At least works from here.
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
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

obj supports multiple textures per object. There are several texture types defined in the material and at least partially supported by the loader. However, if no texture is exported, chances are high that also the texture coords are not exported. This would make the exported mesh pretty useless then, at least non-fixable on the Irrlicht side.
CuteAlien
Admin
Posts: 10012
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

It supports bump-maps as second texture. Just putting 2 textures on one material is not supported.

Wait a sec... do we talk about multiple textures on one polygon or just multiple textures on the whole object? The latter works just fine.
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
FuzzYspo0N
Posts: 914
Joined: Fri Aug 03, 2007 12:43 pm
Location: South Africa
Contact:

Post by FuzzYspo0N »

it does support per poly texturing, the trouble is the images need to be relative (and if you using a crappy exporter) the images must be where the mtl file says. Look inside the mtl file in notepad type app, and see where its looking.

irrlicht relies on the exporter doing a proper job of adhering to the standards ;)
Post Reply