PDA

View Full Version : Animated Character interaction


Jezait
11-11-2003, 11:27 PM
How can I make a character interact with other things?

For example, I made character with a sword on his back. I wanted him to pull out the sword to start doing some cool 'show off' moves. I can't even get him to hold the sword!? I tried adding a bone for the sword, but when I "child'ed" to the hand, it would move about on his back, when he was walking. I couldn't have it childed to nothing, because it would make really weird and un-accurate movments as I moved it along, in time with his hand.

The answer to this post will probably apply to interacting with other elements, like a ball on the ground.

It's like I wan't it to not be part of the object, and then join with it upon interacting. I don't know. You tell me.

:shrug:

cheers

fligh
11-12-2003, 01:36 AM
Thanks Jezait for the laugh! Don't feel bad because we were all there once and can empathise with your frustration

The child will always follow the 'Tracking' constraints of the parent... even if you don't set them. In this case they are Loc, Rot and Size. If you scaled his hand the sword would scale too. The trick is to understand that blender doesn't know that it's a sword or a hand, it's just a bunch of mesh data. You have to define what is the hand and what is the sword

One way to do it is to create an empty, make the empty the parent of the sword. Now you can make (a single vert in the) hand or the scabbard the parent of the empty. In the frame where he takes the sword in his hand you change the parent of that empty from the scabbard to the hand.

The neat thing about that is you can now use constraints (and fx) on the empty that will affect the sword only (it's the only child of the empty).

Somebody may even have another way of doing this.

Jezait
11-12-2003, 02:16 AM
One way to do it is to create an empty, make the empty the parent of the sword. Now you can make (a single vert in the) hand or the scabbard the parent of the empty. In the frame where he takes the sword in his hand you change the parent of that empty from the scabbard to the hand.

The neat thing about that is you can now use constraints (and fx) on the empty that will affect the sword only (it's the only child of the empty).


Hey thanks for the info. A few things:

[list=a]
How do you make the "single vert" in the hand or scabbard the parent of the empty?
What is a scabbard?
Where/how would you "change the parent of that empty" in "the frame where he takes the sword in his hand"?
What for and how would you "now use constraints (and fx) on the empty"?
[/list=a]

fligh
11-12-2003, 03:47 AM
<<How do you make the "single vert" in the hand or scabbard the parent of the empty?>>

Rmb the empty, Shft-RMB the hand (or scabbard), Tab, RMB the vert, Ctrl-P -> Make Vertex Parent.

<<What is a scabbard?>>

The sheath that the sword fits into.

<<Where/how would you "change the parent of that empty" in "the frame where he takes the sword in his hand"?>>

Alt-P in object mode with objects selected, Clear Parent, Then repeat the Vertex Parent routine above

<<What for and how would you "now use constraints (and fx) on the empty"?>>

Your example is for a sword but maybe in the future you would want animated texture, particle fx, scale, rotation etc when you do a scene with a Genie compromising his lamp. All of this data can be given to the empty and will be displayed on its child. Remember there are others who may learn from this technique, it's not limited to swords
:wavey:

Jezait
11-12-2003, 09:47 PM
Ok, I've managed to parent the vertex to the empty (parented to the sword).

The sword does not rotate with the hand, it just stays vertical as the hand moves!?

Also, I can't get my head around the 'assigning the empty to the vertex' bit. How does blender know that the empty will not be childed to the vertex on a certian frame, but on others. I thought it would have to use some kind of keyframing!?

Thanks for the help.

:)

fligh
11-13-2003, 03:05 PM
<<The sword does not rotate with the hand, it just stays vertical as the hand moves!?>>

Use a 'Track To' constraint on the empty T, and maybe clear rotation Ctrl-A before constraining.

<<Also, I can't get my head around the 'assigning the empty to the vertex' bit. How does blender know that the empty will not be childed to the vertex on a certian frame, but on others. I thought it would have to use some kind of keyframing!?>>

Any animation (except in the game engine and effects, [build, wave and particles]) will have IPO's so the empty will be keyframed. The children will be constrained to the IPO of the empty.

harkyman
11-13-2003, 03:33 PM
Hi folks. there's a much better way to do this...

Create a bone for the sword in a separate armature.

Within your character's armature, create a bone for the sheath.

Go back to your sword bone, and create four constraints for it: CopyLocation and CopyRotation pointing to the sheath bone, and CopyLocation and CopyRotation pointing to the hand bone.

You can key these constraint values!

So, when you want the sword in the sheath, you set the constraints pointing to the sheath to 1 and those pointing to the hand to 0 and set keys.

Put the hand in position, then over the course of 4 or 5 frames, reverse this keying situation. You'll end up with the sword bone being locked to the hand bone, wherever it moves.

This is the "official" method for doing such a thing in Blender.

You may have to experiment with various bone orientations in order to get everything to line up, but it can be done!

Good luck.

Jezait
11-13-2003, 07:33 PM
Cool thanks man,

What key, and where, do i press for inserting an ipo keyframe?

what if I wanted him to drop the sword?

:bounce:

This is the guy we've been talking about by the way:

http://reblended.com/www/jezait/gallery/cartooncharacter.jpg

Many thanks

Apollux
11-14-2003, 03:22 AM
I couldn't agree more with harkyman :applause:


Well, actually I think that 5 frames is too long, if I were you I would do it over 1 or 2 frames. On the real world that sort of things happen instantly.

fligh
11-14-2003, 05:50 PM
In my first reply
Somebody may even have another way of doing this.

LoL... Thanks Harkeyman!

CGTalk Moderation
01-16-2006, 04:00 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.