What are sub meshes?

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

What are sub meshes?

Post by Yati »

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
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179

Re: What are sub meshes?

Post by jacmoe »

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. :)
/* 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
x 5

Re: What are sub meshes?

Post by Yati »

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?
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179

Re: What are sub meshes?

Post by jacmoe »

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