Varneon's Waltzer Development Retrospective

Comprehensive insight to the 4 year long development of Waltzer, one of my most ambitious side projects in VRChat.

Introduction

What is Waltzer?

image-1656951578176.png

A Waltzer is a flat fairground ride that often forms the centrepiece of traditional British and Irish fairs. The ride consists of a number of cars which spin freely while rotating around a central point, in much the same way as a carousel. As the cars revolve, the floor of the ride undulates over a track so that the cars rise and fall as the ride spins. The offset weight of the riders causes each car to rotate. The riders experience varying levels of g-force from the spinning of the car, and the rotation of the ride itself. Because of this, operators will impose height and age restrictions.


https://en.wikipedia.org/wiki/Waltzer


Why did I start working on a Waltzer in social VR?

Ever since I was a young, I have admired the engineering behind Waltzer and the concept of pairing mechanical motion with human operators who interact with the passengers, which makes every experience unique.

In the past I have made small scale Waltzers out of wood and Legos and have attempted making a virtual version of one in every creative game I've played, most notably Garry's Mod.

Waltzer is one of those rides alongside with ones such as bumper cars and haunted house, which when done right, will make for an incredible VR experience.


Development challenges

Waltzer presented several challenges in terms of the development, out of which synchronization and physics were the most challenging.

Synchronization:

Physics:

Lighting:

My first Waltzer prototype was the second world I ever uploaded

"If I can create on the platform, I will try to make a Waltzer!"

image-1657120522856.png

As soon as I started creating worlds in VRChat, I obviously tried making a Waltzer!

As you may expect, the world doesn't even work anymore because of the outdated version, but it is there to remind me how passionate I've been about creating one ever since the beginning of my world development career.

image-1657120883412.png

SDK2 - Getting Creative

Working around SDK2's limitations

Given the limited tools available in the SDK2, I had to get creative with the feature implementations.

The base of the ride running on a single client had no issues since it was an animation with the live rigidbodies of the cars being moved to the appropriate positions, but synchronization was massive challenge.

My first solution for attempting to synchronize the event of the operator giving speed to the passengers was to split the headrest of the car into two interact triggers that would send synced action that adds angular velocity to the car for every client:

image-1657122951036.png

The rest of the page will be written after I have managed to import newer version of SDK2 that allows me to test and build in order to demonstrate the features of the older SDK2 Waltzer

Turning Waltzer into an Avatar with Avatar Dynamics

What sparked it all?

Thanks to the inspiration I got from @NinjaSteeve's shopkeeper avatar, I decided to try to turn the Waltzer into an avatar and check out the different features and capabilities of VRChat's Avatar Dynamics while at it.

jjAJHfPgdS.jpg


Replicating the physics

One of the primary selling points of my in-world Waltzer is its realtime physics, and I wanted to replicate them as accurately as possible on the avatar. After a bit of exploration and experimentation on the different options, I decided to utilize PhysBones for the realtime physics of the cars.

Demo video on Twitter

The result isn't by any means perfect, but for what it is, I'm thoroughly impressed by the stability and performance of VRChat's implementation of PhysBones.


Performance

With worlds you obviously have a lot more room for resources in terms of both CPU and GPU usage, but how do you fit an entire world's center piece into an avatar and still keep it medium?

image.png

The optimizing process is till ongoing, but for now I've managed to keep in in medium ranking by applying following steps:

One huge factor that contributes to the relatively low material count is the heavy use of vertex colors on the meshes using the paint shader:

image.png


Features

VRChat_Z2mCCdtOsZ.jpg

I ended up implementing several different features into the avatar in order to make it more flexible and suitable for nearly any sized avatar or space for deploying it.


To Do