[Solved] Exporting a .obj from an IMesh?

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
Piter
Posts: 11
Joined: Thu Dec 05, 2013 12:13 am

[Solved] Exporting a .obj from an IMesh?

Post by Piter »

Hi,

I would like to know whether it is possible to export in Irrlicht a .obj from an IMesh or not. And if it can't be done in Irrlicht, do you know any way to do it?
Last edited by Piter on Mon Dec 23, 2013 2:36 pm, edited 1 time in total.
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Exporting a .obj from an IMesh?

Post by CuteAlien »

Yes, check ISceneManager::createMeshWriter. The parameter for an obj meshwriter is EMWT_OBJ. Then you can write the mesh: http://irrlicht.sourceforge.net/docu/cl ... riter.html
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
Piter
Posts: 11
Joined: Thu Dec 05, 2013 12:13 am

Re: Exporting a .obj from an IMesh?

Post by Piter »

Perfect, many thanks. That makes me wonder if it is also possible to write an SMaterial or an ITexture. I've checked the documentation and I haven't found anything about it, so I suppose it's not possible... Anyway, thanks again.
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: Exporting a .obj from an IMesh?

Post by hendu »

The textures used by the mesh will be written to the corresponding .mtl file, when exporting to .obj.
Piter
Posts: 11
Joined: Thu Dec 05, 2013 12:13 am

Re: Exporting a .obj from an IMesh?

Post by Piter »

That's great :) Thank you!
Post Reply