Spawn Ragdoll Problem

Hey Blender Artists,

I’ve made a working skinned ragdoll that works fine when I test it in BGE. However, I want to spawn the ragdoll, which includes a mesh, an armature, the joint points and the other ragdoll parts. I can not spawn it with the Add Object actuator, because that can only spawn one object, unless I parent all the parts to an object and then spawn that object. But even if I do that, the ragdoll’s physics are erased. I’ve tried making an instance out of the object, however the joints are messed up and don’t work correctly. Does anyone one know how I could spawn the ragdoll as a group, or just any way in general of how to spawn it in with all of its parts(keeping their constraints and physics)? Thanks! :wink:

~Olimation

Anyone have a solution? :frowning:

create constraints at runtime,

So add pieces, and set constraints, (set physics to suspend) until it’s built, then flip the onswitch

store the constraint, so you can end it, before ending the object, so blender does not crash :smiley:

/uploads/default/original/3X/b/2/b2e3602ce0f2a73dd9521abf1b43219b621e0fef.blend

You’ll definitely need python for this. If I were you, I’d have the joint points parented to the armature. Then, you go through the children of the armature and check if they are joint points (with a simple property check or something). If so, you then add the corresponding ragdoll parts at the joint points, parent the joints points to the ragdoll parts, and then create the constraints you need. It’ll take some tuning, but I’ve managed to do the same for armature ragdolls; so yes, it is doable.

I thought there was some patch in the works to keep constraints within a group of objects, I guess it still is not approved …

Other than that, if you create the ragdoll with the BRIK add-on you can spawn it. BRIK already includes all the scripting to setup constraints after the individual ragdoll parts are added. See signature for link to BRIK.

Could you please give me a test blend file of that? That would be greatly appreciated!

Here’s something I’ve done not so long ago, it creates a ragdoll from armature and assigns limits and stiffness based on IK limits and stiffness. The rest is explained in the blend file.

Attachments

Ragdoll Generator.blend (587 KB)

Thanks, but I have already tried using python and I still cant spawn it all in at once, because I have to parent the objects to their bases to get it to spawn correctly.

he is adding new objects I think for each piece… ?

Jackii I think Has a proper solution.

Does the BRIK add on work with 2.7? :smiley: Could you please send a test blend of it along with the add on?

Does anyone know how to parent on object and keep its physics, or just any kind of solution to this? :frowning: I’ve tried using BRIK, but the ragdoll doesnt spawn when I press tab.

Just checked and BRIK still works in 2.7 :), just make sure you have a backup file from before you try to apply it as the undo functions dont work very well …

See post below for brik add-on files (follow link to first post below for file):

And how to apply BRIK

In addition you might still need to add your character mesh to the same group as the armature. Attached is also an example blend to start out from. However somehow in game engine the mesh somehow does not follow the armature, it must be something completely silly why mesh is not following but could not find the issue on short notice…

Attachments

Knight_brik_exampleV2.blend (1.41 MB)

are there any video tutorials on BRIK besides the one from when it was first being made :)?

Sorry I don’t have any video tutorials. For things related to setting up the armature you should be able to find general rigging tutorials (bone groups, IK chains/constraints).

For the rest I can only suggest to try out the BRIK buttons in sequence for a simple 2 bone armature to start with. Or if you have difficulties on a specific point you can always ask :wink:

Do you perhaps have the code you made to spawn the ragdoll in a group, and how you made it stay a skinned ragdoll? It would mean a lot if I could use that! I will definitely use BRIK in the future, however I just can’t use it for this specific project.

aw okay…

can someone clarify, what difference between ragdoll and non-ragdoll character? What is advantage of one over other?

ragdoll is usually reserved for dead players.

it’s a simulation of rigid body joints, that the armature animating the player targets,

*Wrectified uses a full time ragdoll, meaning to animate it applies forces to attempt to match a second armature.
this is not a easy path to walk

If it is a hard path… using in constant run-time must have some kind of great benefit yes?

Draw backs
1 . Actions don’t always match Results
2. physics usage is a issue
3. requires a lot of dialing in

Advantages
1.The strength of the forces can be scaled using a “strength” property, this can be subtracted (limb go limp) and returned
2.you can animate by applying forces directly to the limbs
3.Perfect collision with environment
4.mixing 1 and 2 (shotgun to face = shotgun ride back flip)
5.bullet 3 is out, but only for high end GPU atm.

note my gpu was 35$
so screencapping a 60 fps game is a little hard on it

Game res - 800x600
60 fps

Screen cap = 800x600
30 fps