FlailingFog / KK-Blender-Porter-Pack

Plugin pack for exporting Koikatsu characters to Blender.
308 stars 29 forks source link

Arm bone weight problem #71

Closed DOODKAHEIMU closed 1 year ago

DOODKAHEIMU commented 2 years ago

The plug-in is very easy to use, but there are still some defects, as shown in the figure. I feel whether there is a problem with the weight of the arm bones when exporting all models. The arm will undergo strange deformation when rotating the bones. I queried these weights in the arm bones. Maybe "cf_s_elback" is the key to the wrong weight of these bones? Later, I came up with the method of weight replication to solve this difficult problem, but obviously this is not the best method, and it is very troublesome. I hope to get the fastest solution in my lifetime (Google translation language is not clea ~$17NFK_Q8L@C088M KHK60 0M)RX3$OM(`2 Q1NZH ZDD6 V D1UZ1KSEC4{C`~H5U8M$Q r)

DOODKAHEIMU commented 2 years ago

There is a problem with the export But it's right in the game 0M)RX3$OM(`2 Q1NZH ZDD6

MediaMoots commented 2 years ago

Try adjusting the twist bones to fix this (cf_s, cf_d)

DOODKAHEIMU commented 2 years ago

Try adjusting the twist bones to fix this (cf_s, cf_d)

Try to twist the bone, but it doesn't work. Can you speak in detail

ilcane87 commented 2 years ago

twist bones (cf_s, cf_d)

On that note, can you explain what the bone prefixes stand for? Like cf_j, k_f, cf_hit... I've been working on adding Rigify controls on top of the armature but for some parts I have a hard time understanding which bones are supposed to be moved and which are just there to provide automatic deformation mechanics.

FlailingFog commented 2 years ago

On that note, can you explain what the bone prefixes stand for?

Might be better to ask on the koikatsu discord, but this is the info I have on the armature:

currently layer 1 has all the main joint bones, layer 2 has the cf_j joint bones not used when IKs are active, layer 3 has the cf_s bones used in the character creator and in some joint corrections, layer 4 has the cf_d bones used for joint corrections, layer 5 contains bones used by the better penetration armature so if you had that body type selected in koikatsu this is where the bones for the toes and stuff will be, layer 17 has the upper face bones, layer 18 has the lower face bones, layer 9 has the skirt bones, layer 10 has the accessory bones that have weight to them, layer 11 has all the intermediate bones that don't have weight to them (I find these completely useless), layer 12 has the cf_hit bones for physics and layer 13 has the kf bones that you can use for IK applications.

Also, if you search for the user johnbbob_la_petite on the discord they've made a rigify armature on top of the existing armature you might be interested in looking at. It also has joint corrections on it, so you may find that useful too (though if you've already looked at the KKBP joint corrections you won't find anything new because I copied these directly from their armature).

FlailingFog commented 2 years ago

There is a problem with the export But it's right in the game

The export is okay but the in-game joint correction bones are not being accurately replicated in Blender. Also, some cf_s and cf_d bones on layer 3 and 4 have "drivers" enabled. You need to disable the driver in the drivers window before you can move it around (or right click on the pink location values and delete the driver).

MediaMoots commented 2 years ago

cf_j: j -> Joint Bone cf_d: d -> Dynamic Bone cf_s: s -> Scale Bone

cf_hit: mouse hitbox bones kf: I Don't know, haha

ilcane87 commented 2 years ago

Might be better to ask on the koikatsu discord, but this is the info I have on the armature

Thanks a lot, that's what I was looking for.

the user johnbbob_la_petite on the discord they've made a rigify armature on top of the existing armature

Nice, I found his blend file and instructions which can be used for reference, but his process was unnecessarily complicated, it seems like he thought that in order to use Rigify you must start from the default metarig, which is really just a standard skeleton with a few Rigify properties set on some bones. The way I'm doing it is just adding the properties to the existing armature and generating the control rig from it, it's not going to be a long script by the end. In fact, you can add Rigify controls to any kind of bone structure, such as hair or clothes for example.

KKBP joint corrections

It would be great if you could provide me with a list of all the bones involved in those joint corrections, so I can make sure their functionalities are not disrupted in the final rig.

FlailingFog commented 2 years ago

cf_hit: mouse hitbox bones

Darn I must have confused this with something else

a list of all the bones involved in those joint corrections

There's a list in bonedrivers.py from lines 332-378 and lines 439-498.
Ignore the cfj bones for the first set of lines

MediaMoots commented 2 years ago

Darn I must have confused this with something else

I'm not 100% sure that it's the mouse hitboxes, but from what I've seen in the source code it appears to be the case.