Home Artists Posts Import Register

Content

In most games, including AAA titles, characters usually pick up objects in an unrealistic fashion. That is, the object either disappears/teleports to  hands/or lerps towards their torso. I decided to give Shinobu a realistic way to pick up objects because I wanted her AI to feel smart. The brute force approach would be to raycast a million times to find proper finger placements but this is not only really hard, it wouldn't work well for objects that have context (some objects need to be picked up in a special way e.g. a mug, lollipop,book), not to mention lots of technical problems such as raycast accuracy, performance, etc. So my approach instead solves context by deciding on the proper forms to hold a certain object ahead of time. These forms depend on the angle that the hand is coming from. For example, the following image shows different forms to pick up a mug when approaching it from 3 different directions:

From the right: uses the handle. From the top: grab the top. From the left: cup the mug.

So now when Shinobu's hand approaches an object, she will calculate the most appropriate way to pickup the object depending on the direction that her hand is coming from and the orientation of the object.

 Video 1 shows form above to pick up the ducky when it stands. (gonna move the thumb down a bit it looks a bit awkward).

Video 2 shows the other form above.

Notice how the ducky maintains local rotations more so as it is being picked up. It looks more realistic. The more hold forms I add for an object, the less rotational "sliding" an object will get as it gets locked to the hand. 2 to 3 are good. Also this is great for context because now I can bake out a perfect mug holding form with the handle. Or maybe raise her pinky when picking up a donut. Or maybe make only 1 way to hold a certain special item. Context.

I had to spend some time cleaning up the internal task permissions system so behaviors can mix. I changed the way her happiness meter works. Before it was a simple true or false boolean. But now it will be an integer from -1 to 2. If at -1 or 0 she will be angry, if at 1 or 2, she will be happy. This means that she can now be VERY angry or VERY happy at the value extremes.

One new behavior is now throwing objects at you when she is very angry. I made a throw animation, tied it to her logic and IK and voila. Video 3 shows it off. There are still a few bugs with her movement that are easy to fix but I didn't have enough time for this dev blog post. I will be revisiting her locomotion logic module. The next step is bugfixing this and modeling donuts for her eating behavior.

Files

Comments

No comments found for this post.