OBJ mesh groups

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
CheeryLee
Posts: 7
Joined: Wed Jan 06, 2016 10:31 am

OBJ mesh groups

Post by CheeryLee »

Hello!
I have an OBJ mesh. How can I use subobjects of main model?
For example, in Unity I can import my mesh and work with all components of it (car model has wheels, mirrors etc).
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: OBJ mesh groups

Post by CuteAlien »

Each meshpart with an own material is in it's own meshbuffer. You can access those from the mesh interface.
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
CheeryLee
Posts: 7
Joined: Wed Jan 06, 2016 10:31 am

Re: OBJ mesh groups

Post by CheeryLee »

CuteAlien wrote:Each meshpart with an own material is in it's own meshbuffer. You can access those from the mesh interface.
Give a couple of examples, please.
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: OBJ mesh groups

Post by CuteAlien »

IMeshSceneNode::getMesh to get the mesh: http://irrlicht.sourceforge.net/docu/cl ... _node.html
IMesh::getMeshBuffer to access a meshbuffer by index: http://irrlicht.sourceforge.net/docu/cl ... _mesh.html

Not sure if you need any other information. Depends on what you are actually planning to do with those meshbuffers...
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
CheeryLee
Posts: 7
Joined: Wed Jan 06, 2016 10:31 am

Re: OBJ mesh groups

Post by CheeryLee »

Probably it's not what I want.
I have the main model. When it's loaded, debug writes "loaded group start" and name of subobjects. So, how can I manipulate them?

UPD: This is my OBJ mesh with subobjects. I want to control them separately.
Image
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: OBJ mesh groups

Post by CuteAlien »

Yeah, probably not doing what you want. Meshbuffers don't have names - and you generally don't manipulate them (as in moving them around or so).

Can't tell from just a few names, but probably what you need here is to create scene instead of a single model. I've not worked yet by doing complete scenes in Blender and exporting them, so not sure what might work. Maybe give an collada (.dae) exporter a try.
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
CheeryLee
Posts: 7
Joined: Wed Jan 06, 2016 10:31 am

Re: OBJ mesh groups

Post by CheeryLee »

OK. I will try to separate my model. Thanks for your reply!
Post Reply