Animation

Just a little update to let everyone know where I was at. I’ve had a few false starts with how I want to set it up. So, I’m still trying to work out the bone system. However, I’ve gotten plans that I think will work out. Once this system is in place, it should be easy to write the rest of the loaders. Then we can whip out: ASE, 3DS, OBJ, Milkshape Binary, and any others that people want to use.

Good idea, I’ll have to try that out and see if it helps.

Do you think if we would switch the GC to incremental we would see an improvement?

Mark,



It looks very cool. :slight_smile:



Gregg

Committed again this has some significant speed increases. Running into the same issue with many Vector3fs being created. This time it occurs in a matrix multiply. Each vertex of the model is multiplied, creating a new vertex. about 1000 vertices, about 500 times a second, means a lot of garbage. Runs smooth as silk, just has hiccups when the garbage collector kicks in.



Definately an issue we will have to resolve. Maybe tweaking the garbage collector params themselve will help for the time being?

Ok, It’s in! Animation of milkshape now works. Please, test it out as much as possible. Try your hardest to break it. Try all the milkshape files you can come up with.

Well, I seemed to have screwed up my cvs connection while playing with Eclipse, so I need to re-checkout move the changes over and then commit. I’ll do it before I go to bed, but it won’t be up until about 1:00 AM my time.

yeah, this definately gave me a bit of a beating. The hardest thing that I had to accept was I couldn’t get the results I wanted with a 3x3 matrix and a transitional vector. I had to create a 4x4 matrix which I didn’t want to do. But such is life, there is now a Matrix3f and a Matrix4f.



There is a little bit of an issue with culling. But I think it’s do to the fact that the example model I have has the running animation and the model changing location (running forward a little bit). I think the movement of the model is not getting picked up in the bounding sphere so if you track the model and the camera is no longer looking at the original location of the model, it is culled.



However, right now I don’t think that is a problem. Normal (well designed) animations don’t have the animation changing the position of the entire model.



Anyways, it should be up in about 2-3 hours. And you can play all you want with it.



Speaking of which, does anyone have any GOOD milkshape ASCII files to test with? run.txt kinda sucks.

That’s good to hear, especially considering all the effort you poured into it! It also offers me more fodder to test my new main-loop classes on.



As for writing other loaders, I might try to do some. The one problem is that I’m not quite sure how to write one. If I can understand the Milkshape loader/animation system well enough, I’ll see what I can do.

Ok, milkshape animations are all done. I just need to clean up the code, and document. I’ll see if I can get that done tonight and get it into CVS.

Ok, new loader is working and animating. Still have a little ways to go, but making significant progress. things to do before I submit it is make it render faster (using vertex pointers) build the joint animation controllers. (right now it’s using it’s own update method) and clean up the code. It’s a mess.



However, Milkshape should be in and animating before too long. Did anyone want to tackle any other loaders? There are quite a few left to do, and I could use a little help.

Ok! I think I have it! I was really banging my head against the wall trying to figure out how to build a skeletal animation system. Then I realized I was going about it the wrong way. Currently, I was building a Milkshape Model that had two meshes: Head and Torso. Then it had multiple joints (arms, legs, etc). So for animation, I had to assign a subset of vertices from the torso mesh to the leg mesh for instance. Well, that was proving difficult and just not reasonable. So… I have the following idea.



Each node is a joint with vertices (i.e. a TriMesh). Then the joint can be moved, rotated, scaled, etc and it affects the entire TriMesh. This means that we can do things like rag doll physics in the future as well. It also means the current Milkshape loader won’t work.



So, I’m going to start by trying to build a complete skeletal scene graph from the joints, and get that rendering again. THEN animate the joints.



Sorry this is taking so long, but I want the model/animation to work with ANYTHING we throw at it, and I think this will allow for some great real-time effects.

Alrighty, after a little break and catching of my breath. I’m redoing the milkshape loader. While the previous one works great for static models, what I wanted to do just wouldn’t work with the way I was loading it. So, I’m am doing something completely different. Bare with me, this is hard stuff. :?