Page 1 of 1
Vitruvian bones and IK?
Posted: Fri Jul 08, 2022 5:51 pm
by SimplSam
How do people cope with Vitruvian bones and IK?
I have IK working as desired with a simple arm rig, but when I introduce the 2nd lower vitruvian limb bone it kills IK on the upper limb. This is normal / expected for normal bone structures, but I was hoping Vitruvian Bones would permit IK with multiple lower limbs due to the fact that only one limb bone is active at any time.
At the moment the solution might involve a bunch of reparenting. But keen to see if I missed a trick ...
Re: Virtruvian bones and FK?
Posted: Fri Jul 08, 2022 7:28 pm
by Greenlaw
Hmm...can you share an example?
FWIW, FK with Vitruvian Bones works here. With the Manipulate Bones tool selected, I just hold Alt and use FK on any bone inside the V-Bones group as normal. Then Alt-C or -D to change V-Bones groups, and press Alt to use FK in this group. So far I haven't had a problem with that.
Re: Virtruvian bones and FK?
Posted: Fri Jul 08, 2022 8:14 pm
by Greenlaw
Or did you mean IK? IK should work too but if you have another bone branching out from a bone, IK will terminate there.
So if you have parented another bone to the upper arm bone besides the lower arm bone, that could disable IK for the upper arm bone. To work around this, select the other bone and enable Ignored by Inverse Kinematics (in Constraints) for that bone. This should allow IK to be active on the upper arm bone. (In my rigs, I need to do this for a hidden the elbow bone.)
Hope this helps.
Re: Vitruvian bones and IK?
Posted: Fri Jul 08, 2022 8:51 pm
by SimplSam
Ha. I have updated the subject to "IK" !!!
And the issue is where we have multiple Vitruvian limbs on the same upper bone.
So... "Ignored by Inverse Kinematics" works as you have indicated, but it is not keyframable/animatable. Therefore - I can only ever have one of the Vitruvian child limbs controlling the IK.
I have disabled Vitruvian below to show both bones, but "Arm lo 1", and "Arm lo 2" are in a Vitruvian group and each needs to be IK controlling "Arm up" - when they are active (respectively).

Re: Vitruvian bones and IK?
Posted: Sat Jul 09, 2022 12:19 am
by synthsin75
Quick edit to the IsEnabled function will automatically allow IK for only the active Vitruvian groups:
Code: Select all
function LM_BoneGroups:IsEnabled(moho)
local skel = moho:Skeleton()
--syn\/
--automatically enable IK for active Vitruvian group
for i=0, skel:CountBones()-1 do
if (skel:Bone(i):IsGroupVisible()) then
skel:Bone(i).fIgnoredByIK = false
else
skel:Bone(i).fIgnoredByIK = true
end
end
--syn/\
if (skel == nil) then
if (self:ShouldUseParentSkeleton(moho)) then
skel = moho:ParentSkeleton()
end
if (skel == nil) then
return false
end
end
if (skel:CountBones() < 1) then
return false
end
return true
end
Re: Vitruvian bones and IK?
Posted: Sat Jul 09, 2022 12:55 am
by Daxel
I didn't notice this VB limitation. Greenlaw's explanation makes a lot of sense. And that fix from Wes was the fastest of the west. Even if this is the expected behaviour for a hidden bone, it is inconvenient with V bones. I hope they implement that improvement on the next version. I'm still hyped about VB's potential even if I have only used them once so far.
Re: Vitruvian bones and IK?
Posted: Sat Jul 09, 2022 1:06 am
by SimplSam
Wow! That was quick indeed.
Working like a charm!
Thanks all
Re: Vitruvian bones and IK?
Posted: Sat Jul 09, 2022 4:14 am
by Greenlaw
Hmm...I guess I hadn't noticed because I normally use FK when animating arms. But of course I do need IK for arms when I pin the hands to something (hips, table, etc.,) so this is good to know. Thanks for creating a patch Wes, and so quickly too! I'll give it a try tonight.
Re: Vitruvian bones and IK?
Posted: Sat Jul 09, 2022 11:56 am
by lucasfranca
synthsin75 wrote: ↑Sat Jul 09, 2022 12:19 am
Quick edit to the IsEnabled function will automatically allow IK for only the active Vitruvian groups:
Code: Select all
function LM_BoneGroups:IsEnabled(moho)
local skel = moho:Skeleton()
--syn\/
--automatically enable IK for active Vitruvian group
for i=0, skel:CountBones()-1 do
if (skel:Bone(i):IsGroupVisible()) then
skel:Bone(i).fIgnoredByIK = false
else
skel:Bone(i).fIgnoredByIK = true
end
end
--syn/\
if (skel == nil) then
if (self:ShouldUseParentSkeleton(moho)) then
skel = moho:ParentSkeleton()
end
if (skel == nil) then
return false
end
end
if (skel:CountBones() < 1) then
return false
end
return true
end
Wow, really good! Does this work for common bone structure too?
Re: Vitruvian bones and IK?
Posted: Sat Jul 09, 2022 8:15 pm
by synthsin75
lucasfranca wrote: ↑Sat Jul 09, 2022 11:56 am
Wow, really good! Does this work for common bone structure too?
With another quick edit, yes, it can work with any selected bone too:
Code: Select all
function LM_BoneGroups:IsEnabled(moho)
local skel = moho:Skeleton()
--syn\/
--automatically enable IK for any selected bone
local sel = skel:SelectedBoneID()
for i=0, skel:CountBones()-1 do
if (skel:Bone(i).fSelected or skel:IsBoneChild(i, sel)) then
skel:Bone(i).fIgnoredByIK = false
else
skel:Bone(i).fIgnoredByIK = true
end
end
--syn/\
if (skel == nil) then
if (self:ShouldUseParentSkeleton(moho)) then
skel = moho:ParentSkeleton()
end
if (skel == nil) then
return false
end
end
if (skel:CountBones() < 1) then
return false
end
return true
end
Re: Vitruvian bones and IK?
Posted: Sat Jul 09, 2022 9:35 pm
by lucasfranca
synthsin75 wrote: ↑Sat Jul 09, 2022 8:15 pm
lucasfranca wrote: ↑Sat Jul 09, 2022 11:56 am
Wow, really good! Does this work for common bone structure too?
With another quick edit, yes, it can work with any selected bone too:
Code: Select all
function LM_BoneGroups:IsEnabled(moho)
local skel = moho:Skeleton()
--syn\/
--automatically enable IK for any selected bone
local sel = skel:SelectedBoneID()
for i=0, skel:CountBones()-1 do
if (skel:Bone(i).fSelected or skel:IsBoneChild(i, sel)) then
skel:Bone(i).fIgnoredByIK = false
else
skel:Bone(i).fIgnoredByIK = true
end
end
--syn/\
if (skel == nil) then
if (self:ShouldUseParentSkeleton(moho)) then
skel = moho:ParentSkeleton()
end
if (skel == nil) then
return false
end
end
if (skel:CountBones() < 1) then
return false
end
return true
end
Forgive me for my ignorance, but where do I put this code? Would it be in .LUA file? If yes, which one? Or is it a Layer type script?
Re: Vitruvian bones and IK?
Posted: Sat Jul 09, 2022 9:48 pm
by synthsin75
This replaces the IsEnabled function of the Vitruvian bone tool...which is called lm_bone_groups.lua.
I would suggest copying it, and its pngs, to your custom content folder and editing it there. Don't edit the stock scripts in the installation folder.