Skip to main content
Version: 5.x
Supported on
Snapchat
Camera Kit

Ring Binding Component

The Ring Binding Component enables ring try-on experiences in Lens Studio; it binds ring objects to the fingers with the help of reference points pinned to the surface of the hand mesh. Each hand has 14 positions to place a ring on, which are each identical mirrors of the other hand.

Multiple Rings Binding Components can be used in parallel.

Installing

The Ring Binding Component is a Custom Component you can install from the Asset Library,

Usage

The custom component must be placed within the Perspective camera, with a ring mesh inside it as a child.

In the component's settings, the standard settings allow you to position the ring on certain joints of the hand.

The component provides options for:

  • Selecting the hand to try on the ring (2 hands)
  • Selecting the finger on the hand (5 fingers each hand)
  • Selecting the section on the finger (2 sections on thumb, 3 sections on other fingers, where proximal is the closest to the palm and distal is the furthest).

With those you can configure where you want the ring to be placed for try-on.

When advanced is enabled additional settings become available. Users can elect to show the reference points - visual indications of all the joints that the ring can be attached to.

Additionally, there is an option to turn on a constrained display for the ring, which determines if the ring should be displayed based on the transform of the tracked hand (this option can be turned on and off). This is to make sure the ring is not displayed at angles that don't make the try-on look accurate. The ring is disabled if the selected hand is:

  • Not being tracked
  • Too close to the camera
  • The rotation on pitch or yaw axis is beyond thresholds.

Lastly, the ring’s offset position, rotation and scale in relation to the target joint can be modified.

​​API

Aside from the Script UI, the ring can also be used with a script API.


isTracking()

Returns True if the selected hand is being tracked.


getHandSelection(int)

Gets the hand currently selected.


setHandSelection(int)

Sets either left (0) / right (1) hand as selected hand.


getFingerSelection(int)

Gets the finger currently selected.


setFingerSelection(int)

Sets one of the five fingers as selected finger.


getSectionSelection(int)

Gets the section currently selected.


setSectionSelection(int)

Sets one of the sections as selected section on the finger.

Was this page helpful?
Yes
No