What are sub meshes?

The place for artists, modellers, level designers et al to discuss their approaches for creating content for OGRE.
Post Reply
Yati
Greenskin
Posts: 115
Joined: Thu Jun 09, 2011 5:41 am
Location: Melbourne, Australia

What are sub meshes?

Post by Yati » Sat Nov 12, 2011 3:26 am

Hi everybody,

I've been playing with the toon shader sample, and I noticed that the model needs to be in sub-meshs to use it.
But I'm not sure what a sub-mesh is.

Are they like separate objects in Maya and you export them both as the one ogre mesh?
Or can you specify the set of faces to be a sub mesh?

Thanks
0 x

User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
Contact:

Re: What are sub meshes?

Post by jacmoe » Sat Nov 12, 2011 4:26 am

A mesh consists of one or more submeshes, which again is linked to materials.
One material: one submesh.
It's not controlled by you. Not directly anyway. :)
0 x
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.

Yati
Greenskin
Posts: 115
Joined: Thu Jun 09, 2011 5:41 am
Location: Melbourne, Australia

Re: What are sub meshes?

Post by Yati » Sat Nov 12, 2011 5:49 am

Thanks for the quick reply,

In the toon shaded sample, the ogre head mesh they use has sub meshes for eyes,earrings, skin and teath. So to make something like that I'd need to put different materials on those part of the mesh in Maya before exporting?
0 x

User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
Contact:

Re: What are sub meshes?

Post by jacmoe » Sat Nov 12, 2011 12:09 pm

Yes, they are different textures / materials. :)
0 x
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.

Post Reply