September 09, 2010, 05:51:26 AM
News: As promised, here is another update of the editor with improvements and bug fixes
Pages: [1] 2
Print
Author Topic: Mocap  (Read 2904 times)
Tamarin
Full Member
***
Posts: 208


View Profile
« on: January 09, 2009, 01:19:47 PM »

Hi all,


I haven't shown anything new in a while, but I want you to know that I have been learning new things Wink I do not consider myself a very good animator so I have started playing around with free mocap files floating around the internet. There are tonnes of them out there and Blender imports them fine. I have had some issues, but most of them are resolved, I even re-built some of the Borian mesh to animate better( big issue with the pronated wrists in my original design). This is a learning experience for me, and I am a slow learner Wink If anyone finds some interesting actions in the .bvh format, that are free to use, and you might like to see in game, let me know, and I'll see what I can do. I'll try to get a model with a few actions on here this weekend. Very excited about all the progress Jochen has been making on the server Grin
Logged
Jochen Stier
Administrator
Sr. Member
*****
Posts: 498


Founder/Programmer

jochen.stier@gmail.com
View Profile
« Reply #1 on: January 09, 2009, 05:31:25 PM »

I have never heard of mocap, but then I am not animator. Does a bvh files contain a skeleton ?
Logged
Tamarin
Full Member
***
Posts: 208


View Profile
« Reply #2 on: January 10, 2009, 01:16:48 PM »

Sorry mocap is short for motion capture. If you have ever seen those guys running around in leotards with little balls all over them, then you know what I'm talking about. The bvh file is one common file format that stores the data, and conveniently,  Blender supports. It is basically an animated skeleton, but there is no standard to the number and location of bones. This is overcome by parenting the mesh skeleton to the mocap skeleton through empties.

I should also add that I am looking at weight painting to perform more natural movements. In the past I have assigned weights of 1(full on) or 0(full off) to each vertex related to a bone. With MD5 I believe that a vertex can be assigned a weight like .5 or .374 or whatever, to allow for more natural pose. The total weight is shared by multiple bones, or the vertex is controlled by multiple bones Wink if that makes sense.
Logged
Jochen Stier
Administrator
Sr. Member
*****
Posts: 498


Founder/Programmer

jochen.stier@gmail.com
View Profile
« Reply #3 on: January 10, 2009, 03:47:29 PM »

Yeah of course, Motion capture. That makes sense now. That is probably the most efficient way to animate a skeleton. If you think that it would be better if Geist3D supported bhv directly then let me know.

Quote
I should also add that I am looking at weight painting to perform more natural movements. In the past I have assigned weights of 1(full on) or 0(full off) to each vertex related to a bone. With MD5 I believe that a vertex can be assigned a weight like .5 or .374 or whatever, to allow for more natural pose. The total weight is shared by multiple bones, or the vertex is controlled by multiple bones if that makes sense.

I noticed that in the previous Borian model. Yes, MD5 does support multiple weights for each vertex. If you have a close look at the shambler, you can actually see this in action. It will certainly make the animation much more natural. Can't wait to see what you are going to come up with!
Logged
dance
Full Member
***
Posts: 102


Producer/3D Modeling

barrys60@hotmail.com
View Profile WWW Email
« Reply #4 on: January 11, 2009, 01:28:04 AM »

I was thinking C3D would be a better option seeing it is public domain and there is a lot of documentation to implement it into Geist3d on their C3D Website. But i guess it all depends C3d is a optical file format that describes the positions of the marker data in real world coordinates and the BVH file format is a skeleton file format that describes the mocap data as a skeleton hierarchy. Although there are limitations to the BVH format like the lack of a full definition of the basis pose (this format has only translational offsets of children segments from their parent, no rotational offset is defined), it also lacks explicit information for how to draw the segments but that has no bearing on the definition of the motion. Which ever Motion Builder can export to both C3D or BVH so it is about the same to me.

« Last Edit: January 11, 2009, 02:46:14 AM by dance » Logged
Tamarin
Full Member
***
Posts: 208


View Profile
« Reply #5 on: January 11, 2009, 03:43:05 AM »

Here is a new md5mesh and md5anim using bvh.

http://www.mediafire.com/?sharekey=cae3abfced201390d2db6fb9a8902bda

It's short but more of a test than anything.

I also posted a short video on youtube.

http://www.youtube.com/watch?v=1K37AUoLbIs

Jochen, if you could show me how to get this into Geist Editor I would be very happy. I'm missing something simple Wink I found a new exporter for Blender that appears to be exporting some bounding box numbers but who knows if they are right Grin

I'll take a look at Motion Builder.
« Last Edit: January 11, 2009, 03:50:54 AM by Tamarin » Logged
Jochen Stier
Administrator
Sr. Member
*****
Posts: 498


Founder/Programmer

jochen.stier@gmail.com
View Profile
« Reply #6 on: January 11, 2009, 01:16:25 PM »

The YouTube video looks nice! It would be cool to have a character at the end that contains animations for all of the major control keys, i.e. w, a, s, d and maybe CTRL-X for crouching.

I have just taken the editor apart to rework how it maintains bounding boxes and matrices. It will be down for a while. Once I got it working again, I will work on importing the Borian again. If the bounding boxes are correct then everything should work out fine .
« Last Edit: January 11, 2009, 01:32:33 PM by Jochen Stier » Logged
Jochen Stier
Administrator
Sr. Member
*****
Posts: 498


Founder/Programmer

jochen.stier@gmail.com
View Profile
« Reply #7 on: January 18, 2009, 04:46:03 PM »

I tried to import the new Borian character today. The first thing I noticed is that he is now standing along the y-axis and not the z-axis, as before. In Geist3D, the upward direction is along the positive z axis, so the character should be rotated.

I also think there are some problems with the normal as you can see from the image. I do have to investigate this a little bit more though. The problem is probably in how Geist3D computes the Normals in the first place. You were right that the new exporter includes the bounding boxes. I am assuming that they are ok, but I cannot tell until the character is standing upright.





« Last Edit: January 18, 2009, 09:36:43 PM by Jochen Stier » Logged
Jochen Stier
Administrator
Sr. Member
*****
Posts: 498


Founder/Programmer

jochen.stier@gmail.com
View Profile
« Reply #8 on: January 19, 2009, 09:52:31 AM »

Here is another pic with the previous Borian and the new one side-by-side. The meshes are colored using the vertex normals that Geist3D computes when the model is imported. The normal and diffuse textures are completely ignored here. As you can see, the coloring of the older mesh to the left is more continuous but the new one on the right has some strange discontinuities around the chest and joints. I will go through my code a bit and add some
checks, but I suspect that there is a problem in the triangle mesh.



The cause could be degenerate triangles where all three vertices are the same. In this case, the tris are never rendered and their normals are undefined. Another problem could be a wrong vertex ordering, but in this case the triangles should be culled. Anyways, I will know more soon.

Logged
Tamarin
Full Member
***
Posts: 208


View Profile
« Reply #9 on: January 19, 2009, 03:04:02 PM »

I like the original mesh better, it follows the muscle topology better, the reason for changing the mesh was to achieve better deformations. The last model with the jump was exported sideways because the mocap data is not well implemented in Blender.The bvh imports fine into blender and would work well for an animation inside of Blender. When I tried to bake the mocap data to my Borian armature for tweaking and exporting to the md5 format the "wheels fell of the bicycle." Some error with quat math? I'm not sure. For now I am going to animate by hand and revisit the mocap at a later date.

Here is the most recent version with a walk cycle and new skin.

http://www.mediafire.com/file/mkwxz425zzt/jan19borian.rar

http://www.youtube.com/watch?v=qh1lnsWx2KM

A little jerky but it will get better Smiley

That error with the normals is not from a new UV layout and an old normal map is it?
« Last Edit: January 19, 2009, 03:08:48 PM by Tamarin » Logged
Tamarin
Full Member
***
Posts: 208


View Profile
« Reply #10 on: January 20, 2009, 12:21:02 PM »

Here is a new update Smiley I know! this will be the last time I change the UV layout. I found two cuts in the previous mesh were bothering me. One around the neck, and one around the chest. I think this version looks much cleaner.

http://www.mediafire.com/file/ww3edlijnhk/jan20borian.rar
Logged
Jochen Stier
Administrator
Sr. Member
*****
Posts: 498


Founder/Programmer

jochen.stier@gmail.com
View Profile
« Reply #11 on: January 20, 2009, 07:13:19 PM »

I haven't had a chance to look at the second character yet, but I also noticed the discontinuities. In any case this mesh looks a lot nicer than the one you made for the mocap. I don't know anything about how to make the animations, but I think you should be able to attach the vertices to multiple bones with this mesh as well. You can adjust the weights so some bones have less influence, although I do not know how to do that with Blender. I have been able to import jan1boarin.rar and it animates and shades nicely. I did notice that the animation has no forward movement in the root bone. There is an up and down movement according to the walk, but in Geist3D the character will not move forward unless there is a displacement along the x-axis of the root bone.

The way it works is that Geist3D uses the root bone to compute the displacement of the animation. This displacement is then used to compute a force that would move the character accordingly. The benefit is that the animator decides about the velocities of the character. If you were to animate a jump, for example, the character would simply just jump according to the displacement. Basically, you decide on the speed of running, walking, side-stepping etc. Within the physics engine, Geist3D represents a character as capsule contained inside the bounding box of the mesh. So, when you run into a wall, it’s not the triangle mesh that collides with the wall, but the bounding capsule. This approach is computationally more efficient, but also keeps things more stable and makes it easier to slide along walls, for example.

Long story short, I am extracting the forces that move the capsule from the root bone of the animation sequence, and the characters is always centered in the capsule. This is something to keep in mind when building the animations. I am in the process of reworking the character animation, but it won’t change much from the way it works right now. I do still want this capsule to resize along the z-axis so that the character can crouch down for example. In this case the capsule has to shrink so that you can crawl through tighter spaces. But there are still problems that have to be worked out. For example, if you are in a tight space and stop crouching then the cone cannot grow again, otherwise the physics engine will apply too strong forces to the character and it will just fly away. I am also not quite sure about how to keep the character centered without interfering with the animation. So far, the center of the character constantly changes just a bit, but enough to explain some of the slight jittering I still notice when walking into obstacles. It is very important that center of gravity remains at the right location within the character. There are some restrictions on how you can animate, and the best is to keep the root bone in mind.

I may be able to get a new version of the editor to you by the end of the week, which you can use to import the Borian yourself. I will just add the character to the distribution and all you have to do is change the .avt file in order to add new sequences. I am starting a new Geist3D unrelated project soon and development will slow down a bit. But, I am happy with what I have done recently and I will focus on the characters for the foreseeable future.

On another note, I finished rearchitecting the system so that we can attach objects to each other. The result of this is that you can now walk an avatar onto a shuttle, then the shuttle has to activate a “force field” and then it can fly away with the character in the back. You can still be the character and someone else can fly the shuttle. The character cannot move anymore but you can still look around. It’s is quite a cool ride when you looking out of the shuttle bay and see the planet fly away underneath you. Of course, if the pilot decides to turn of the force field, then you get ejected out into space.
« Last Edit: January 20, 2009, 07:21:17 PM by Jochen Stier » Logged
Tamarin
Full Member
***
Posts: 208


View Profile
« Reply #12 on: January 20, 2009, 07:51:59 PM »

Here is a walk with animated (along y) root bone.

http://www.mediafire.com/file/du0ihjw2zjz/borianJan20B.rar

If you look at the mesh file you can see many weights are less than one.

If the character is crouching you can check that the area above him is open before allowing him to stand. The game Entropia I was telling you about has loads of these glitches where you can sit down while running and slide across the screen as well as climb vertical walls.



 
Logged
Jochen Stier
Administrator
Sr. Member
*****
Posts: 498


Founder/Programmer

jochen.stier@gmail.com
View Profile
« Reply #13 on: January 20, 2009, 09:49:42 PM »

Man, you are fast. I again didn't  have a chance to look at the character. I am just sitting here having a beer:). If you can, make the forward movement along the positive x-axis. I honestly don't know if it makes a difference, but I have decided that all forward movement in Geist3D is along the x-axis. The shuttle and missiles right now move along the x axis, but I don't know if the characters do too. I would have to look at the code... I any case, the positive x axis is your best bet. Yeah, crouching is going to be a problem, but since Geist3D has its own physics engine, I think that this problem can be resolved easily...Anyways give me a day or too to look at the latest char...

Cheers
Jochen
Logged
Jochen Stier
Administrator
Sr. Member
*****
Posts: 498


Founder/Programmer

jochen.stier@gmail.com
View Profile
« Reply #14 on: January 22, 2009, 06:05:59 PM »

I have uploaded a new version of the Geist3D studio which now includes the Borian. After you installed it, open borian.3dm and hit run. You will see him walk towards you quite nicely. Also have a look at the Borian.avt file. There you can more animation sequences; 0-4 are reserved for idle, w, a, s, and d respectively. Right now, the idle animation is using walk.md5anim, so the char begins to walk right away.

If you want to control the char in 3rd person, turn off camera capture in the tool bar (2cd button from the right) and then select the character in the tree view. Once you click back on the 3D view, you can now use the right mouse button and w,a,s,d to turn the char. If you want to control the char in first person, simply double-click on the node in the tree view.

I am still not happy with the way Geist3D runs the animations. Especially the forward movement is causing some jittering. Even more so than before my recent improvements! You won’t be able to see it when the char walks directly towards you, but once you look at the profile I think it becomes noticeable.

I hope you will be able to import the character now. I won’t be able to change the software for a while, but I will be replying to the forum.
Logged
Pages: [1] 2
Print
Jump to: