Hello polycounters!
I have a problem with my Character (mechanical robot) rig in Blender 2.77. It will be animated and imported into UnrealEngine 4 as a NPC.
My plan for this model is the following: simple bone hirarchy to move all the joints, as well as various cables connecting various leg and arm bones with each other. The base rig was done quit fast. The cables are now my problem, since they should mvoe smoothly along with the rig itself. These cables will have to move, because they are not conencted to only one bone, but for example the upper and lower leg, lower leg and foot and so on.
Here are some screenshots of the rig and how it should be:
Final question: How can I kind of create a bone which has two parents? Because that would be what I need at one site of the cable at least.
(I also tried weight painting with the cables, but they went completely mental, and they of course ignored the collision of the legs.)
Meaby someone knows a solution for this, im pretty sure there is one. I couldnt find anything about that on google.
Thanks in advance,
David
Replies
https://www.nimblecollective.com/bendy-bones/
@RN Thanks for that tip mate, I didnt knew anything about them actualy, looks realy handy! Problem with this: I dont think that Unreal Engine 4, the target software for that robot here, is accepting these Bendy Bones...
You can try something like this, though I don't know the export to UE4 will handle that, I only used this kind of setup in Blender so far.
Red - Your leg bones
Yellow - Cable bones
Blue - IK target, parented to the leg bone in the center
Green - tip of cable bones, IK contraint with the blue bone as target
Instead of the blue IK target you can use the lower leg bone as well, in other cases though you might not have that bone and need to add one just as target.
@ bug: Set the Chain Length value of the Inverse Kinematics constraint to the number of cable bones.
It defaults to zero which uses the whole hierarchy above the constrained bone. The constraint will solve all the way up to the hip bone (which is usually the parent of other branches in the hierarchy), so this is why the entire body moves in a strange way if left at the default value.
Let me know how the export to UE4 is doing later, I'm curious.
As RN said, limit the Chain Length and you will be fine.
@Prime8 Alright I will, I have to make some more trial and error before I get this setup into Unreal. I will probably redo that rig again, I dont think its done very good, feels all a bit buggy. Another thing: It is probably a bit too performance heavy for my game, if I add like 5 bones for 10 cables on the whole mesh. That would make an extra of 50 bones, which is a bit mental. But meaby I will use this setup for another animated mesh in the game, this "physic cable" setup with bones seems to work quit good. If I do it, I will add it here! Thank you both for your advice, it was very valuable for me!
They're lighter than skeletal deformation since the engine is only interpolating the position of vertices between two points, as opposed to transforming each vertex by a bone matrix which is costlier.
In your case you would 'drive' the shape keys (i.e control their weight in the final mix) whenever the robot bends its legs, so that the cables are deformed in sync.
- https://docs.unrealengine.com/latest/INT/Engine/Content/FBX/MorphTargets/index.html
- https://docs.unrealengine.com/latest/INT/Engine/Animation/Persona/AnimCurves/index.html