Jump to content

  • Log In with Google      Sign In   
  • Create Account


Endemoniada

Member Since 01 Jul 2003
Offline Last Active Yesterday, 02:44 PM
-----

Topics I've Started

Strange VS2012 Debug Problem

14 July 2014 - 05:32 PM

Hi guys,

 

I don't think this has ever happened before and it's really weird.

 

struct Joint{

char name[32];

int count;

};

 

In my program:

 

Joint* joint=getJoint(...); // i get a good Joint pointer back

if(joint){...

 

Normally when I debug and hover over a struct variable it has a little popup with the member variables. If I hover the variable 'joint' above I now get this:

 

cb=1970235507

ver=1919247468

offszCwd=3435973868

offszCommand=3435973836

ichOutfile=3435973836

offszLibs=3435973836

 

...and when I put it in the watch window it says:

 

joint->count     : class "Joint" has no member 'count'

 

And it doesn't just happen with Joint. I made sure I'm running the debug build, What's going on ?

 

Thanks.

 


Win32 BOOL and bool ?

14 July 2014 - 03:34 PM

Hi guys,

 

In Win32 (Visual Studio) is bool exactly the same as BOOL ?

 

What exactly is BOOL ?

 

typedef int BOOL

or maybe

#define BOOL int

or something else ?

 

I'd rather use bool but want to make sure it's really the same.

 

Thank you.

 


Templates in VS2012 ?

06 July 2014 - 02:38 PM

Hi guys,

 

I've never used STL or templates in my C++ programs so excuse my ignorance. I'm using an SDK (the Autodesk FBX SDK) and it has a function with a template (if that's the right terminology.)

 

When I use it:

 

int count=pScene->GetSrcObjectCount<FbxAnimStack>();

 

...it compiles just fine but I get this error when it links:

 

error LNK2001: unresolved external symbol "public: static class fbxsdk_2015_1::FbxClassId fbxsdk_2015_1::FbxAnimStack::ClassId" (?ClassId@FbxAnimStack@fbxsdk_2015_1@@2VFbxClassId@2@A)

 

Do I have to set up anything in my project to use templates ?

 

Thanks a lot.

 


FBX and Skinned Animation

05 July 2014 - 05:42 PM

Hi guys,

I'm trying to set up a skinned mesh keyframe animation system in my game. I create the mesh/bones in 3ds Max, export via FBX, then use the FBX SDK to get at the data to bring into my game.

I'm pretty sure what I need for a basic system is the following:

base data:
a) vertex positions of the mesh (in it's bind pose)
b) bone weights for each vertex
c) bone hierarchy
d) transform of each bone in it's bind pose

pose data:
a) for each pose, the local rotation of each bone (relative to it's parent).

Then I can smoothly go from one pose to another using interpolation (which I have working.) I'm not concerned with timing yet, I'll leave that for later.

I don't know how the files should be set up. Right now I have my bind pose mesh and bones in one file. Do I make a new file for each pose (or poses in a looped animation) ? Or maybe the poses need to be in the same file as the bind pose because transforms are relative to it ? Do I store each pose in a keyframe ? I'm lost.

I'm still learning how to extract data from FBX files and that's confusing me as well. I have more questions but I'll leave it here for now.

Any help/insight would be great.
 


Inverse Bine Pose

22 June 2014 - 07:48 PM

Hi guys,

I'm having some problems implementing basic skeletal animation. I'm not concerned with skinning at the moment, just bone movements. I understand the concept, but am missing something.

I have a simple setup like this:

root->child

float4x4 transforms[2];

// root
matrixTranslation(&translation,&pose.joints[0].pos); // the pose's root joint position
matrixRotationQuaternion(&rotation,&pose.joints[0].q); // the pose's root joint orientation
matrixMultiply(&transforms[0],&rotation,&translation); // combine

// child
matrixTranslation(&translation,&pose.joints[1].pos); // the pose's child joint position
matrixRotationQuaternion(&rotation,&pose.joints[1].q); // the pose's child joint orientation
matrixMultiply(&temp,&rotation,&translation); // combine
matrixMultiply(&transforms[1],&temp,&transforms[0]); // incorporate parent's transformation
 
// then I would use the transforms I made to transform the actual vertices

I don't know where to take into account the inverse_bind_pose, or if I'm doing it right at all.

 

I also don't understand why there is a position/translation in the pose joint; when the parent joint is rotated doesn't that automatically change the child's position/translation since the imaginary bone between them is rigid ?

I can give more code and structs if needed.

Thanks.
 

edit: title should be Bind pose, not Bine


PARTNERS