soupday / CCiC-Blender-Pipeline-Plugin

Python plugin for CC4 and iClone8 to re-import character exports from CC3/CC4 Blender Tools auto-setup add-on.
GNU General Public License v3.0
104 stars 16 forks source link

Sending to CC/IC from Blender issues #36

Closed cuddlyogre closed 5 months ago

cuddlyogre commented 5 months ago

I don't know if this is a CCIC issue, or a Blender issue.

The character was exported from CC using the CC/iClone Blender Pipeline v2.0.8 with the default settings. CC/iClone Blender Pipeline Plugin in CC/IC is 2.0.8b

When sending poses and animations to CC/IC from Blender, not everything makes it. Whether or not the character has been rigified doesn't seem to matter.

This pose was sent from CC to Blender without a problem, but when I send it back, the leg translations don't make it.

Blender pose 00 04

In CC, but also happens in IC 01 05

When sending poses from CC to Blender and you're using Rigify, this happens: 06 07

Exporting a motion with rigify is also having troubles. Using the default skeleton exports and imports without a problem. End pose in Blender: image

End pose in CC image

If I don't uncheck select root bone, this happens: image

I couldn't recreate it here, but sometimes the RibsTwist bones import incorrectly, causing odd placement and scaling.

soupday commented 5 months ago

What method are you using to export back to CC4?

cuddlyogre commented 5 months ago

I'm sorry, I forgot that important bit.

It's the data link tools with 4.1 that are giving me trouble. The traditional import/export file process works mostly perfectly.

However, I discovered today that if the avatar is rigified and isn't set up with tpose as bind pose, the animation is incorrect when imported back into blender.

If you have a tpose as bind pose, it seems to work perfectly.

cuddlyogre commented 5 months ago

When you send a pose from CC to Blender with a rigified avatar and it turns it into the butterfly demon looking thing, the bones in the skeleton are all individually scaled way down.

cuddlyogre commented 5 months ago

More update: The culprit for the butterfly demon bug is at write_sequence_actions when you set the f curve values. It appears that somewhere a scaling number isn't being applied properly and all the bones are being scaled down, my guess is by 100x, since that is the scale of the avatar mesh when it is imported.

soupday commented 5 months ago

Yeah, the rigify rig bones are at world units scale (1 unit = 1m) wheres everything from CC/iC is 1 unit = 1cm. It was in fact decode_pose_frame_data() setting the wrong armature scale.

Should be fixed in 2.0.9. All the datalink animation transfer functionality should work, and it should go a lot faster now.

The foot problem in CC4 is due to the foot IK being permanently locked. The latest version CC 4.42.3004.1 released a few days ago fixed this.

cuddlyogre commented 5 months ago

Awesome. I'll check it out and let you know. I appreciate the work you've done on this!

soupday commented 5 months ago

And... I've just realised that iClone doesn't yet have the new API functions to correct the facial expression bone rotations, which is probably why it all went wrong in iClone too.

I've updated the 2.0.9 plug-in for CC4/iClone, so you'll probably need to get that again.

cuddlyogre commented 5 months ago

It all works like a charm. Thanks again!