Ragdolls & fun with motion controllers

Well done.
Should be fun playing with this. :smiley:

I’d suggest adding rolling as another possibility, but getting up after falling is probably more important…

I have updated the first post with my current planning. Also updated the .blend file with some experimental stuff:

  • Rope swinging (use numpad once you grab the rope…)
  • Standing up

@PKHG; Did you use part of my scripts for it?

@colseed; Thanks, have fun that’s where it is here for :smiley:

@Wraah, (picture lost Tinypic problem?) Yes, I think so … I more or less ‘removed’ all behalve of the easy biped (if I remember good)

hating to bump, but will you update this to 2.57

Made some big improvement in the tuning so here’s another update :wink:

.blend
2nd video

-Added an overall force to the ragdoll to compensate most of the gravity (~70%)
-Some silly bug fixed :o
-Better control settings

I made an empty object “Test_Cont” which rotates and moves around with the buttons (q,w,e,r,a,s,d,f,z,x,c,v, just see what does what). You can put/copy the empty anywhere and parent the ragdoll controllers to it for testing. Pleas take care not to abuse the ragdoll in any way (just kidding :evilgrin:; use “enter” to shoot cubes at it, don’t worry he’s wearing armour so it won’t hurt … much)

Press “space” to let him fall.
Again enable GLSL for correct textures

Further tuning will require the walk set-up and stuff to work so that will take some considerable work. Also since I want to rethink the system how to combine everything (from walking to running, grabbing stuff, jumping, falling and whatever…). So yeah that will take some more time :mad:

just great!

Added the controls for the hand movement. Got the knight to draw his sword :), now I just need him to aim properly :stuck_out_tongue:
Also added head tracking. His head and eyes are following the tip of the sword.

.blend
pasteall
4shared

(code might currently be a bit messy :evilgrin:)

EDIT: controls, number keys 1 through 7 + space & enter

you know i have been dreaming about doing the things you have done for years… started using blender about two years ago to slowly figure out how to get there step by step… and then i found your stuff…

in the meantime i have come to realise that my programming skills are really not good enough, and have stuck to organic hi poly modeling instead… a few months ago i started working on a hl2 total conversion as a character modeler and animator and put my own projects on ice for a while.

still, i’d love to pick up on it…
i’d gladly help you, so if theres anything i could do for you don’t hesitate to ask (i could do some detailed photo textured normal mapped models for example)

and of course there are some questions:

first… would it theoretically be possible for you to use actual keyframe animations instead of controling all the movements directly in your script?
as far as i’ve heard, blender doesn’t have a feature to easily blend animations in the game engine, but it is possible using control bones.
it would be nice to be able to take advantage of keyframed aniomations to make the movements a little more realistic, and also easier for others to implement their own.

and then… i have been dying to get a fully dynamic sword fighting game ever since i started gaming (when i was 9) and to this day i haven’t found one.
a short while ago the sixense controller got released by razer under the name hydra, and i bought it a few days ago. for those who haven’t heard about it, its pretty much a better version of the motion controllers that were only available for the consoles (wiiremote, ps3 move etc) very precise, no need for calibration, no line of sight required (but still quite expensive… 140bucks)

anyway this is THE controller for a game like this.

heres the offer: i’ll send you half of the money for it if you’re going to add support for these.

either that or the kinect ^___^

EDIT: oh and the recent versions don’t seem to work for me.
blender crashes immediately on loading them. i have tried 2.56, 2.57 and 2.58, none seem to work.
which version did you create these with?

Thanks, still a bit early in development to get a team, but I’ll keep it in mind. I want a good basis as I noticed with my fencing game it really limits your options later on. So first I’ll aim at a solid ragdoll system.

For walking I plan to only set a property to the correct value, say “Walk” or “Walk_Sideways” and then point out a direction (angle from 0-360 degrees), so that would be the python for that so it automatically picks the correct settings (step size etc) defined elsewhere… The hands currently work similar. Just put the target object in the property and the hand moves to it, and if “grab” or something is set to “True” it will grab the parent of the target once close. So I think python skills to use it need be very limited.

But you could just parent all the controllers to another armature and animate that, it will show a bit of a delay (because the limbs are following the targets) so you would need to compensate that in the animation.

So I am not the only one with that idea :D, I guess with those controllers the main challenge is to get their values as input into Blender (does glovepie support them?). Than it is just a matter of linking the position/orientation to the target object (and accept a small response time for the hands to follow the target, guess that is also a matter of tuning).

I tried a wiimote with my fencing game but found it way to inaccurate for my purpose :frowning:

Odd :(, do you have GLSL support? Is it only from my latest post (sword drawing)? Should work on 2.57b. I did get a weird bug reloading the file in 2.58(a) (knight mesh is messed up).

Anyone else having problems?

the last 2 versions didn’t work for me, GLSL should not be an issue, i use it all the time.

the razer hydra is not supported by glovepie, and carl kenner hasn’t updated it in quite a while so i wouldn’t count on it ever happening…
but the controlers come with its own SDK, a script driven configurator that works quite similar to glovepie and even a driver that makes it usable as a midi device… so there should be enough options to get the required data.

EDIT: i went through all the files and it seems that the 2.49b versions work, the script just doesn’t get executed, but all the 2.5x versions crash except version 253 and 253v2
these two behave just like the 2.49b versions(if opened in 2.5x). on hitting p the ragdoll just drops to the floor.

Another long overdue update, got walking working.

2.59 version .blend

Controls:

Basic movement: W, A, S, D, Z, C

Moving in camera direction: numpad, turning also with left/right arrow. If you have a gamepad with 2 sticks that should work as well (might need to change the axes on line 129 in input.py, depending on your gamepad model)

Sword movement: numbers 1 trough 7
grab rope R
zombie pose O
drop items, default hand pose F
drop dead: hold space
shoot cube: enter
crouch: left control

HAVE FUN!!!

@ MoreDread: hope this version works (2.59, 2.60 also works but hand and breathing animations are messed up :frowning: )

i totally love it! :slight_smile:

it’s something like an (unfinished) euphoria engine within blender :smiley:

I can’t find how to make it drop dead i can’t find spacebar event in code.
Can you tell where to look for it?
sorry for bad English.

One of the few thing I did with simple logic bricks :D, check the “Ragdoll_cont” object, still have to handle falling better…

Really good work Wraah; this kind of rag-doll would be really useful for my game!
Keep it UP!

Thank you Wraaah.
I use Blender2.6 falling look good I use substep 3 but hand is swing a little weird and when turn in zombie pose hand is weird too.
When turn left left leg is weird and turn right right leg is weird too.:confused:
And breathing I use loop end to correct animations.
Your ragdoll system is really good work I really want to play when this game finish :yes:.

Can you make RB move along RB cont faster?
I want to control hand with PS Move but I think RB move slow.

Made a few bugfixes, numpad movement should be better now
.blend

If you want to see some weird motion press Q, my first attempt at running :eyebrowlift2:

You can set the control values in the init script. Also each controlled object has the “speed” property to modify the speed easily during animations (another bug fix :o). And what do you mean with PS Move?

Also good point about the zombie arms (aren’t zombies supposed to be weird ;)), I should turn the upper body more gradually during turning

So what kind of games are you all thinking of for this set-up?

Personally I think it would be ideal for an action adventure with heavy environmental interaction (traps, rope swinging etc…). Although my main goal is to create a system for more accurate close combat action.

PS Move is Playstation 3 controller Playstation Move it full motion sensor.
If your game has multiplayer I think game like Bushido blade (PS2) was fun:evilgrin:.
Run around was very fun haha.:D:D:D

Wraah, i beleive that the 2.6 version crashes for me:
Blender 2.60 r40198 ( i cant remember if 2.60a i think it is)
i5, 4gb ram, gtx 460