Thursday, 29 April 2010

Walking

I imported the walking.c3d file and found I could not scale down the empties which were far too big for the camera; meaning they would appear invisible in the camera view when they went to certain positions. You can also see from the image (left) that the armature shape is quite different to mine. Because the hips and shoulders are in such different positions I was worried it would greatly affect the sequence.

I began copying across the constraints, the master bone used two copy locations, following the left (influence 1.0) and right (inf 0.5) hip empties, this gave a better movement than if only one empty was being followed, like before when I'd followed the spine bone.

Copy Constraints Technique:
I compared how the body moved if it was following the hips or spine. Rather than remove all the constraints and add them manually there is a technique to copy across already created constraints, this is very useful for finger bones.
  • Select the empty constrainted bone
  • Shift select the bone with constraints
  • CTRL C
  • Choose all constraints

The positions and movements were looking ok but the hips were too high (because of the difference in armature) but I found for some of the bones I could move them up. For instance moving spine1 up immediately gave the model a more balanced and 'realistic' shape, I also changed the position of the shoulders.

Doing the drastic movement in the spine meant that his head was affected (it was pulled down into the body). The imported armature was not straight like mine, so I modified my armature in edit mode moving and rotating the head and neck bones, and the problem was corrected. I did the same for the feet rotating them to a 120 degree angle.

In the sequence the character turns around but for some reason the body doesn't turn with him. I obviously can't use this in my footage so I will only record the animation up to this point.

Because of the problems with the camera I couldn't fit the whole character in view so I chose to show his legs moving and the camera coming up towards his face, I also had to move the camera back with him. The camera had to be close to the model for it to show any footage which limited what I could do.

I thought it was a nice idea to make the character look nervous as he was slowing down anyway; so I got the eyes to move to behind him, and the camera to zoom to what could be there (angry flies), I'm thinking of adding in an environment behind him and an eery particle effect following him, which I'll create once I have all the different motion capture files working.

Wednesday, 28 April 2010

Sequence Idea

After trudging through lots and lots of mocap files I've found some suitable .c3d files that I could convert into the similar sequence I wanted to create.
  • Walk straight - man walks forwards, and slightly turns
  • Avoid attack - man seems to be being attacked by little things (flies) and bends down
  • Rise - this isn't really the sort of thing I'd hoped for, but if I half the frame rate and then convert the colours etc. in After effects it may work.
  • Kill flies - my previous animation
  • Strong walk - as the man will be a 'power ranger' a different walk could look good.

I'll convert my armature to all of these separately and when I'm pleased with each result I'll put them together in movie maker. I'll have to do a lot of work in Adobe After Effects but I do have a sequence to work with now, providing I can get everything working...

Adding more flies

I needed to add more flies, so I used the duplicate tool. I found that the animation was carried over to the new object (they were still linked), so when I moved the new one and keyframed it, the other would copy. I found the soloution was to export the fly as an object (only selected). I then imported it straight back in and the keyframes were clear.

I keyframed the fly out of view 1 frame before I wanted it to appear, and then had it suddenly jump into position. Because the movement was so fast it gives the same effect as it would if the object appeared at that frame - which isn't possible in Blender. I made the fly move up towards the man using keyframes - location rotation and then added a particle effect to the fly. I played with the settings, similarly to the previous effect (mother fly orange), but added an explode modifier, this made the object explode and worked with the particle settings. I had to enable emitter in render levels to display the fly in the animation, this was because particles are often used to show something over the top of an already existing object.

I introduced another fly, again appearing and coming 'out' of the mother, I used the same effects and made the animation more 'exciting' by having the flies interact with each other. To keep the fly in view when it rotated I would sometimes have to add keyframes and bring it slightly into view as it was important to always see the action.

I also made the eyes follow the fly, where as before it was only focusing on what the arm was hitting. It was starting to look like a nice little sequence, but I wanted to improve on a few things...

I added a particle effect to the mother fly, so that it seemed to dissolve and that the new flies were taking her place. I tweaked the key framing for the second fly, and also rotated it to make it seemed like the fly was trying to get away. Little touches like this can go to 'improve' the animation so much.

The next thing will be to find some more mocap examples to get my sequence and start bringing it all together.

Tuesday, 27 April 2010

The man and the fly

I created a fly to use in a similar sequence to what I'd planned. I started with a cube, used sub surf, and made it a longer wider shape. I tweaked some of the colour settings, making it a dark grey colour that didn't reflect the light. Next I made holes for the eyes and added a UV sphere and subdivided to make it look like fly's eyes. I used a mirror modifier to make sure they were evenly between the mesh. I used an orange colour and enabled emit to make it brighter. Finally I created wings using a plane and made them transparent with the alpha and ray transparent button. I also changed the man to be purple.

I had forgotten that something with a particle effect is not shown in the camera by default, this is why you can't see the fly moving around and the movie just displays a sudden orange particle effect. I spent a long time getting a cube to move at the right point from the top (out of view) to where the man punched and then display a particle effect. There was no need for this because the cube is not seen because of the particle effect. I would have to put particles on separate objects as I needed the fly to be displayed.

To get the particles I had to set a number of values:

  • its life - how long it displays the particles
  • start and end frames
  • give it random and even settings
  • change the normal and random values
  • I also needed to make the object orange to make the particles that colour, I first did it white and you couldn't see the effect.

It was quite a rough example but it displays the techniques well.
Next I'll add more and more flies and continue using particle effects to make it look like the man is fighting his way through trouble.

Kick using empties

On another website I found a kick.bvh file. The empties moved about but the armature did not, so I would have to add constraints my armature. I used Limit rotation, track to, IK solver, but you can see the body still jumps about. I feel the file wasn't a very good one as the master bone which was copying location kept jumping about giving the body some strange movement.

Despite using a limit rotation, and experimenting with the most approptiate space to use (world/pose/local view), some of the bones would still flip out.

The overall movement is not bad, it's just the folding of the mesh etc. it's proving very difficult to make look right.

Tuesday, 20 April 2010

Using a .c3d file

I imported a .c3d file from CMU motion capture database at a 120 frame rate. It doesn't give you the option to import as armature or empties, but instead comes straight in to blender with both. The file itself came with constraints, so all I needed to do was replace the same constraints to my own armature.

My armature had 5 spine bones but the imported only had two, so I had to put the constraints on the middle and bottom spine part. Another difference between the two armatures was the master bone, which was much smaller and pointing in another direction, so I changed mine to meet this. I had to change the parents of the legs when I removed my previous knee and leg constraints, and also reparent and connect the hips to the master. The constraints for the master bone were different to how I had seen before, it had a copy location but for the two hip bones, not the spine.

When I had constrained the entire upper body with IK, track to, and limit rotation, I looked at the sequence. Because of the way the head follows the empties the face is pointing down and goes into the mesh. I played around with the IK settings, removing use tail and using a chain length 2. This put the head up straight and 'corrected' the movement.


Problems with the hands were that they pointed backwards when relaxed, they looked fine when doing a straight punch. I edited the proportions of bones in the arm and improved it, but in the end I decided it would look better if I took out the constraints so it followed along with lower and upper arm parents.

The sequence worked very well and there was some really nice subtle movement being demonstrated in the video. One thing I thought
would make the animation really sharp was to get the eyes to move together with the animation, as they were focused on the eye constraint the whole time. So using keyframes I moved the eye constraint to where the hand was when it 'punched'. I adjusted the camera to keep everything in view, and ended up with this final result:



There is a part in the sequence towards the end where the character violently nods his head down, this is a fault in the mocap file and could have been due to magnetic interference, but other than that I'm really pleased with how it looks. If I can find more karate examples I can piece together my final animation. I will also base my previous mocap attempts on the constraints used here.

Monday, 19 April 2010

The mocap file itself

I used fraps to show the actual empties as they're meant to move, with the brought in armature. As you can see the file itself isn't great, so for me to use it as the final animation piece is impossible. My video with the red character is very similar to the empties, so I've used the right constraints and made the most of the file.

I will have to grab bits of footage and tie it in to a similar sequence as I'd wanted, it's a real disappointment that I couldn't get the footage I wanted but half the battle is getting the footage into Blender, so I shall still be working hard.

Friday, 16 April 2010

Videos


There are still lots of issues with the legs they just don't seem to be the correct shape. I think I may have created problems by weight painting in two parts.

The movement overall isn't great with a lot of magnetic interference ruining some of the empties. I'm not sure what went wrong when my actor bent down, because the body leans to one side.

There are some nice movements that I wouldn't be able to create using keyframe animation but the process seems much more difficult, certainly with the files I've created.

To create a good looking final animated video I may need to use already existing motion capture files and add bits over the top. I don't have the time to create any more sequences using the mocap suit.

I shall see what results I get from my other mocap files, using the same armature.

But also continue to tweak this file to make it look as good as it can.

Improving the sequence

I experimented a bit more with the IK influence, and found by dropping the values (arms and hands) to 0.545 they seemed to sit away from the body more realistically. Full influence makes the bone lie across the empty, and with lower influence it means the bone moves away from the bone.

I realised that one of the feet did not follow the right path, it was as if it had flipped backwards.

I tried rotating the bone but this would affect it in the whole animation. I used keyframes but these had no effect, as I would have to edit it in the NLA editor but using this would force blender to crash as there was too much data for the computer to handle.


I removed any limit rotations and cleared rotation for all of the lower half.

This corrected the walking problem, but while looking closely at the feet, the right foot spins round when the body crouches down, it converts back, but I cannot do anything about it using the constraints I've used so far.

Overall though the movement is good.

Lower body

I had a fair bit of trouble weight painting the lower half, mainly because I didn't do the whole body at the same time, meaning the arms etc. were covering the vital areas. By moving and rotating the bones I did manage to paint as much of the area as I could see.

I extruded from the lower spine and as default the hips weren't parented this resulted in the legs not following the empties, so I made the hips the children of lower spine, and you can see the movement looks decent now.


There were some issues with the feet, they crossed over when walking, this will be because of magnetic interference when creating the sequence. I won't be able to correct this fully, but by rotating (RR) the feet out I made it look slightly better. I had to change the IK influence because when it was at 1.000 the feet pointed downwards like ballerinas.

Changing the chain length also 'shaped' the leg better, as well as adding a limit rotation. Adding and tweaking different modifiers did a lot to change the results of the sequence.

Upper body videos

I weight painted the lower half of the character to the lower spine, just to have the whole thing moving.

This is a slightly larger size without the lower body, as I thought it ruined the animation to have a static part moving. There are quite a few problems with the sequence, some I may not be able to rectify, but this displays that the movement is working.

  • The arms sit up too much, affecting the walk
  • The body and head don't rotate to where they should be focusing
  • I do like the yawn at the end though.

Analysing the movement

I now had the upper body moving along with the empties, obviously it didn't look as accurate as it might have but it was beginning to look like the sequence that I'd recorded.

The head seemed to have a mind of its own; swinging around as it pleased, so I added a limit rotation in the x and z coordinates. 'World space' seemed to look up too high so I used 'local space.' This stopped the head spinning and it seemed to 'attach' to body better.

Next I had to consider whether to use an IK or track to constraint. The former seemed to more accurately place the mesh, so I replaced all the track to's with IK's. I was quite pleased with how the overall shape of the chracter was looking, but the arms seemed to cling to the sides so I experimented again with what constraints were needed.


Upper body armature





I tweaked the putty character I had created months ago and began building the upper body armature, making it as similar to the 'imported mocap armature' as possible.

I weight painted the mesh, ignoring the lower body, and started renaming the empties and bones. I discovered that where I'd thought there was only one mid point empty there were in fact 3, roughly placed alongside each other. They each display different movements when the animation gets further in.

I used 3 constraints for the mid spine which I'd use to follow the empties: the copy location which made the bone 'stick' to the chosen empty; IK solver which seems to help generally in mocap to position/rotate parts; and copy rotation making the armature position towards the empty.

For the 'less important' bones - lower, upper arms, hands I used a track to constraint.

Saturday, 10 April 2010

Modelling character alongside armature

If I want to avoid the problems I came across before I could try to model a character to work with the mocap armature. I started with a cube, and just extruded, this of course is a very simple version but takes shape when I set smooth and add in subsurf modifier.

I tested what would happen if I weight painted, so I added the armature modifier and chose one of the arm bones and weight painted, as you can see it jumped up away from the armature, moving towards an invisible point again... I weight painted the head as well to see if it made a difference. It didn't appear to...

Looking at the tutorial I had forgotten to move the armature modifier up (but below the mirror as it affected the middle - because it wasn't finished), I then weight painted with clicks, as opposed to dragging the brush, and it seemed to work more systematically, getting all vertices.



Once again the problems occurred when the mesh started moving, with various points flying about the screen. It seems the only way I'll be able to use my own character and armature will be to make it follow the empties

Friday, 9 April 2010

Imported Armature and Bones

I imported the final sequence as an armature and in the display options I showed names, this will help to know what bones are moving. I need to get my mesh's armature to be a similar shape.

I imported the empties as well to see the correlation between bones and empties. There are 21, with the hand bases and feet bases seeming to do nothing (no keyframes)

For some reason it always seems to extend the length of the sequence when I import it into Blender, the sequence was 2.5 minutes long, whereas realistically it was no longer than 30 seconds. Changing the frames/second would not work because there was a maximum of 120fps. So I had to scale down the sequence using the NLA editor, this forced the Blender program to be INCREDIBLY slow and I had to wait up to 20 seconds after every click, button press. Being patient though stopped it crashing, and I scaled the sequence down to 20% - it now lasts 750 frames/30 seconds, which is far more sensible length! As soon as I took the NLA editor off Blender ran smoothly again.

Next I'll need to base my armature/mesh on to the imported one, and get the empties to follow...