Hi,
I've been working on my own version of the Unreal Live Link plugin since, as I mentioned in another thread, I think the official version is overpriced and also, more critically for me, it just doesn't work in my project as I build Unreal from source code.
I've made pretty good progress so far in just a few days. Getting the Live Link bit working was fairly straight forward as I expected (since Epic provide all the code for this) so I have the live data link between iClone and UE 4.23 working and I can print out all the transforms from objects and characters in Unreal and see them changing as they are animating in iClone. That's all fine, and if I link those transforms to visible objects with a single transform (like cameras, props or character roots) in Unreal the objects move and rotate as expected.
The next stage is the bit that I was expecting to be tricky, and it is, but not for the reasons I predicted.
To get animated characters working I need to retarget the animations from iClone's internal characters bone structure to the different bone structure of the characters once they have been imported into Unreal. The official plugin seems to do this internally inside iClone, whereas I'm planning on using Unreal's animation retargeting system, which I believe will provide more flexibility for driving different characters in Unreal, plus I don't have access to iClone’s retargeting code as it's not exposed to the Python API, AFAIK.
My current sticking point though is that the transforms of the bones in iClone look odd, which is confusing my attempts to retarget them in Unreal.
I've attached a plugin script which dumps out the bone hierarchy and transforms for the current pose of a character in iClone. When I run this for a character in the default T pose, I get something like this...
What I find odd, is that transform on the Hips, which is the first child of the root. The positional element looks fine (a 94cm z (up) offset), but that quaternion rotation (X Y Z W is the output format) is a 90-degree rotation around the X axis, which seems strange to me, as I'd expect the hip rotation to be close to Identity. Can anyone help me understand why it's there, and why it has no visible effect on the character in iClone, as if I apply my theoretical knowledge of hierarchical transforms I would expect this to flip the character so that it was lying flat with its head pointing along the Y axis.
As an aside, I'm also wondering if this is related to something else I've noticed when using iClone. If I select the character root, like this...
... then the rotation axis are aligned with the world axis. i.e the Red x-axis rotator goes around the world x-axis, and the same applies to the y and z axes.
But if I now select the Hip bone...
...the y and z axes are no longer aligned, but are instead consistent with a 90 degree rotation around the x axis, like I'm seeing in the bone transform data. What's going on here? Why is there a 90 rotation with no noticeable effect on the character?
Is this a bug/issue with iClone, or something fundamental I'm misunderstanding? I don't claim to be an expert in animation systems, and one of the reasons I'm attempting to do this is to learn more about iClone and Unreal, so it's quite possible this is just me not understanding something important. Can anyone shine some light on this for me and help me understand?
Ultimately, when I get this working, I'd like to release what I have as open source on GitHub so others can use it and perhaps contribute to improving it. At the very least I have a Python wrapper for the Unreal Live Link dll that Epic provides which might be useful for others who want to experiment with a live data link to Unreal from within the iClone Python API.
Many thanks,
Will
Edited
5 Years Ago by
will.cowling.uk