I have some problems with the normals.
Here's the deal:
I developped a facial mesh in blender.
I exported with reimpell script preview-latest and see it mesh viewer and it was ok.
Problem:
Then I added some vertex keys animation and I tryed it facial_demo (that comes with ogre) and in the meshviewer and I couldn't see the materials in the mesh. It becomes black... or maybe very very dark, because I've added some red and I can see a dark red.
I can see it moving (I can see the information aboutr FPS) but I can't see the materials of the mesh.
When I'm running the Reimpell script, I also get this "Warning: error in normalize! Face of mesh "facial" too small."
I checked the normals in blender and they are outside. I've tryed to put this code but is still not working. Here's what I have done:
void createScene(void){
// Set ambient light
mSceneMgr->setAmbientLight(ColourValue(0.5, 0.5, 0.5));
// Create a light
Light* l = mSceneMgr->createLight("MainLight");
l->setPosition(20,80,50);
l->setDiffuseColour(1.0, 1.0, 1.0);
// Create a light
l = mSceneMgr->createLight("MainLight2");
l->setPosition(-120,-80,-50);
l->setDiffuseColour(0.7, 0.7, 0.6);
MeshPtr mesh = MeshManager::getSingleton().load("Face.mesh", ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME);
Animation* anim = mesh->createAnimation("manual", 0);
VertexAnimationTrack* track = anim->createVertexTrack(4, VAT_POSE);
manualKeyFrame = track->createVertexPoseKeyFrame(0);
// create pose references, initially zero
for (int i = 0; i < SI_COUNT; ++i){
manualKeyFrame->addPoseReference(poseIndexes, 0.0f);
}
// setup GUI system
mGUIRenderer = new CEGUI::OgreCEGUIRenderer(mWindow,
Ogre::RENDER_QUEUE_OVERLAY, false, 3000, mSceneMgr);
mGUISystem = new CEGUI::System(mGUIRenderer);
CEGUI::Logger::getSingleton().setLoggingLevel(CEGUI::Informative);
Entity* head = mSceneMgr->createEntity("Face", "Face.mesh");
head->setNormaliseNormals(true);
speakAnimState = head->getAnimationState("Ao_calhas");
speakAnimState->setEnabled(true);
manualAnimState = head->getAnimationState("manual");
manualAnimState->setTimePosition(0);
SceneNode* headNode = mSceneMgr->getRootSceneNode()->createChildSceneNode();
headNode->attachObject(head);
mCamera->setPosition(20, -50, 0);
mCamera->setAutoTracking(true,headNode);
(...)
} //createScene(void)
I don't know if that's ok, but I searched for other examples and it was similar to this... I can't find what it's wrong...
I can't continue my work because of this... and where I work, there's no one who can help...
tnx.
