My artmature's pivot was centered on itself, not the origin, that's why the animation didnt' work correctly for me. So, I just went into edit mode and moved the bones up, so the pivot was centered on the origin(so that the model in the game would be walking on the ground and not have the body half in the ground-this is what messed up the animation, so in fact it was the skeleton's fault, not the animation).
Anyway, I did need to change line 1304 to the old line that is this:
uv = [face.uv[0], face.uv[1]] #1.0 - face.uv[1]]
To get the UV's to not flip themselves. And it worked thankfully!
Here is the new exporter that works for me, based on yours with that one modification i mentioned above:
They ARE different from the old ones slightly, it will work on the model but it strangely seems to shrink it a bit so they aren't really compatible with the old animations.
dcyoung,
That's grand you managed to calculate the Bones transformation with the new Blender. How did you find that out? I mean I am far from being able to assemble something like this expression:
Well, thank you for the answer, but I meant something slightly different,
I mean where I can find easy to understand info on matrix transformations and such things applicable to computer graphics. I studied matrices, polar and other coordinates during my 1st year in University, but all of that was just the mathematical theory...
Well as I said in a post above, it's still not 100% working properly. The animations are not compatible with the old animations, something is wrong still.
Well, I still dont know why the old/new animations work a little differently, but to get around it i'll just export all new animations with the new exporter, since they do actualy work.
I noticed that that extra keyframe in fact seems like it SHOULD be there, because in blender i really do have 9 keyframes not 8. So perhaps the old exporter was actually skipping one..or something, who knows. I did use the same exact blend files for that export test however.
I just started playing around with cal3d a few days ago, this update (is/was) exactly what I was looking for.
Any chance of changing the struct.pack("ifff...etc" ) to struct.pack("<ifff...etc" ) before this gets rolled into the 2.42 build? It would help us big endian folk.
Still doesn't work quite right for me yet (my animations do not work, and others animations seem to have bones in weird places, could be my own naivety though ), but its a fair amount better than nothing.
btw i noticed that the new soya 0.12 or something announced blender 2.4 support, which means that the cal3d script there should work with 2.4 - dunno if they grabbed the version from here, or if they re-ported it.