FlailingFog / KK-Blender-Porter-Pack

Plugin pack for exporting Koikatsu characters to Blender.
Other
356 stars 30 forks source link

Question about bone constraints #393

Open speaker-60 opened 1 year ago

speaker-60 commented 1 year ago

Is there any information about the bone constraints that the game uses where one bone rotates when another bone rotates at a certain angle ect

So an example if i rotate the thigh bone sideways 90 degrees some of the butt and other hip bones need adjustments So im wondering if the setup the game must use for its posing could be dumped in someway If we can get a txt of all the bone names and the constraints they use, then maybe a blender script could auto apply them in a blender import.

Even without the blender script i could take the dumped list and add the constraints manually to my blends Having the list will help me know what is what ect

Same could be said for the all the bones and the bodysliders, a dumped bone list to the sliders that uses them ect So i can use the list to add them manually, like i could setup some control sliders like this https://faceit-doc.readthedocs.io/en/latest/img/crig/draw_ranges.jpg

Having the dumped list would make this more feasible to do manually but i would love blender scripts to automate this

FlailingFog commented 1 year ago

If you take a look through this script you can see the driver constraints that KKBP automatically applies during import for the KKBP armature and the Rigify armature. You've probably already noticed these aren't completely accurate to the in-game constraints though, and still need manual fixing in some spots.

I'm not aware of any dumped list for the constraints but that would be great information for fixing and potentially replicating the in-game ones.

In the past, the closest I've gotten to getting real constraint data manually is doing the following

Which is very slow and annoying to do, and even then this method only gives bone location constraint info and will not tell you if a constrained bone is rotated or not.

I also recall not being able to view the rotation / location data of each constraint bone with the koikatsu ABMX plugin, so I'm not sure how else you'd go about it.

speaker-60 commented 1 year ago

Yer some way to get this information would massively help With that then something could probably be automated, rigs imported can be better setup to look and work much more closely to the ingame counterpart.

Same goes for the body sliders, there all just bone transformation right. getting all this information could allow a script to auto setup the body sliders in blender. Then the kkbp wouldn't need to bake the sliders into the model but instead export the base model along with a file containing all the slider values for that character. Then the blender importer imports the base model setups up the sliders then sets the slider values to the values of the exported file

With that you could negate the need to export the character from the game itself, as blender could append a base model and just set the values accordingly. Another thing, have a mod that exports every asset(clothes hair ect) And have a blender script that setups a 'asset browser' library so now you would have instant access to all your assets right in blender all ready to go based on what you have installed(mods)

At that point the blender importer could just import character cards directly, it appends the base body uses the slider values from the character card then looks up hair/clothing ect from the asset browser library and appends what it can find

The advantage of appending a base body model instead of export/importing a new model every time is that base body model can be setup with constraints and otherwise be manually edited that every character would use. Say i edit the base model and add in some new bones and weights for something, now if i import a character card it appends the base body with the edits i made. This workflow would mean things are only setup once and then reused vs everything being redone each export