GrabbableObject Editor Flexibility
Excluding programming, most of the time spent while authoring interactions is on creating grab poses and editing grabbable objects. Grabbable objects are configured using a GrabbableObject component, telling how the object behaves and one or more points that the object can be grabbed from.
Complex interactions in a cockpit
Having a good GrabbableObject editor is very helpful to minimize the time it takes to make an object grabbable. But after developing many different VR applications, it has been the most challenging to get right. We often got to this point:
- An application requires a new manipulation parameter for an object because the current parameter list doesn’t support this behavior.
- The component is now more flexible, a new parameter has been exposed for editing.
- The more parameters that are exposed, the more cluttered the UI becomes and the more difficult it becomes to use.
- At some point, it becomes too difficult, unintuitive and the initial goal of lowering turnaround times is not met.
This is expected. After all manipulation is an extremely complex process and there are hundreds of things that you can do with an object. It’s not pressing X on a control pad to ‘use’ an object anymore, now it’s all about being inside the world and using your own hands to manipulate objects. The possibilities are endless.
I have found that in these cases, most of the new functionality can be grouped into two main categories:
- How an object is grabbed. For example, being able to grab a stick using every position and angle possible, in both directions.
- How an object behaves. For example, a knob in a control panel that can be turned to four different positions.
My solution to this problem has been creating a solid GrabbableObject base and the architecture to expand functionality using two types of specialization components.
- GrabPointShape: Expands single grab points on an object to well-known shapes that make grabbing more flexible. For example, a cylinder shape can be added to a crowbar so that the single, default grab point can now be used along the whole length and with any angle. Another example can be a box shape so that a book can be grabbed by an arbitrary point in any of the 4 sides instead of a single spot.
- SpatialControl: Adds specialization functionality by taking over control of some of the parameters in the GrabbableObject and add new behavior. For example, a Knob component will hide all GrabbableObject parameters that allow editing rotational constraints, take control over them, and add behavior to snap to the different positions in the knob rotation.
This new architecture has proven to be very valuable because functionality is now well compartmentalized. It has the additional benefit of simplifying user interfaces because these specialization components will hide a lot more parameters from the GrabbableObject than they expose on their own component. And these are way easier to understand because they relate directly to the specialized functionality instead of being generic.
– – — – –
These have been some important experiences that helped us shorten development times and establish a solid foundation that can be expanded in the future. Thank you for sticking with me. I hope these thoughts can help make clear some of the inner workings of VR applications. Maybe they can also inspire other VR developers working on similar tech or even make them consider using UltimateXR in their projects.