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
What are sub meshes?
-
- Greenskin
- Posts: 115
- Joined: Thu Jun 09, 2011 5:41 am
- Location: Melbourne, Australia
- x 5
-
- OGRE Retired Moderator
- Posts: 20570
- Joined: Thu Jan 22, 2004 10:13 am
- Location: Denmark
- x 179
Re: What are sub meshes?
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.
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.
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
-
- Greenskin
- Posts: 115
- Joined: Thu Jun 09, 2011 5:41 am
- Location: Melbourne, Australia
- x 5
Re: What are sub meshes?
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?
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?
-
- OGRE Retired Moderator
- Posts: 20570
- Joined: Thu Jan 22, 2004 10:13 am
- Location: Denmark
- x 179
Re: What are sub meshes?
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.
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.