Making of Flat Dissonance: VR Experience

Tags:

Categories:

, ,

The development of a Virtual Reality (VR) experience in Unity required careful planning. For this project, the story was divided into three scenes:

  1. Introduction Scene: Presents the story of “Flat Dissonance.”
  2. VR Environment Scene: Contains the integrated controls and interactive elements.
  3. Conclusion Scene: Closes the narrative.

The first step was to build the world where the story takes place. We modeled a detailed three-dimensional space to serve as the setting for our character. To flesh out the environment, we integrated elements of nature and designed a room that became the focal point of the action.

For the character, we used animations from Mixamo. Once in Unity, we configured it as a “humanoid” and adjusted its animations to play in a loop, achieving continuous and natural movement. Afterward, we extracted its animation controller to integrate it and have full control over its actions.

Finally, to give the introduction a true cinematic impact, we animated the camera, added a user interface cavas (UI), and combined it with a video to introduce the player in the story.

Once the animations were integrated, it was necessary to include audio files and lighting to create a better atmosphere in the scene. Additionally, to generate a proper transition between this first scene and the second, a script was integrated with the help of Gemini AI to load the VR environment.


using System.Collections;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.XR.Management; // Necessary to manage VR

public class SceneLoaderVR : MonoBehaviour
{
    // Scene to Load
    public string vrSceneName = "001_Level_0";

    // Esta es la función que llamaremos desde la Timeline
    public void LoadVRScene()
    {
        // Start co-routine
        StartCoroutine(StartXRAndLoadScene());
    }

    private IEnumerator StartXRAndLoadScene()
    {
        Debug.Log("Starting XR and loading scene: " + vrSceneName);

        // Beggin VR Mode
        // Activate VR
        if (XRGeneralSettings.Instance.Manager.activeLoader == null)
        {
            yield return XRGeneralSettings.Instance.Manager.InitializeLoader();
        }
        XRGeneralSettings.Instance.Manager.StartSubsystems();

        // Wait for fotograms
        yield return null;
        yield return null;

        Debug.Log("Subsistemas XR iniciados. Cargando escena: " + vrSceneName);

        // Load VR scene
        SceneManager.LoadScene(vrSceneName);
    }
}

Second Scene

To achieve a Virtual Reality (VR) environment in “Flat Dissonance,” the main focus was on creating a space that felt proportional. It was necessary to develop a scene with real-world scale dimensions of 2 meters wide, 2 meters deep, and 5 meters high.

This three-dimensional space was brought to life through the integration of textures and a lighting setup. To do this, I used materials and maps created in Blender, subsequently making the necessary adjustments for optimal display and performance within Unity.

Additionally, to enrich the immersive environment, a spaceship asset was imported. The atmosphere was complemented by implementing a particle system that simulates stellar movement. To add dynamism, animations were programmed for the rotation of planet Earth and for the movement of the spaceship itself.

On the other hand, environmental elements such as lights and holograms were also added using shaders. In the case of the Earth animation, scanlines were integrated to generate movement, and some adjustments were also made to the light emission from the shaders themselves.

One of the main challenges when creating the VR scene was the integration of the Oculus (OVR) controls. It was necessary to configure the controllers from scratch and generate colliders so they could interact with the elements in the environment.

Additionally, to make the objects manipulable, Meta’s scripts were integrated. This allowed, for example, a globe to be turned into a “grabbable” object—that is, an object the player can pick up, hold, and move with their own virtual hands.


Third Scene

To build the story’s conclusion, in which the character experiences a revelation, specific camera animations were created. Additionally, two animations from Mixamo were integrated to show the character in “sitting” and “laughing” states.

Finally, an audio track generated via the ElevenLabs platform was incorporated. The sum of these elements allowed for an effective conclusion to the project’s narrative.