# TheGoozah

Member

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!

6. ## Getting started with AI

Hey, i'm rather new in game development and I'm working on my second large project (student). I'll have to program some "basic" AI soon and when I looked at your code I saw an interesting thing. Your commands have their own class. This is a very interesting fact for me. Why did you choose to create a command class? Isn't it more interesting to work with a command manager, which have several states and function to handle everything. And let the command manager work togheter with a unit manager for example. Not sure... but that was my first idea/concept. I def want to get into your choice of doing it like that. Cheers!
7. ## Best way to load a mesh

Never heard of a XML parser... is it, like Krohm say, difficult to write? I'll def look into several interesting formats, because i'm not that happy with the OBJ parser we had to read. I like the idea of baked materials etc. instead of parsing through a file, extract every bit of information and trying to get it all work together. Atm it is not that important, but in 4 months we'll have to write our own engine. I would like to support a meshformat that is easy to use for the developer, not to heavy for the engine (loading time) and has all the necessary things. I thought studios would have inhouse formats and plug-ins/software for their stuff, but I can't afford writing my own. I don't even qualify, because i have no experience creating my own formats.
8. ## Best way to load a mesh

Hello, I'm a college student which focuses on game development. At the moment we are learning DirectX. This week we had to create a OBJ parser for reading .obj files into a mesh. Our teacher said this wasn't an easy topic and a .obj parser is heavy for in game use. This made me wonder, what is the best way to load a model into an engine? How do programmers in the industry do this? What's the standard today?
9. ## How to separate my game engine and my game?

I'm a beginning C++ programmer myself, so I can't really help you out with all the technical aspects. But at college, where I study, a group of teachers handed us there own game engine. As far as I can talk about it all the engine parts are seperate classes. Like previous posters said. Then we have 1 file, the main game part, with some functions in it (e.g. GameCycle, GameInitialzer, etc). All the student has to do is build a project, copy/paste the files into the project folder, do a find-and-replace on 3 files (replace X with projectname) and write their own gamecode. I don't say it is the best way, and it is a good and safe way to handle memory (and also performance), but it is in fact a great educational way of learning C++. I don't know how larger commercials engines work exactly, but as far as I know they work with seperate classes, wherefrom a singleton is created in the main-class (e.g inputstatemanager, rendering manager, etc.) So why not writing all the rendering code in a seperate class for example? It is surely an interesting topic to talk about!!