AI Investigation - Rigged 3d Hand Model Prototype
New here? Learn about Bountify and follow @bountify to get notified of new bounties! x

Budget will be increased if your solution shows potential.

Important: User with best ideas (or code) will gain this bounty

Using the 3d Js framework of your choice,
I need you to display a rigged human hand, that is capable of doing all movements a human hand is capable of doing.

This means moving all phalanges and moving the thumb under the palm.

Constrains should be placed so that movements that are not possible are not permitted (e.g: stretching the fingers more than it is naturally possible)

Permitted movements:

  • 4 main fingers's base phalanges: move up/down. Move left/right. Each finger should have a different constrain of how much it can move horizontally and vertically (e.g: the pinky can move much more horizontally than the middle finger, so constrains should be different for each finger).

  • 4 main finger's second and third phalanges: move up/down

  • Thumb base phalange: move up/down. Move left/right. Constrain: if the thumb is below the palm it can move more horizontally. If it is at the same level as the palm, the horizontal movement is constrained).

  • Thumb second phalange: move up/down

The hand does not need to look real, I just want an accurate physics representation,
so the hand could be displayed with "sticks" for each phalange.

A math/physics model is what I am actually looking for. A 3d output will be the natural result of the correct model. This will serve for the basis of an AI project.

IMPORTANT: The following demo seems to be having a working hand model with all requirements above already done. Double check this and if so could you strip down the LeapJs code so we can manipulate the hand movements using js input?
https://github.com/leapmotion/leapjs-rigged-hand

awarded to PlatinumBobo
Tags
javascript

Crowdsource coding tasks.

1 Solution


Here's my solution: https://pastebin.com/eMDjSZ5n (the paste is set to expire in a week). It uses three.js and underscore. Download the paste as an .html file and open it in a browser (it works well in Firefox and Chrome).

The JavaScript code is at the end.

I took the rough measurements of length and angle constraints from my own left hand. I also took the liberty to add movements for some of the metacarpals (the bones in the palm).

Some of the movement aren't natural because of how the constraints are expressed. For example, I can move my pinky horizontally when it's extended, but not when it's folded into my palm. Yet, in the model, it can still move horizontally when it's folded.

To control the hand in JavaScript, you'll have to modify the handControls variable with your code. It's an array of arrays of objects. The first level is for each finger (from thumb to pinky), and the second level is for each bone (from metacarpal to distal). The objects have h and v members to control the angle(s) of the joint. It's a number between 0.0 and 1.0 to linearly interpolate between the extremes of their respective constraint. If one or both member is missing, that just means it can't be controlled. Once the changes are made to the handControls variable, updateHand() must be called to apply the changes to the three.js scene.

To change the constraints, you'll have to modify the handConstraints constant in the code. It has a similar structure to the handControls variable. The values of the h and v are either arrays to represent a range of motion, or a number to represent a static number. The values are in degrees.

Hi Platinum, this is just an amazing work you did! I am impressed by the efficiency and simplicity of your solution. Thanks! Please contact me via email. I have sent you my contact. Thanks!
georgefountain 4 months ago