The interaction between hands and objects in VR

background

Oculus' Touch, HTC Vive's Controller, PSVR's PS Move, and the three first-line VR hardware are all conveying a message to everyone: Somatosensory controllers that can simulate hands in VR are a trend. In VR games, once you have hands, this It means that you can not only watch.... If the previous VR games only changed the output method (display), now there are two hands, and the input method has also changed, which is a revolutionary game for the game. Changes can completely change the user experience. From this, we have also seen some VR applications that represent the future begin to appear: such as space painting Tilt Brush, VR sculpture Oculus Medium, etc. From the perspective of gameplay, if we can combine traditional gameplay with Combined with the way the hands interact, this is an innovation that can make VR games not just good-looking, but also fun.

This dual-wielding motion controller, collectively called MotionController in UE4, is in Unity (we are all wild children). With hands, what is the first thing you want to do? (Well, I don't mean touching) Yes Grab things, throw things. For the operation mode based on Motion Controller, it is the most basic function. However, this seemingly simple function has many problems, and there is no way to be perfect.

Common implementation methods

Isn't it just hanging the object on the hand? Is it so difficult? Let me analyze the implementation first:

1. Attach To Hand

This is also the most common implementation method, directly using Hand as the parent node and hanging the object as a child

2. Set Position

Update the position (and orientation) of the object every frame to keep it consistent with the Hand. Compared with method 1, you need to consider the collision when moving, for example, in UE4, set Sweep=true

3. Set Velocity

Update the speed (angular velocity) of the object every frame, so that it keeps chasing the Hand. The disadvantage of this method is that there is a frame delay, and the moving fast is the visible object and the hand detached.

4. Constraint

Directly connect the collision body of the object and the hand with Constraint. It looks very similar to method 1, the difference is that one is at the scene logic level and the other is at the physics engine level.

some details

Because hands are virtual, and objects are virtual, it is impossible to simulate the exact same experience in reality (at least not at this stage). Not all of the above methods can't be used, but each has its own imperfections. Place. Let’s go through the questions one by one:

object's gravity

Except for suspended objects, they generally have weight. But after holding it in your hand, this force needs to be released, otherwise it will keep falling down. Generally, after you grab it, turn off the effect of gravity, and then release it again. Recovery, everyone should take this into consideration.

speed when thrown

The implementation of method 2 does not actually inherit the speed of the hand after throwing it out, so it is necessary to set the speed (and angular velocity) of the Rigidbody by itself. Method 1 will have similar problems for different engine implementation mechanisms.

Collision with static scene model

When we are not grasping something, let the hand be inserted into the static scene model (such as a wall), how to deal with it? One way is to keep the hand in the same position as in reality, the other way is to let the hand stay in the collision place and do not move . The former approach is more common, because it can have a better sense of immersion, but some people have objections, the following is based on the former approach.
When we hold things in our hands, let the objects on our hands insert The wall, what should I do at this time? Some people say that it can pass through the wall like a hand, but if you do that, if you release your hand at this time, the object will be stuck on the wall, or will be bounced off (physics engine Therefore, the correct way is generally to keep the object in your hand on the wall, pass your hand through it, and if you let go at this time, the object will fall naturally.
Both methods 1 and 4 have problems of interspersed. Method 3 will There is a jitter problem caused by constant collision, which can be solved by temporarily disabling the elastic coefficient.

collision with dynamic objects

Assuming that object A and object B are both dynamic physical objects that can be picked up, pick up object A and push object B. Method 2 object A will stop on object B, and object B will not move. Method 1 and method 4 can be Push object B. Method 3 If the mass of object A is much smaller than that of object B, it cannot be pushed, so this is the result that best meets our expectations.

Collision with fast waving of an object in hand

A common application scenario is to hit the ball with a racket in hand. Method 1 will not hit the ball when the speed is very fast, because the previous frame is in front of the ball, and the next frame runs behind the ball. Method 2 The racket will Stop where it makes contact with the ball. Methods 3 and 4 work as expected.

Interact with constrained dynamic objects

For example, a turntable can only rotate around one axis. Hold an object and push the turntable.
Method 1: The turntable will be pushed off the axis of rotation
Method 2: The object stops at the position in contact with the turntable
Method 3: The object stops in contact with the turntable position, the turntable will rotate normally, but there will also be a jitter problem
Method 4: The object will be interspersed with the turntable, but the turntable will rotate normally

It is not possible to directly grab the turntable with bare hands for interaction. You can refer to the implementation of NVR (Reference 1), and change the grabbing behavior to release the afterburner to rotate the turntable.

the weight of the object

If you want to simulate the performance of objects with different weights when lifting the object, you can simulate the relative movement between the object and the hand by applying force, and express the weight of different objects by speed. See Reference 2

touch of objects

Objects with different materials and different weights can be simulated by the vibration frequency and amplitude of the controller.

The relative position (and rotation) of the object to the hand

Some objects we want to be able to grab at any position, such as balls, vases, toys, etc. Some objects we want to pick up at the handle position, such as rackets, pistols, etc. This can be solved by setting a hanging point on the object.

other

To be continued…

References

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325386339&siteId=291194637