DiMiTri

General information

Date completed July 2019
Role in team Solo Project / Developer / Visual Artist
Environment Unity 2019.1.0f2
Language C#

Description

DiMiTri is a Virtual Reality experience I developed during an art seminar at the HKU University of the Arts, Utrecht. The goal of the project was to create a piece of art out of nothing. There were many ways to interpret this. I considered a couple of different interpretations, but in the end settled on a topic that intrigued me: psychedelic drugs.

Research

As I myself have very little experience with drugs, I came to the conclusion a bit of research would be necessary. I ended up watching a myriad of videos on the topic and reading quite a bit about the different applications of psychedelic drugs. One of the effects I found most interesting was that users of the drug commonly known as DMT, reported seeing certain visual hallucinations. But perhaps the word hallucination isn’t quite correct, as these sightings were rarely a making of their own mind, but rather a continuation of what they were already seeing.

So, to give an example, a DMT user might be looking out of a window and see rain drops falling down. As they continue to look out of the window, they start seeing drops fall inside of their house as well. When they turn their focus towards these drops inside of the house, the hallucination disappears, and they are left staring at a blank wall or floor, with no evidence of what they had believed to have seen.

These are the types of effects I wanted to replicate during my project. I wanted to create a similar feeling where you have to stay still to experience the effects. And once you focus on the effects, they quickly disappear.

Unity Shader Graph

As I started to look into the possible tools that could help create this experience, I found the Unity Shader Graph. The Shader Graph makes use of a node-based system to enable developers to quickly create interesting shaders, without having to delve deep into the code.

The VFX Graph for the rain ripples

By using the VFX Graph, I created multiple special effects for which I could change any of the variables at any time, such as (in the case of the rain ripples) the color of the texture, the texture, the smoothness of the texture, the speed at which the animation was playing, the size of the ripples and the two colors in the gradient of the ripples.

Changing the color of the ripples by script
void Update() {
        for (int i = 0; i < effects.Count; i++) {
            effects[i].currentlySeen = false;
        }

        SendRayCast(PlayerCam.transform.position, PlayerCam.transform.forward);
    }

    public void SendRayCast(Vector3 pos, Vector3 dir) {
        RaycastHit hit;
        Debug.DrawRay(pos, dir * 1000f);
        if (Physics.Raycast(pos, dir, out hit, 1000.0f, invisMask)) {
            if (hit.transform.CompareTag("Mirror")) {
                Vector3 reflection = Vector3.Reflect(PlayerCam.transform.forward.normalized, hit.normal);
                SendRayCast(hit.point, reflection);
            }
            else {
                Debug.Log(hit.transform.tag);
                for (int i = 0; i < effects.Count; i++) {
                    if (effects[i].tag == hit.transform.tag && effects[i].timer  effects[i].waitTime + effects[i].timeEffectChange)
                            effects[i].timer = effects[i].waitTime + effects[i].timeEffectChange;
                    }
                    else if(effects[i].tag != hit.transform.tag && effects[i].timer > 0f) {
                        effects[i].timer -= Time.deltaTime * effects[i].disappearRate;
                        if (effects[i].timer  effects[i].waitTime ? (effects[i].timer - effects[i].waitTime) : 0f) / effects[i].timeEffectChange) * effects[i].increase);
                    }
                }
            }
        }
    }

This is a part of my code I’m rather content with, as I made adding effects rather easy. You could select a tag and once the player looks at an object with that tag, the effects you have specified start appearing. You can change how long it takes for the effects to appear and how much the value of the effect is changed.

A closeup look at the dancing spheres I made with VFX Graph

Final product

To make these visual effects into a proper experience, I added the mechanic of DMT as described by the user, in which the effects only take place when you’re focused on a certain object or visual stimulant. I made cubes appear when the user looks at a certain cube in the game world, made dancing spheres of light appear when a player looked at a small dancing sphere that can be seen through a window and I made certain visual effects be added on the player (such as a reddish tint and insects crawling on top of the player) when the player looked at themselves in the mirror. All of these effects would appear slowly as the player intensely stares at the specific object, but would disappear in just a second, once the player would try to look at the effects themselves.