FlailingFog / KK-Blender-Porter-Pack

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

How can we make characters with several outfits? #183

Closed LuluViBritannia012 closed 1 year ago

LuluViBritannia012 commented 1 year ago

Hey there! First of all, thank you so much for this. Koikatsu has an excellent anime character editor, so it's great to be able to export our creations to do something else than... whatever this game offers. Right now I'm using it to make VRChat avatars. It works great, but there's one feature I'd love to use in this game: the ability to swap clothes in real time. We can get several outfits with the latest versions, there are several Youtube tutorials explaining how. But in all those tutorials, they start with a model that has different meshes: one for the body, then one per outfit. Then they just toggle one mesh or the other to swap between them.

Right now, this plugin merges all the meshes together. As a result, since we can't separate the clothes from the body, we can't give our exported characters multiple clothes! It's even more sad when you realize Koikatsu does have several outfits per character, lol.

So, here is my request : could you find a way for this plugin to work without merging the meshes together? If we could keep the outfits split from the body, we could then give it as secondary outfits somehow. For now I'm looking for workarounds. I know we can make the character half-naked, but I'm not sure about how to properly merge it with clothes after that...

MediaMoots commented 1 year ago

👀

MediaMoots commented 1 year ago

image

Still WIP

MediaMoots commented 1 year ago

@LuluViBritannia012 https://github.com/FlailingFog/KK-Blender-Porter-Pack/pull/138#issuecomment-1160076353

LuluViBritannia012 commented 1 year ago

Well that was fast x). I see that you updated the Exporter so that it extracts several outfits. So now we only have to wait for the add-on to be updated?

Thank you very much for your work!

MediaMoots commented 1 year ago

So now we only have to wait for the add-on to be updated?

Pretty much, but I'm having some issues with bones, so we shall see.

LuluViBritannia012 commented 1 year ago

You already solved the problem apparently x). You guys are the best! The last image you posted (showing all the outfits as separate meshes on a single armature in Blender) is exactly what I'd like. After that, the one thing I'd need is the ability to merge armatures together in Blender (so we can add other clothes aside from those exported from KK). I know there's a button for that in CATS, I'll try it out.

I have another question, but related to my first so I'm posting it here if that's ok ^^. During the process, we have the ability to separate the meshes. I love the idea, this can be used to make several layers for a single outfit. But the export process fuses all the meshes together! No matter what option we choose, as long as we press "Prep for target application", all the meshes are combined. And we can't export the model without pressing that damned button, lol. Is there a way to get around that? My goal is to export a model with a single armature but separate meshes, so if we can finish the job without fusing them, I can then use it to get multiple outfits (or cloth layers).

EDIT : OK, I just realized there's an "Export separate meshes" button in the Extra. So we can already split clothes and make one layer per part. Now I have one issue with this process: the separate mesh has its own armature. I can import it again in Blender and merge the armatures together with CATS, but the reimported clothes don't have their materials by default, I have to reassign them all manually T_T. The atlas material option can't be used without merging the clothes with the body either.

FlailingFog commented 1 year ago

The prep for export button just merges the meshes so you can conveniently bake them all at once. If you want, you can use the prep button, bake/apply/atlas the materials, then re-separate the meshes in edit mode to get things back into multiple objects (like how the hair is separated in the beginning).

LuluViBritannia012 commented 1 year ago

I should have mentioned I'm a lazy b*tch ^^'. I'm making a workflow that would allow me to mass-produce VRChat avatars with dynamic clothing. Your plugin is perfect for that, as it's just a few clicks to import-export from KK to Unity (without counting the time needed for fixes of course). But it could be even more perfect! If we could import a character with multiple outfits (which you guys are working on, so I know it's coming) and export the characters without merging the meshes, this tool would become even more convenient.

But I'll try by manually splitting the meshes, like you said. I've also figured out another way... maybe. I'll try it. If that works, the workflow would still be fairly simple.

EDIT : Ok, so.... what's your policy about others modifying your program? Because I rewrote a few lines of codes, and actually succeeded to export a character while keeping all the meshes separated. I had to rewrite a few lines of CATS too (which I know is open source), and the model isn't as optimized (I had to disable a few useful codes along the process). Was it okay for me to do it? If that's so, can I make my modded files public to help people in my situation? If you say no, it's alright of course ^^. I'd just keep it to myself.

TheMaskedMan00 commented 1 year ago

Personally I do not like the new update as it is EXTREMELY slow for my puny little laptop, exporting something from kk with the old plugin takes under 1-2 mins, but with the new one there is no option to export only one outfit and it takes over 20 mins. And in blender pressing prep for export takes over an hour.

TheMaskedMan00 commented 1 year ago

I guess that’s just a problem with my computer though, I wish there was a way to still export only one outfit

FlailingFog commented 1 year ago

and export the characters without merging the meshes

The meshes are now kept separate in the PR branch. As long as the object is not hidden in the outliner, it'll be baked. I haven't added a license to the project so technically you can do whatever you want

And in blender pressing prep for export takes over an hour.

This is how it was supposed to work in the V5 plugin but I accidentally commented the line out. It seems like it slowed down, but it's really the same thing. You can choose the "No changes (FAST)" option in the PR branch plugin to get the same behaviour from V5