cancel
Showing results for 
Search instead for 
Did you mean: 

How do I scale the user (avatar) in the VR environment?

andyborrell-ahu
Protege
How do I scale the user (avatar) in the VR environment?
1 ACCEPTED SOLUTION

Accepted Solutions

andyborrell-ahu
Protege

The user's sense of their own size in a virtual world mainly comes from the distance between the stereo cameras in the scene, and from the movement in the scene that results from their head movement. By default the distance between the cameras corresponds to the user's IPD (as configured in their profile), and camera movement matches head movement, where 1m of real-world distance equals 1 unit in scene space. So an interpupillary distance of 60mm corresponds to a camera separation of 0.06 scene units.

You can change how big the user feels in the scene by scaling the relationship between real world distances and scene distances. You can do this by scaling the positions in the eye poses provided by a call to *ovrHmd_GetEyePoses*. Scale factors greater than 1 will make the user feel bigger relative to scene geometry, and scale factors less than 1 will make the user feel smaller. If your camera rig includes a height, such as the user's height reported by their profile, then also scale that by the same amount.

In Unity, all you have to do is scale the OVRPlayerController or OVRCameraRig in the object's transform. Be sure to scale uniformly in the x,y & z directions.


View solution in original post

2 REPLIES 2

andyborrell-ahu
Protege

The user's sense of their own size in a virtual world mainly comes from the distance between the stereo cameras in the scene, and from the movement in the scene that results from their head movement. By default the distance between the cameras corresponds to the user's IPD (as configured in their profile), and camera movement matches head movement, where 1m of real-world distance equals 1 unit in scene space. So an interpupillary distance of 60mm corresponds to a camera separation of 0.06 scene units.

You can change how big the user feels in the scene by scaling the relationship between real world distances and scene distances. You can do this by scaling the positions in the eye poses provided by a call to *ovrHmd_GetEyePoses*. Scale factors greater than 1 will make the user feel bigger relative to scene geometry, and scale factors less than 1 will make the user feel smaller. If your camera rig includes a height, such as the user's height reported by their profile, then also scale that by the same amount.

In Unity, all you have to do is scale the OVRPlayerController or OVRCameraRig in the object's transform. Be sure to scale uniformly in the x,y & z directions.


tomf-ahub
Explorer

There are two different ways to change the experience of avatar size.

The way Andy talks about is to scale the camera separation (also called the IPD) and the head motion. The perceptual effect of this is actually more like growing or shrinking the world, rather than changing the scale of the player. It is extremely important to use the same scale on both the camera separation and the head motion. If you use a different scale for each, you can cause severe discomfort for some users after about 15-20 minutes. This is an easy place to introduce bugs, because you won't notice them just with a quick check, so be careful! In general, this is only for special effects. It is also how you adapt for different unit systems, for example if your game world is measured in inches rather than meters.

If you just want to make the player feel really tall, as if they're a giant, just move the camera higher. Don't modify the camera separation or the head-motion scale - leave those two as they are - just move the whole thing higher. This will keep the world at the same scale that the player is used to - everything will still feel a realistic size - but now the player is taller! This is the recommended method for most games wanting to have their in-game avatars be taller or shorter than the actual human playing the game (e.g. because you're playing a specific character, who is a specific height). It's also a lot simpler and less bug-prone than the previous method.

Both of these effects can be tried out in the OculusWorldDemo.