IK for Custom Unity Assets

Plugins IK for Custom Unity Assets

imakeboobies

Well-known member
Featured Contributor
Messages
50
Reactions
412
Points
53
Website
github.com
imakeboobies submitted a new resource:

IK for Custom Unity Assets - IKCUA

Adds inverse kinematics to rigged custom unity assets, allowing you to repose or even animate imported assets.

** DOES NOT WORK WELL WITH SUBSCENES **

Basic usage:

1) Load in a rigged custom unity asset
2) Add plugin to the CUA
3) Pick a IK type to configure and add it.
4) pick bones to be moved and hit add

This will create empty atoms which can be used to reposition your CUA. Examples of usage here:

[URL...

Read more about this resource...
 
I do not understand anything what this Plugin is offering.....

People tell now "its a gamechanger" or whatever add five Star reviews but from the description, i only have huge question marks.

For non VAM programming nerds and beginners .....

What is your plugin offering ?

This description

Adds inverse kinematics to rigged custom unity assets, allowing you to repose or even animate imported assets.

is telling me nothing. What is repose ? And how would a animated asset look like then ?

And regarding your description:

1) Load in a rigged custom unity asset

> What is a rigged Asset ?
How do i know i load a rigged asset ?
And what type would that be usually?

2) Add plugin to the CUA

- What is that and how to do that ?

3) Pick a IK type to configure and add it.

- I do not understand this step either and for what would this be good?

4) pick bones to be moved and hit add

- I do not understand this step either.
What would happen if i would add this ?

Thx a lot :)
 
Last edited:
Fantastic :) or rather could be fantastic but if you save scene load it again all added atom are delink from CUA parts. :( if you fix it it would be one of best VAM plugin :)
 
So I loaded in a humanoid CUA and tried this. A few issues. Firstly, can we have a guide on what the various choices are and how to use them?
I went for "full body" as it's the only one that seemed obvious, but it didn't have as many options as my model had joints. Still, I carried on with what I had.
Sadly, it still didn't completely work. While most parts worked, I set pelvis as pelvis, spine 1,2 as 1 and 2 and head as head.
Except none of them actually appeared in VaM. The rest worked. Feet? working. upper arm? yup. Forearm? fine. Thigh? good, shin, done, foot there.
But the pelvis, Spine 1 and head never appeared no matter what I did.

Apart from that, It's an amazing plugin. I was actually looking at doing something similar myself and had started working on it then bam! you put this out and blow me away before I have hardly started.
Great work.
 
Works like a charm but it would be even more amazing if you could make it compatible with timeline as I cant add any of the Empty IK atoms to it.
 
Is there any way to animate assets via AnimationPoser or Timeline?
 
Last edited:
Hi, sorry I'm a bit new to vamhub so didn't know there was a discussion thread here till I clicked on it.

This is a bit of a long set of questions but I'll do what I can to explain.

I do not understand anything what this Plugin is offering.....

Broadly what this plugin allows you to do is add non-native VAM creations into VAM and then move them around in a somewhat natural way. For example you could add a crab and move the legs so it looks like it was part of VAM or a squid monster if that was more your thing. None of those things are natively in VAM but can be added and animated to interact with your VAM scene and people.

1) Load in a rigged custom unity asset

> What is a rigged Asset ?
How do i know i load a rigged asset ?
And what type would that be usually?

Pretty much all objects within game engines are composed of transforms, a transform is something that exists at a given position in space(think x,y,z coords), has a rotation and a scale. Sometimes these transforms can have meshes(think of a set of points creating a 3d structure) attached to them. A rigged object is something where the transforms within the object are set to change the shape of a mesh. For example a rigged arm might have 3-4 transforms within it that change the shape of the arm as you move the transforms. Sometimes these rigged transforms are called bones, for reasons that are hopefully obvious given my last example.

You don't know something is rigged unless you imported it from unity yourself. Otherwise you have to guess, but you can see the list of transforms on an asset once you load it into the plugin. Often character models are rigged or things that usually move. So a room for example is often not rigged, but a person or say a rope might well be rigged.

2) Add plugin to the CUA

- What is that and how to do that ?

A CUA is a custom unity asset, its a type of VAM atom that lets you load in non-native VAM game objects. If you go into custom/assets within your vam directory you'll find some files called assetbundles that contain these objects.

3) Pick a IK type to configure and add it.

- I do not understand this step either and for what would this be good?

IK stands for inverse kinematics, you can read more about it here: https://en.wikipedia.org/wiki/Inverse_kinematics

but broadly it means to move the different transforms within a rigged object in a way that seems natural. The IK types I've added support for are:

1) CCD - cyclic coordinate descent, this is kind of like a robot arm movement.
2) FABBRIK - Forward And Backward Reaching Inverse Kinematics. Similar to CCD but uses a less rotation so you end up with less overlapping bits.
3) LimbIK - exactly what it says on the tin, its a simple way of animating an arm, leg or some other limb.
4) FullbodyIK - If you have a person/humanoid you want to animate this is the one. it covers 4 limbs + a head and spine.

If you want to know more about the details of the IK package I used lots to read here: http://www.root-motion.com/finalikdox/html/index.html. There are more IK solvers in the package that I've not exposed but i can if people want them.

4) pick bones to be moved and hit add

- I do not understand this step either.
What would happen if i would add this ?

As i mentioned earlier you end up with a an game object that has a bunch of transforms/bones. The different IK options use them in a different ways. CCD/FAB will go down a hierarchy and add the bones listed. For Limb you have to tell it exactly which bones to use (often they will be labelled as forearm or ankle as a hint). If you want to see one that is already setup have a look at the anal beads subscene i posted the other day.
 
Fantastic :) or rather could be fantastic but if you save scene load it again all added atom are delink from CUA parts. :( if you fix it it would be one of best VAM plugin :)
Hmm, can you send me an example ? This should be working properly in the latest version but entirely possible there's a bug as i hacked this together over a few days. thanks!
 
So I loaded in a humanoid CUA and tried this. A few issues. Firstly, can we have a guide on what the various choices are and how to use them?
I went for "full body" as it's the only one that seemed obvious, but it didn't have as many options as my model had joints. Still, I carried on with what I had.
Sadly, it still didn't completely work. While most parts worked, I set pelvis as pelvis, spine 1,2 as 1 and 2 and head as head.
Except none of them actually appeared in VaM. The rest worked. Feet? working. upper arm? yup. Forearm? fine. Thigh? good, shin, done, foot there.
But the pelvis, Spine 1 and head never appeared no matter what I did.

Apart from that, It's an amazing plugin. I was actually looking at doing something similar myself and had started working on it then bam! you put this out and blow me away before I have hardly started.
Great work.

Hey, sorry for the slow response. Here's the documentation for FinalIK which i wrapped to make this work:


it does a good job of broadly explaining what the differences are between the IK solvers. Full body is the right choice for a humanoid. Sadly you'll fine that often rigged meshes have lots of additional dummy transforms that dont move the mesh. Best way to test it out is load it into unity and try moving the mesh manually there. I did make a little mesh moving plugin which helped but unity is miles quicker to test out meshes.

In terms of the lack of spine/head effector, the way final IK works is to create a chain for the spine and only one effector. The head is actually a mistake on my part as i forgot to turn on the head effector option and i'll fix that in the next release. Hope that helps!
 
Works like a charm but it would be even more amazing if you could make it compatible with timeline as I cant add any of the Empty IK atoms to it.

So if you add the timeline plugin to the effector you should be able to animate that. I can look at the timeline plugin and see if there's some special integration i can add so you dont have to add the plugin to all the effectors or something similar.
 
I don't suppose you could implement similar code to what's used for Acid Bubble's Collider Editor, to preview what nodes/bones, whatever we're selecting?

Also, I've noticed a UI issue I'm not sure you can solve, as it seems inherent to VAM; namely that when you're at the bottom of the plugin screen, you often can't see the entire list as some of it winds up off-screen.
 
I don't suppose you could implement similar code to what's used for Acid Bubble's Collider Editor, to preview what nodes/bones, whatever we're selecting?

Also, I've noticed a UI issue I'm not sure you can solve, as it seems inherent to VAM; namely that when you're at the bottom of the plugin screen, you often can't see the entire list as some of it winds up off-screen.

I can try, will see if I get time this week. In terms of the second issue pretty sure its just a 'feature' of unity ui.
 
I can try, will see if I get time this week. In terms of the second issue pretty sure its just a 'feature' of unity ui.
I did at least figure out a work-around for the latter issue, just adding a bunch of dummy slots to the bottom of the list so I can scroll through the ones I'm actually using, then removing them once I'm done.
 
I do not understand anything what this Plugin is offering.....

People tell now "its a gamechanger" or whatever add five Star reviews but from the description, i only have huge question marks.

For non VAM programming nerds and beginners .....

What is your plugin offering ?

This description

Adds inverse kinematics to rigged custom unity assets, allowing you to repose or even animate imported assets.

is telling me nothing. What is repose ? And how would a animated asset look like then ?

And regarding your description:

1) Load in a rigged custom unity asset

> What is a rigged Asset ?
How do i know i load a rigged asset ?
And what type would that be usually?

2) Add plugin to the CUA

- What is that and how to do that ?

3) Pick a IK type to configure and add it.

- I do not understand this step either and for what would this be good?

4) pick bones to be moved and hit add

- I do not understand this step either.
What would happen if i would add this ?

Thx a lot :)

Please don't take this the wrong way as I don't mean any disrespect by it at all. But If you don't know what these things are you probably don't need this plugin. However if you would like to learn these things start with the following google searches in order...

1. Rigging in Blender - To learn about bones
2. Porting Rigged Assets from Blender to Unity
3. Inverse Kinematics and Animation in unity
4. Unity Assets to Vam Tutorial

Hope this helps.
 
I'm on it... All over it in fact. How does Ol' Roach from the Witcher sound? ;)

Right now I don't remember what creature it is... but I think that any fantasy creature would be a good start.
Good to hear that! :)
 
imakeboobies updated IK for Custom Unity Assets with a new update entry:

Major new features added

  • Added a guide to show you what bones are included in a particular solver at add time
  • Added a reset pose button to move all bones back to original positions
  • Added more discreate controls per solver that's been added, such as positions or rotation weight.
  • Added better logic when adding full body bones to only give options that make sense
  • Added more eye bones and additional spinal bones to config.
  • Added a head effector to position the head (only available when eye bones...

Read the rest of this update entry...
 

Code is now available if people want to add to it here:


You will need the latest version of rootMotion's FinalIK unity package (https://assetstore.unity.com/packages/tools/animation/final-ik-14290) to be able to compile the code.
 
This is very interesting, thanks.

I have downloaded the project and created the library, but after loading it in VAM I receive the following message
Code:
[IKCUA, IKCUA.dll] : The namespace 'System.Runtime.InteropServices' is prohibited and cannot be referenced

I'm checking the references of your library with mine and both have the same references
Code:
System
System.Core

however yours loads fine while mine gives the above error, somehow System.Runtime.InteropServices is added when linking the dll.
 
Last edited:
This is very interesting, thanks.

I have downloaded the project and created the library, but after loading it in VAM I receive the following message
Code:
[IKCUA, IKCUA.dll] : The namespace 'System.Runtime.InteropServices' is prohibited and cannot be referenced

I'm checking the references of your library with mine and both have the same references
Code:
System
System.Core

however yours loads fine while mine gives the above error, somehow System.Runtime.InteropServices is added when linking the dll.
Make sure you're only included the required files from FinalIK. You can find the list in the csproj file:

 
Back
Top Bottom