Anim8or Community

Please login or register.

Login with username, password and session length
Advanced search  


Ian Ross has just released a book on Anim8or. It's perect for a beginner and a good reference for experienced users. It contains detailed chapters on every aspect, with many examples. Get your own copy here: "Anim8or Tutorial Book"

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - SubDrag

Pages: [1] 2 3
Sometimes my tool works for an8 to FBX.

General Anim8or Forum / Re: Does rigging export with an Anim8or model?
« on: February 26, 2016, 10:19:33 am »
My tool can convert .an8 to FBX including rigging.  XSI can import it.  May have caveats, but worth a shot.

General Anim8or Forum / Re: liban8 issues
« on: December 15, 2015, 07:29:08 pm »
It's hard to say, but admittedly you use a lot of functions I don't use.  If it helps, try examining my source. I parsed out the data it gave me and used it all myself. It's all recursive nodes, so maybe not at the right spot.

General Anim8or Forum / Re: liban8 issues
« on: December 13, 2015, 08:36:24 pm »
Yeah that's the header.  It's in An8File.cpp.   Perhaps it can't find that file, try adding everything to your project.    Although in visual studio, you'd be able to compile, but not link, if it could find the .h but didn't find the .cpp

General Anim8or Forum / Re: liban8 issues
« on: December 13, 2015, 03:44:43 pm »
Do you also have the .cpps in the folder?  They are where the implementation is stored (if you don't use the lib).  In mine I kept it all in the liban8 folder, and #include it that way. 

I used VS2008 for Obj2An8.

General Anim8or Forum / Re: liban8 issues
« on: December 13, 2015, 10:23:27 am »
Are you using visual studio?  I think in my program I just used the .cpp/.h files directly and worked fine, never tried the .lib.  Not sure what version visual studio, but the lib should match your version, and make sure MD, etc, match your settings in project properties - C/C++ - Code Generation - Runtime Library.  You can see it successfully used in my tool ( )...maybe will help.  It should be similar in whatever compiler you use, I imagine, just including the cpp/h.

Basically just:
#include "Liban8/An8Loader.h"

An8File an8File;

   if( an8File.LoadFile(string((LPCTSTR)(inputFile))) == false)
      return false;

ASL Scripts / Re: BVH File Import into Anim8or
« on: July 26, 2015, 04:13:46 pm »
Thanks Steve, that makes sense in terms of why they are different, though I hadn't realized bone definitions used rotations instead of effective orientations.

ASL Scripts / Re: BVH File Import into Anim8or
« on: July 24, 2015, 10:11:30 am »
**I should note this working in bvh2anim8or, but I'd like to understand why mine isn't working.

Actually it only works for simpler models though.  More complicated and I can't get the bone orientation correct (nothing to do with actual rotation keyframes, just talking bone structure now).    I am using normalized Quat::RotateFromTo (root bone at 0,1,0) of absolute position of current - absolute position of previous, to go from previous bone to current, and assign that quaternion, but clearly something goes wrong at some point, to go from previous bone to next.  Maybe your logic is slightly different somehow?

The issue seems to be (in my code) that sometimes the quaternion is backwards. 

For example,
orientation { (-0.164697 0.000000 -0.000000 0.986344) } Wrong
orientation { (0.16470 0.00000 0.00000 -0.98634) } Right

When startLink = {x=0.00000000 y=40.600006 z=-532.50000 ...}
And endLink = {x=0.00000000 y=-54.827942 z=-210.49976 ...}

Then Quat RotFromTo startLink to endLink basically

Quat MUST_USE_RESULT Quat::RotateFromTo(const float3 &sourceDirection, const float3 &targetDirection)
   float angle = sourceDirection.AngleBetweenNorm(targetDirection);
   assume(angle >= 0.f);
   // If sourceDirection == targetDirection, the cross product comes out zero, and normalization would fail. In that case, pick an arbitrary axis.
   float3 axis = sourceDirection.Cross(targetDirection);
   float oldLength = axis.Normalize();
   if (oldLength == 0)
      axis = float3(1, 0, 0);
   return Quat(axis, angle);

Code is:
if (length > 0)
if (realParent == NULL) // From TopJoint
            quat = Quat::RotateFromTo(float3(0,1,0), bone->boneEnd->positionAbsolute.Normalized());

            length = bone->boneEnd->positionAbsolute.Length();
            float3 startLink = realParent->boneEnd->positionAbsolute - ((realParent->boneStart == 0) ? float3(0,0,0) : realParent->boneStart->positionAbsolute);
            float3 endLink = bone->boneEnd->positionAbsolute - bone->boneStart->positionAbsolute;
            quat = Quat::RotateFromTo( startLink.Normalized(), endLink.Normalized() );

            length = (bone->boneEnd->positionAbsolute - bone->boneStart->positionAbsolute).Length();
         quat = Quat(0, 0, 0, 1);

ASL Scripts / Re: BVH File Import into Anim8or
« on: July 03, 2015, 03:00:48 pm »
Hi NickE, that is an improvement to the version I had, but there is still an issue actually in conversion.

This is what the bvh looks like in bvhacker:

In the file you posted, the legs cross or something weird at some point:

ASL Scripts / Re: BVH File Import into Anim8or
« on: July 03, 2015, 09:00:51 am »
Can you look at this bvh to see why it's not cooperating like your two examples, using your tool.

Here is for sure a valid bvh, I can look at it fine in bvhacker, but it looks off in anim8or after conversion.

ASL Scripts / Re: BVH File Import into Anim8or
« on: June 19, 2015, 08:25:00 am »
That's great Steve, I'm close, but no cigar on the port! It would be great, then can get animations in, and out, of anim8or between it and FBX (At least...the simple ones I do).

@NickE, I am having problems getting your tool to work.  This one crashes anim8or when converted, can you take a look:

ASL Scripts / Re: BVH File Import into Anim8or
« on: June 16, 2015, 09:17:37 pm »
Hi again, I was able to get what I wanted to do, though a different way, but it is not working perfectly.  I think there is a problem with your BVH convertor also, as I was trying to see if it did better.  It does not do well on my BVH test. 


BVH attempt:

My attempt (using my tool):

ASL Scripts / Re: BVH File Import into Anim8or
« on: June 15, 2015, 08:57:46 pm »
Thanks, that is complicated, I'll have to try and make sense of it.  FBX is left-handed, XYZ euler.  Skeleton translation is relative to parent.  It's probably the same as BVH, though I'm not that familiar with BVH.  As you mentioned, just the last step is heavily thwarting.

Perhaps someone can help, I feel like sort of closer, perhaps the piece I am missing is still, how anim8or stores its angles.

I have a quaternion at a bone (absolute quaternion, basically, I trawled the hierarchy), that I'm doing rotation in anim8or of:
     x   0.52576530   float
     y   0.084034257   float
     z   0.40772036   float
     w   0.74180400   float

Off of this bone, in FBX format, a rotation (Euler XYZ of 58.675510 y=33.600880 z=38.327244), yields in anim8or 30 60 90, which matches and works great.  However, converting to anim8or also always yields a second solution for anim8or,  in this case, -150 120 -140.  I cannot figure out why in anim8or, that set of angles yields a different rotation visually.  The quaternions should be identical (or 360 degrees off).  Maybe someone can explain why those two rotations do not yield identical results about that bone, that would be very helpful!

I've attached the sample an8, go to sequence mode, then use this part:

ASL Scripts / Re: BVH File Import into Anim8or
« on: June 14, 2015, 08:14:30 pm »
Ah, I'm talking about the actual animation track (got the bones proper, I use a bone, and then a 0-sized bone in anim8or).  I'm not sure about spec, I use the FBX SDK api, but FBX is stored as relative offsets by joint, and each rotation at a joint is Euler X Y Z (in that order).  The translation to and from anim8or of skeleton I have working.  It's the animation keyframe tracks that I am trying to convert.  In FBX, each joint rotation is stored in euler angles are not relative to the bone, they are normal, unlike anim8or which appears relative to the bone, which appears to me to be 3 angle rotations, of a coordinate axis aligning with the bone (essentially, transformation of (0,1,0) into bone orientation), which seems like multiplication of 3 axis-angles or something. 

I don't see it in SMDA2Anim8or, but it must be in the bvh one somewhere, the angles of the animation at each joint, into anim8or format

For example, a 0-sized bone with absolute resolved orientation quaternion  of:
x   0.52577096   
y   0.084030904   
z   0.40771002   
w   0.74180597   
, and euler rotation 58.6767 33.600 138.3259 in FBX.  That translates to in anim8or 30 60 40 (this is goal, to find out these numbers using math for general case).  Well, the part I am trying to figure out is how to automatically go from those Euler angles, with known orientation that I already figured out, into anim8or animation angles.

Pages: [1] 2 3