2square
29-09-2008 16:52:04
I am new to OGRE, and am having problems with material which works with Ogre but doesn't work with Mogre.
I have a skinned mesh with a material which I exported out of Blender using the OGRE Mesh Exporter. I was able to display the mesh with the material on OGRE using the following:
Entity *ent = mSceneManager->createEntity("Mannequin", "Mannequin.mesh");
ent->setCastShadows(true);
mSceneManager->getRootSceneNode()->createChildSceneNode()->attachObject(ent);
However, when I display the same mesh using Mogre I get only the default grey material:
Entity ent = sceneMgr.CreateEntity("Mannequin", "Mannequin.mesh");
ent.CastShadows = true;
SceneNode node = sceneMgr.RootSceneNode.CreateChildSceneNode("MannequinNode");
The paths are set appropriately on my resources.cfg, lighting is enabled and I am able to display the other meshes like ninja.mesh, robot.mesh with their material.
The relevant parts in Ogre.log are:
....
11:20:09: Parsing script Scene.material
11:20:09: Parsing script Mannequin.material
11:20:09: Parsing script deferred.material
...
11:20:10: Creating viewport on target 'Simple Mogre Form Window', rendering from camera 'SimpleCamera', relative dimensions L: 0.00 T: 0.00 W: 1.00 H: 1.00 ZOrder: 0
11:20:10: Mesh: Loading Mannequin.mesh.
11:20:10: Skeleton: Loading MannequinArmature.skeleton
11:20:10: WARNING: the mesh 'Mannequin.mesh' includes vertices without bone assignments. Those vertices will transform to wrong position when skeletal animation enabled. To eliminate this, assign at least one bone assignment per vertex on your mesh.
...
I have almost exhausted all possibilities I could think of, and desperately need some fresh perspective to solve this.
I have a skinned mesh with a material which I exported out of Blender using the OGRE Mesh Exporter. I was able to display the mesh with the material on OGRE using the following:
Entity *ent = mSceneManager->createEntity("Mannequin", "Mannequin.mesh");
ent->setCastShadows(true);
mSceneManager->getRootSceneNode()->createChildSceneNode()->attachObject(ent);
However, when I display the same mesh using Mogre I get only the default grey material:
Entity ent = sceneMgr.CreateEntity("Mannequin", "Mannequin.mesh");
ent.CastShadows = true;
SceneNode node = sceneMgr.RootSceneNode.CreateChildSceneNode("MannequinNode");
The paths are set appropriately on my resources.cfg, lighting is enabled and I am able to display the other meshes like ninja.mesh, robot.mesh with their material.
The relevant parts in Ogre.log are:
....
11:20:09: Parsing script Scene.material
11:20:09: Parsing script Mannequin.material
11:20:09: Parsing script deferred.material
...
11:20:10: Creating viewport on target 'Simple Mogre Form Window', rendering from camera 'SimpleCamera', relative dimensions L: 0.00 T: 0.00 W: 1.00 H: 1.00 ZOrder: 0
11:20:10: Mesh: Loading Mannequin.mesh.
11:20:10: Skeleton: Loading MannequinArmature.skeleton
11:20:10: WARNING: the mesh 'Mannequin.mesh' includes vertices without bone assignments. Those vertices will transform to wrong position when skeletal animation enabled. To eliminate this, assign at least one bone assignment per vertex on your mesh.
...
I have almost exhausted all possibilities I could think of, and desperately need some fresh perspective to solve this.