KospY / BasSDK

Official SDK for the VR game "Blade & Sorcery"
https://store.steampowered.com/app/629730/Blade_and_Sorcery
112 stars 63 forks source link

Custom NPC eye bones snap to neck joint #60

Open IanLiotta opened 10 months ago

IanLiotta commented 10 months ago

I am attempting to build a humanoid NPC based on TestChar. While I've been mostly successful, I have a persistent problem. At the moment of loading in, or if loaded without a working Brain, the NPC's model looks fine. The moment facial animation engages, the eyes snap to the base of the skull and stay there. The eye blinks continue to animate, they're just in the wrong location. I am wondering if this is a limitation of the facial animation system or a bug.

loukylor commented 10 months ago

Are there any errors in the console and how are the eyes set up? In terms of the model's rig, the eyes in the Creature object and eyes in the CreatureData.

IanLiotta commented 10 months ago

No console errors.

The rig I'm working from is the one in the Cut Guides provided in the SDK, just with the bones moved around a little (my test character is a goblin with a really big head)

To set up the eyes, I start by copying the Creature Eye components from TestChar's eye bones, pasting them on my rig's eye bones, and changing the transform for the upper and lower lids to refer to my rig. In the Creature component I have Auto Eye Clips Active turned on and under All Eyes I add the Creature Eye references I made. I've tried some variations on these settings but with no positive results.

loukylor commented 10 months ago

Hm, I'm not entirely sure. That all sounds ok. What brain are you using in the creature's data json?

IanLiotta commented 10 months ago

HumanMedium. It behaves as expected aside from this eye bug.

PlasticTangerine commented 3 weeks ago

Really hate to necro this, yet I managed to find a fix.

When you set up the rig and make it a humanoid rig, it will auto populate the bone values. If you go in to edit the avatar and look at the bones in the head, the Left/Right Eye values will default to LeftEye & RightEye (assuming you copied the cut guides skeleton).

If you look at the Test Char provided with the SDK, you can see that the values for the eyes should actually be Left/RightEyeGlobe. If you replace the bones with the Globe bones, the eyes will work as intended. image

Because this is how it's set up in the SDK, I do not think this is a bug.