telatoro, hi guys, now kinda get a small patch for the ASE importer, so im make it work with the physique Just atm having some troubles with some models where im guess are some bones unconnected like with fury The main change was on this function, as those who knows, getting the vertex count on the importer was the trouble, this function uses IPhysiqueInterface class, but also may work directly with IPhysiqueImport from Phyexp.h (wich also i tried first, but i liked the IPhysiqueInterface more) ----------------------------------------------------------------------------- void AsciiImp::FinalizePhysique() { //From the list compiled before we can now build the physique data BOOLEAN itsOK = true; for( int i = 0; i < physList.size(); i++ ) { Phys * p = physList[i]; if( p ) { TSTR nodeName = p->GetNodeName(); INode * meshNode = GetNodeByName(nodeName); //ERRORBOX("Reading %s , vert: %d", p->GetNodeName(), p->GetBonesNames().size()); if(meshNode) { CreatePhysiqueModifier(meshNode); //Use Physique Interface IPhysiqueInterface* phyint = new IPhysiqueInterface(); vector bonesNames = p->GetBonesNames(); if (bonesNames.size() > 0) { //make the vertexlist with the 1st bone TSTR boneName = bonesNames[0]; INode* pBoneNode = GetNodeByName(boneName); phyint->Initialize(meshNode, pBoneNode); phyint->AttachToNode(meshNode, pBoneNode); //Update the work --the following line is the big secret -- meshNode->EvalWorldState(0); if (bonesNames.size() == phyint->GetVertexCount(meshNode)) { for (int j = 0; j < bonesNames.size(); j++) { TSTR boneName = bonesNames[j]; pBoneNode = GetNodeByName(boneName); phyint->SetVertexBone(meshNode, j, pBoneNode); } //Update the work meshNode->EvalWorldState(0); } else { ERRORBOX("diff #bones %d & #vertex %d ", bonesNames.size(), phyint->GetVertexCount(meshNode)); } } delete phyint; } delete p; } } physList.clear(); } ----------------------------------------------------------------------------- Also im changed a bit the function to create the modifier with some thing i found on internet, not sure if this also helps but for any case i left here. ----------------------------------------------------------------------------- /** Creates a DerivedObject from object. If object is a DerivedObject, a derived object using the same base object and the same modifiers is created. If not, a derived object with object as base object is created (not modifiers are assigned in this case)*/ IDerivedObject* createDerivedObject(Object* object) { IDerivedObject* createdDerivedObject = 0; if ((object->ClassID() == derivObjClassID) || (object->ClassID() == WSMDerivObjClassID)) { Object* baseObject = object; // Modifiers are applied to the object, acquire the base object while (baseObject->SuperClassID() == GEN_DERIVOB_CLASS_ID) { IDerivedObject* derivedObject = (IDerivedObject*)baseObject; baseObject = derivedObject->GetObjRef(); } // Object is a derived object IDerivedObject* derivedObject = (IDerivedObject*)object; createdDerivedObject = CreateDerivedObject(baseObject); for (int i = 0, count = derivedObject->NumModifiers(); i < count; ++i) { createdDerivedObject->AddModifier(derivedObject->GetModifier(i)); } } else { // Create the derived object for the target and the modifier createdDerivedObject = CreateDerivedObject(object); } return createdDerivedObject; } Modifier * AsciiImp::CreatePhysiqueModifier(INode *pNode) { //We create here the Physique Modifier Object* ObjectPtr = pNode->GetObjectRef(); if (!ObjectPtr) { MessageBoxA( 0, "ObjectPtr is NULL", "ERROR CreatePhysiqueModifier", 0 ); return NULL; } IDerivedObject *DerivedObjectPtr = createDerivedObject(ObjectPtr); Modifier * mod = (Modifier*)CreateInstance( OSM_CLASS_ID, Class_ID(PHYSIQUE_CLASS_ID_A, PHYSIQUE_CLASS_ID_B) ); if( !mod ) { MessageBoxA( 0, "CreateInstance failed", "CreatePhysiqueModifier", 0 ); return NULL; } DerivedObjectPtr->AddModifier(mod); pNode->SetObjectRef(DerivedObjectPtr); return mod; } -----------------------------------------------------------------------------