FlailingFog / KK-Blender-Porter-Pack

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

How do you use the gag eyes actually ? #348

Closed johnvo0918 closed 7 months ago

johnvo0918 commented 1 year ago

I've been banging my head for the past half an hour trying to figure out how to enable the cartoon eyes and the animated eyes but it just looks like their textures don't exist ? I checked the baked texture folders and theyre not even in there. I dug around this github and can't find anything and the wiki is... empty... (actually is it possible to open the wiki to the public to post on ?) Turning on the purple gageye then turning on any of the cartoony eyes or animated eyes they just don't exist...

image

FlailingFog commented 1 year ago

I'm not sure how it behaves after you bake it, but right after importing you should be able to simply enable the gag eye shapekey like in your screenshot. The baker skips the gag eye materials on purpose because it would screw up the animated gag eye textures, and wouldn't bake all of the textures, only the default ones. Because the baker doesn't touch the gag eyes, I think the gag eyes would work whether you baked it or not.

If you're still trying to figure out what went wrong, here's some additional info: If you click on the arrow next to "Body" in the outliner and select the gag eyes object, you can open the material and confirm the node groups and textures are loaded in. You can also confirm the gag eye shapekeys all have purple drivers. image

Then, you can right click on any of the "gag eye ##" shapekeys on the bottom of the shapekey list, delete the driver and manually set it to 1 to check that the gag eye mesh correctly pops out image

Then you can check the transparency is working. I popped out gageye00, so on the gageye00 material slot I disabled the driver for "Hide gag eye" and changed the slider value to check the transparency is working image

johnvo0918 commented 1 year ago

image I'm still unsure. The texture seems to not exist. the file is completely transparent image Following the tutorial I manage to get the eyes BUT i'm 99% sure that they wont be saved if I export the model to unity. So if I want those gag eyes what should I do ?

FlailingFog commented 1 year ago

Sorry, I thought I put in something to stop the gag eyes from being baked but I guess that wasn't the case...

If you want to use the gag eyes in unity you should be able to just load the textures from the folder that contains the pmx file: image If a material with these textures are loaded onto the gag eye, and the gag eye ## blendshape to pop them out is enabled, it should work

johnvo0918 commented 1 year ago

Sorry, I thought I put in something to stop the gag eyes from being baked but I guess that wasn't the case...

no no it wasn't baked at all, take a look at the first screenshot that's the folder where i have all the baked texture. as you can see it exported a blank png.

I see that there are only 3 gag slots under gageyes, i can see there are 10 of them do i need to make 7 more ? what you mean by just load the texture ? like load into blender ? How about the animated ones ? How does the shape keys know which one to pick up ?? I need more information on this...

johnvo0918 commented 1 year ago

@FlailingFog hey i don't want to bother you much since you're working hard on this project, i just need an answer for this. thank you

FlailingFog commented 1 year ago

I'm not sure which shader you're using in Unity, but for the MToon material you should be able to just drag the gag eye textures (not the baked version of the gag eye, the ones in the .pmx folder) into the correct Unity material slot. For example if you want a gag eye 01 expression, you need to find the gag eye 01 material slot in Unity, create a new material in Unity and manually drag a 01 file (heart or spiral) into the MToon material's texture input. Then, you have to manually activate the gageye blendshape on the Body object, and manually activate the gageye 01 blendshape on the gag eye object image

That's just for one gag eye texture for one slot. If you want it to switch around between the ten expressions automatically like it is in Blender, then you probably have to set it up with the scripting tools in Unity. Same thing would go for animated textures. These are only animated in Blender because I set up drivers and shader nodes to make the static textures appear animated. I also set it up such that each shapekey will activate the correct expression in Blender, they aren't real shapekeys, they just activate the blendshapes I mentioned above and swap in the right texture.

johnvo0918 commented 1 year ago

@FlailingFog Thanks for the explanation! I kinda understand how it works now... I'll use mtoon.

Is this the correct way to setup more gag slots ? I just made a new material then copied their corresponding slot onto the new material.

image

It looks like Gag00 has 5 different texture I think I'll create 4 extras then do the same for other slots ?

Will you add the feature to automatically export the gag eyes to unity in the future ? I see that a few items are not used too like

cf_m_hitomi_00_cf_t_expression_00_EXPR cf_m_hitomi_00_cf_t_expression_00_EXPR

cf_m_hitomi_00_cf_t_expression_01_EXPR cf_m_hitomi_00_cf_t_expression_01_EXPR

I believe those go in the middle of the iris

johnvo0918 commented 1 year ago

Nvm if I create material by copy the material and paste it on a new material it will just get deleted upon clicking the Save Atlas to button. image

FlailingFog commented 1 year ago

No, you can't use a gag eye atlas when exporting, and you can't use the existing blender material groups. You need to keep the three material slots that they already come with, export it with the three material slots and manually set the materials up in Unity

Those two expressions are used on the Eye Shader in blender, but you'll have to do something different with them in Unity (same thing, don't atlas the eyes and manually set it up in Unity)