blenderNetworkpatreonblender-logosdheartuserthtimesbookphotopencilmap-markerchevron-rightbancommentcommentstwitterfacebookrsschainnavicongoogle-plusenvelopelinkedinmail-replycalendar-otumblrredditstumbleuponshare-altbloggerflattrflag

Animation while moving?????

Animation while moving?????

Postby Demias123 » September 9th, 2009, 1:36 pm

As the title says, i basically wish to know how i can add animation to my characters movement.

Better explained, i know how to add controls to my characters in blender, and i know how to place the camera, that part i got down. I just have no idea how to make it so when my dude moves, he plays and loops an animation that i set up. Like walking forward and backward, turning around and all that good stuff.

note that i am making my game in 3rd person, which is why i need the animation help.


thank you, and im sorry if this has been asked or if this is really noob like, i just cant seem to find any answer.
User avatar
Demias123
Starting Out
Starting Out
 
Posts: 13
Joined: September 9th, 2009, 1:31 pm

Re: Animation while moving?????

Postby IrascibleOne » September 9th, 2009, 2:12 pm

I don't know much about the game engine, but I have a general idea about how you might do this.

You'll have to make an animation for each type of movement that you want first. When you have your animations you can make an IPO actuator that is connected to the same sensor your movement is hooked up to. (Like, the forward walking animation is hooked up to the same sensor as the forward motion actuator is hooked up to). I think you can make your animations loop.

That's pretty vague...hopefully someone else here can give you a better answer.
Image
User avatar
IrascibleOne
Site Admin
Site Admin
 
Posts: 1543
Joined: July 31st, 2008, 7:14 pm

Re: Animation while moving?????

Postby Demias123 » September 9th, 2009, 2:41 pm

i have tried that, but it does not work. my character moves but does not play the animation that i set. i even tried putting the controls on the Bone, and that didnt work either. so i dont understand what i have to do at all.

thanks for the fast response though
User avatar
Demias123
Starting Out
Starting Out
 
Posts: 13
Joined: September 9th, 2009, 1:31 pm

Re: Animation while moving?????

Postby Nismo » September 10th, 2009, 12:59 am

What Irascible says should work if i remember correctly, if you want to post up the .blend maybe someone can spot something that's wrong.
Image

(\__/)
(='.'=)
(")_(")

"Three blind mice walk into a pub. But they are unaware of their surroundings, so to derive humour from it would be exploitative." - Bill Bailey
User avatar
Nismo
Pro
Pro
 
Posts: 328
Joined: December 17th, 2008, 2:22 pm
Location: UK

Re: Animation while moving?????

Postby Demias123 » September 10th, 2009, 8:00 am

i would but its still kinda jumbly, cause i have been trying different things, and trying anything i can.

guess i should ask now if the controller should be on the object, or the armature, and if the object, is there something i have to do in pose mode or when you change from Scene to Animation that saves or makes the animation i make apply or something?
User avatar
Demias123
Starting Out
Starting Out
 
Posts: 13
Joined: September 9th, 2009, 1:31 pm

Re: Animation while moving?????

Postby Dictator-for-life » September 10th, 2009, 5:41 pm

Okay, I got you.

So, if I understand you correctly, you have tried to make seperate animations in different scenes. You're going to hate this, but I'm afraid all that work was for naught.

What you want is to set up different animations in seperate ACTIONS. You may find Actions in the Actions tab. After accessing the Actions tab, select your character's ARMATURE, go into Pose Mode and create a new Action (near the AC: box). Name the AC according to its animation. Now you can do the animations. One AC: for each animation, you should name them all accordingly.

Next order of business:
Demias123 wrote:i even tried putting the controls on the Bone, and that didnt work either.

Demias123 wrote:guess i should ask now if the controller should be on the object, or the armature

The answer is the Armature. NOT the bones and certainly not on the mesh itself.

I assume you are using LogicBricks? Well, either way. When the user hits foward, the armature should move in direction AND play the walk animation. That is how it works. To get the animation playing, use the ACTION ACTUATOR. It's pretty self-explanatory, except the Blend: and Priority: parameters.

The Blend: parameter sets how smooth one action will transition into another. Say, for example, the user pushes fowards to walk. Then suppose he hits shift and fowards at the same time in order to run. The walk cycle will completely stop and morph into the run cycle at that time.

The Priority: parameter sets how important an Action is compared to another. Idle is not as important as walk. Therefore, walk should have a higher Priority: than idle. If the conditions for the sensors of both the walk and idle Action Actuators become true, the computer will decide to play walk instead of idle. I am kinda in a rush, so I hope I am not being confusing (that and the fact that summer has stupified me (too bad it's over)).

I hope this helps, there's more to be said (if you can believe it), but I have to run off. Good luck!
"Along with 'Antimatter,' and 'Dark Matter,' we've recently discovered the existence of 'Doesn't Matter,' which appears to have no effect on the universe whatsoever." -The 5th Wave
User avatar
Dictator-for-life
Veteran
Veteran
 
Posts: 505
Joined: December 24th, 2008, 9:44 am
Location: USA

Re: Animation while moving?????

Postby Demias123 » September 10th, 2009, 6:06 pm

i understand what your saying, and i thank you for such a detailed explanation, my only issue now is about the action thing.

Like, in the Animation mode, i notice now that one of the windows it makes is Action window, but i have no idea how to use it, as i have never used it before. so if you know of any tutorials or could explain quickly how to use it as you said, that would be great.
EDIT: also, how do i set up actions in the logic controllers?

also, a quick question, when doin the logic controls, and i set a key for moving forward, do i connect the sensor to one controller, then to two actuators, on for movement one for animation, or is there one that will do both or what? lol
User avatar
Demias123
Starting Out
Starting Out
 
Posts: 13
Joined: September 9th, 2009, 1:31 pm

Re: Animation while moving?????

Postby Dictator-for-life » September 11th, 2009, 11:16 pm

The Action tab generally works in the same way as normal animation, only instead of IPOs, you work with poses. You, as the animator, must decide which intricate poses make up the overall action you are trying to achieve. I suppose you already have experience with the walk cycle. Well, when you record into the Action tab, intstead of graph points (like in the IPO window), you will get these diamond shaped "indicators," if you will. Each diamond stores a pose. As the animation plays, it transforms one pose to another, as it hits each diamond. I think you already know this, it's practically the same as normal animation, and I am just rambling here. Basically, you are still working with keys: location, rotation, scale, but on a bone/pose level. If you know how to make these keys, you'll be fine. Basic workflow:

1. (Optional) Create a new action and just include 1 frame of your original armature pose. This is so that when you select this action and hit Create New, it'll duplicate this original for a good starting point on any action. It's what I do, you can just turn it into the IDLE animation later if you want. Of course, with the creation of new actions, you can always just delete the frames and hit Alt+S, Alt+R, and Alt+G respectivaly (I hope I don't have those out of order.. it's important that they are. They clear the armature's scale, rotation, and location respectivaly, to it's default/original position.)

2. Create a new action and name it accordingly. Make sure you are in Pose Mode in the Armature first. I am a bit of a cheater here, I hit the recording button in the animation layout so I don't have to set specifically, loc, rot, or scale. It does it automatically. Then set the poses of the action. For example, walk cycle:
Image
If you aren't using automation, hit ctrl+I on the correct bone and give it the appropriate type of key.

3. After finishing the cycle, you may hit Alt+A to see that your work meets your satisfaction. If it does, you are done with that action. Go near AC:, hit the tab next to it, and select Create New. Do it over again. Keep creating more actions.

I couldn't find a good tut on the Action Editor, but if I find one, I'll post it. I am pretty surprised nobody has every written a tutorial on the whole rigging and setup of armatures in the BGE, except for in Blender Game Kit 2..

Demias123 wrote:also, how do i set up actions in the logic controllers?

Well, that's why you have to name your actions. The Action actuator asks for AC:___________. Just fill in the blank with the appropriate Action you created. Then take note when the animation starts (usually at 1) and when it ends. It's also imperative that you select the right kind of loop for your cycle. Loop stop is usually the way to go.

Demias123 wrote:also, a quick question, when doin the logic controls, and i set a key for moving forward, do i connect the sensor to one controller, then to two actuators, on for movement one for animation, or is there one that will do both or what? lol

I too wish that motion and animation could go hand in hand and save me some logic brick pain, but no, you have to connect the sensor(s) to the controller to two actators: action and motion.

If you have any more questions I can field, please go right ahead. I am a bit fatigued so if I didn't make any part clear enough, just say so and I will do my best to explain it. If I should go more in depth on something please don't hesitate to say. Hope it works!
"Along with 'Antimatter,' and 'Dark Matter,' we've recently discovered the existence of 'Doesn't Matter,' which appears to have no effect on the universe whatsoever." -The 5th Wave
User avatar
Dictator-for-life
Veteran
Veteran
 
Posts: 505
Joined: December 24th, 2008, 9:44 am
Location: USA

Re: Animation while moving?????

Postby Demias123 » September 12th, 2009, 7:21 am

wow, thank you sooo much, it works. at first i was a bit confused while i was trying it cause it didnt seem like adding new actions did anything, but then i looked and it didnt show any of the animations from the other action, and i got it to work in game so it looks like the dudes walking.

one last quicky though, sense you have been so much help so far, how do i set up the idle controller? by that i mean make it so when im not pressing anything, it does the idle, but when i press W or movement keys it plays the walk animation, then if i stop pressing again it goes back to Idle?



again THANK YOU!!!
User avatar
Demias123
Starting Out
Starting Out
 
Posts: 13
Joined: September 9th, 2009, 1:31 pm

Re: Animation while moving?????

Postby Dictator-for-life » September 12th, 2009, 2:17 pm

No problem, happy to help. If you are going to make a game, you should post a new thread, I and a bunch of others would be interested in seeing it, I'm sure.

Demias123 wrote:one last quicky though, sense you have been so much help so far, how do i set up the idle controller? by that i mean make it so when im not pressing anything, it does the idle, but when i press W or movement keys it plays the walk animation, then if i stop pressing again it goes back to Idle?

Yes, for that, you'll need to use a sensor that is always true, in all or most cases the Always sensor will do the job just fine. It is imperative that you enable ''' in the Always Sensor (to turn on "True Level Triggering (Pulse Mode)"). Then string up your Always sensor to your Idle Action through a controller. The Idle Action should always play whenever the user isn't pushing any keys. One more word on the Idle Action, be sure you set the Priority pretty low, or you'll find your character moving while idling..

If run into any more problems, feel free to post in the forum and somebody is sure to help you out.
"Along with 'Antimatter,' and 'Dark Matter,' we've recently discovered the existence of 'Doesn't Matter,' which appears to have no effect on the universe whatsoever." -The 5th Wave
User avatar
Dictator-for-life
Veteran
Veteran
 
Posts: 505
Joined: December 24th, 2008, 9:44 am
Location: USA
Next
Return to Animation

Who is online

Users browsing this forum: No registered users and 1 guest

cron