# TheGoozah

Members

9

118 Neutral

• Rank
Newbie
1. ## Map PhysicsBones to ModelBones for Ragdoll (PhysX and DirectX)

Sorry for bumping this thread but I am really desperate in finding my problems. As said before I guess there is something wrong with my Offset and TransformMatrix calculations. So here the snippet isolated: http://pastebin.com/gVTLCrbJ.   Anyone out here having experience with ragdolls or mapping actors to "bones" from an .x file? Maybe one can point me in the right direction regarding formulas or pointing out an mistake in my logic :) Thx guys!
2. ## Map PhysicsBones to ModelBones for Ragdoll (PhysX and DirectX)

Hey, sorry for the late respons. Dirk Gregorius: I am having issues with putting the PhysX actors in the right position. For some reasons the data I get does not match as a direct input for PhysX actors. For the step 1 I put the actors on the correct position at this moment. Doing it your way would make it more difficult at this stage, but your version would be the final version offcourse. So, I know how a ragdoll system should work. But I have issues with writing one myself :). In particular the first step. If I position my actors using this formula: TotalOffset * LocalTransformAnimation I get these results: http://img842.imageshack.us/img842/8779/ragdollissues01.jpg http://img21.imageshack.us/img21/6029/ragdollissues02.jpg My TotalOffset is something like this: TotalOffset = parentOffset * parentOffset * ........... * ownOffset;   Also checked some of the raw data from the .x itself. And found some strange things. 1. The offset of the bone is the offset based from the parent BUT the transform already has transform of the parent. This is kinda weird, why not both the final transform and offset or it's own offset and it's own local transform? 2. When I double check the numbers of the TotalOffset not all of them are correct. Some numbers that need to be 32.901 for exmample are 35.487.   I've been looking into this issue for a while now and haven't come up with a solution. Could someone guide me in solving this issue?   Here you can find some code, in my opinion, related to this problem: http://pastebin.com/QT8sxuUp   PS: Everything works fine for the model itself (raw transform are being passed to a shader that positions the vertices to the right position). It is being animated correctly so there is no issue with the raw data from the .X file I guess (also double checked it with the Assimp Viewer).
3. ## Map PhysicsBones to ModelBones for Ragdoll (PhysX and DirectX)

Hey gamedev,   for a college project I need to create a ragdoll using DirectX and PhysX. I'm still in the first phase of laying out the structure for this ragdoll. At this moment I'm trying to map actors to the bones that are imported together with mesh data. The problem I have at this moment is that I can move my actor to the position of the bone (all offsets + world = worldmatrix). But when I want it to follow the animation, my bone gets translated and rotated (axis) correctly, but my shape doesn't rotate. Only the axis changes. This engine is an engine written by some teachers, so I can't share it here. Also, the architecture is still rough. Here are some snippets of where the issue is.   I hope this is a know issue and someone can help me with this one! It is pretty important for my project.   Thank you in advance guys/girls!! void PhysxBone::MapToBone(MeshFilter* pMeshFilter) { //........................ m_matModelSpace *= m_pBone->Offset; //.................. D3DXMATRIX world; D3DXMatrixIdentity(&world); m_matWorldSpace = m_matModelSpace * world; } void PhysxBone::Update(D3DXMATRIX matKeyTransform) { m_matWorldSpace = matKeyTransform * m_matModelSpace; NxMat34 nPos; PhysicsManager::GetInstance()->DMatToNMat(nPos, m_matWorldSpace); m_pActor->setGlobalPose(nPos); } void PhysicsManager::DMatToNMat(NxMat34& NxMat, const D3DXMATRIX& D3DMat) { NxVec3 vTmp; vTmp = NxVec3(D3DMat._11, D3DMat._21, D3DMat._31); NxMat.M.setRow(0, vTmp); vTmp = NxVec3(D3DMat._12, D3DMat._22, D3DMat._32); NxMat.M.setRow(1, vTmp); vTmp = NxVec3(D3DMat._13, D3DMat._23, D3DMat._33); NxMat.M.setRow(2, vTmp); NxMat.t.set(D3DMat._41, D3DMat._42, D3DMat._43); }
4. ## Setting up Collada DOM 2.4.0 in VS 2010

Oke I've got rid of the "Unknown compiler version" by adding BOOST 1.50 to the project (still was using BOOST 1.47) But I still can't build successful libs... I get some other warnings new. (ps: trying to build the dom project (vc10-1.4) in Visual Studio 2010 in Debug mode In detail: [SPOILER] ... 1> daeIOPluginCommon.cpp 1> daeLIBXMLPlugin.cpp 1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\driverspecs.h(142): error C2008: '$' : unexpected in macro definition 1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\driverspecs.h(294): error C2008: '$' : unexpected in macro definition 1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\driverspecs.h(295): warning C4005: '__' : macro redefinition 1> C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\driverspecs.h(142) : see previous definition of '__' 1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\driverspecs.h(308): error C2008: '$' : unexpected in macro definition 1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\driverspecs.h(309): warning C4005: '__' : macro redefinition 1> C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\driverspecs.h(295) : see previous definition of '__' 1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\driverspecs.h(312): error C2008: '$' : unexpected in macro definition 1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\driverspecs.h(313): warning C4005: '__' : macro redefinition 1> C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\driverspecs.h(309) : see previous definition of '__' 1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\driverspecs.h(316): error C2008: '$' : unexpected in macro definition 1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\driverspecs.h(317): warning C4005: '__' : macro redefinition 1> C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\driverspecs.h(313) : see previous definition of '__' 1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\driverspecs.h(320): error C2008: '$' : unexpected in macro definition 1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\driverspecs.h(321): warning C4005: '__' : macro redefinition .... AND .... 1> domAny.cpp 1>c1xx : fatal error C1083: Cannot open source file: '..\..\src\dae\domAny.cpp': No such file or directory 1> stdErrPlugin.cpp .... [/SPOILER] Please, can someone tell me what these are? Only getting .obj files right now.... Thx in advance!