Arvutiteaduse instituut
  1. Kursused
  2. 2025/26 sügis
  3. Arvutigraafika (MTAT.03.015)
EN
Logi sisse

Arvutigraafika 2025/26 sügis

  • Main
  • Lectures
  • Practices
  • Projects
  • Test
  • Results
  • Links

Nottinsonne

Valerio Aliberti

The project is a 3D psychological horror game set in a haunted house, where the player embodies a person suffering from psychological disorders that cause visual and auditory hallucinations. The goal is to survive the night by keeping heart and mind stable, interacting with objects and the environment to reduce stress. Hallucinations and unsettling events intensify as stress rises, creating constant tension. The gameplay focuses on exploration and managing mental and physical states rather than combat.

Given my limited experience with 3D modeling and game development, the project will focus on a manageable scope.The project will be developed using Unity, which will allow for easy implementation of 3D environments, interactions, and basic gameplay mechanics suitable for an indie project. The development plan follows a gradual and realistic approach: first, I will build a simplified environment, modeling basic rooms, corridors, and key objects to create an immersive atmosphere without overcomplicating the design. Then, I will implement basic game mechanics, such as stress management, simple object interaction, and hallucinations, integrating them into the environment. Lighting, textures, and sound will be added step by step to enhance the tension. The project will conclude with testing and refinement, keeping the focus on a small but cohesive and playable experience.

The house layout will outline the main structure, including rooms, corridors, doors, and key points for objects or events, providing a functional reference for future level design. At the same time, the introductory story will present the character, their psychological condition, and the setting, while explaining the basic rules and main objective: surviving the night by managing stress and interacting with the environment. These activities create a clear direction for both the narrative and the environment before moving on to technical development. This phase also includes documentation and research. I will study games like Visage and Five Nights at Freddy’s, as well as horror films such as The Haunting, Hush, and It Follows, to understand how atmosphere, pacing, and tension are created. These references will help guide decisions for level design, environmental storytelling, and the psychological impact of gameplay, providing inspiration and a clearer direction for the project.

Screen of board sketch ↓

Here you can see the first demo of the house's rooms: Attach:DemoVideo.mp4

  • Early Prototype

This is the first early build

  1. Current Features (Prototype v0.1)

At the moment, the game includes: - A basic first-person movement system - A fully explorable house layout - Interactive doors that can be opened and closed - Early UI and player controls - Placeholder lighting and environment setup

This build is intended only for testing core movement and interaction. No enemies, story events, hallucinations, or stress mechanics have been implemented yet.

  • Controls**

- **WASD** – Move - **Mouse** – Look around - **E** – Interact (open/close doors) - **ESC** – Pause menu

  • Download

First build: https://drive.google.com/drive/folders/1xzANlOrR2496KuwkDz1-fZV5xZwBA6wD?usp=sharing

Main features

Reflection Probe ----------------------------------------------------------------------

To improve visual quality and environmental realism, **Reflection Probes** were implemented in selected areas of the house, such as corridors and enclosed rooms.

Reflection Probes capture the surrounding lighting and reflection data and apply it to scene materials, allowing surfaces to react more naturally to nearby light sources.

  • Without Reflection Probes

- Lighting appears flat and visually detached from the environment - Materials lack depth and environmental interaction - The scene feels less immersive and less atmospheric

  • With Reflection Probes

- Lighting becomes more coherent and believable - Surfaces gain subtle reflections and depth - Dark areas feel denser and more realistic - The overall atmosphere is significantly improved, supporting the psychological horror tone

Corridor Comparison

The video below shows a direct comparison of the same corridor scene **with and without Reflection Probes**, highlighting the difference in lighting response and environmental depth.

  • Video: Reflection Probe Comparison (Enabled / Disabled)**

Glitch Effect--------------------------------------------------------------------------------

To visually represent the character’s deteriorating mental state, sanity-based glitch effects were implemented without relying on external assets or post-processing packages.

These effects are triggered dynamically when the player’s sanity drops below a defined threshold, reinforcing the psychological horror atmosphere through subtle but disturbing visual feedback.

Glitch Behavior - Effects activate only at low sanity levels - Glitches occur at random intervals to avoid predictability - Visual disturbances are brief and non-intrusive to gameplay

Implemented Effects - Screen Noise and Flicker: a static-like distortion simulating perceptual instability - Color Tint Distortion: brief color shifts that create a sense of disorientation and discomfort

Implementation Details The feature was implemented using fullscreen UI overlays placed above the HUD: - A RawImage` overlay is used for the static/noise layer. - An `Image` overlay is used for the color tint layer.

A small procedural Texture2D` noise texture is generated at runtime (no external textures needed) and assigned to the RawImage`. During a glitch:

  • The noise texture pixels are randomized to create animated static.
  • The RawImage` alpha is flickered rapidly to simulate unstable perception.
  • The `uvRect` offset is shifted slightly each frame to add motion and variation.
  • The overlay RectTransform` is briefly jittered by a few pixels to mimic a “signal disturbance”.
  • The tint overlay alternates short pulses by modifying its color/alpha, producing a subtle disorientation effect.

A simple coroutine loop manages timing: - When sanity is below the threshold, the system waits a random delay (min/max interval), - Chooses one of the glitch types, - Plays it for a short duration, - Then resets all overlay values back to transparent.

Alternatives Considered

  • Post Processing (URP Volume): using Film Grain / Chromatic Aberration / Vignette for higher quality distortion, but requires extra configuration and may increase complexity depending on pipeline setup.
  • Shader-based Fullscreen Effect: a custom shader on a fullscreen quad for more advanced glitch patterns, but requires shader work and can be harder to iterate quickly.
  • Camera RenderTexture Pipeline: rendering the camera to a texture and applying distortion, but heavier to set up and less lightweight than UI overlays.

The UI overlay approach was chosen because it is fast to prototype, requires no additional assets, and provides full control over intensity, frequency, and performance.

Video: Sanity Glitch Effects Demonstration

Mirror Reflection & Hallucination ------------------------------------------------------------------

The mirror system and related hallucination event were designed from a computer graphics perspective, focusing on controlled visibility, real-time rendering, and perceptual manipulation rather than explicit gameplay logic.

Real-Time Mirror Rendering The mirror is implemented using a secondary camera that renders the scene from a mirrored viewpoint. This camera does not display directly on screen, but instead renders its output to a RenderTexture.

The RenderTexture is then assigned to an unlit material applied to the mirror surface, allowing the mirror to display a live reflection of the environment. Using an unlit material ensures that the reflection is not affected by scene lighting, preserving visual clarity and consistency.

This approach simulates a planar reflection without the computational cost of physically accurate reflection techniques.

Selective Visibility via Layer-Based Rendering To create the illusion that the hallucination exists only within the reflection, a layer-based rendering strategy is used: - The hallucination entity (zombie) is placed on a dedicated layer. - The main camera excludes this layer from its rendering pipeline. - The mirror camera includes this layer in its culling mask.

As a result, the entity is rendered exclusively by the mirror camera and never by the player’s primary viewpoint, producing a convincing “reflection-only” presence.

Perceptual Trigger Through Gaze Detection From a perceptual standpoint, the event is activated by tracking the player’s visual focus rather than direct interaction. A ray projected from the center of the screen determines whether the mirror surface is being observed. Sustained focus over time simulates the psychological effect of staring, reinforcing tension and anticipation before the hallucination appears.

Temporal and Psychological Framing The hallucination is temporally constrained: - It appears after prolonged observation, - Persists briefly, - Then disappears entirely.

This limited temporal window prevents desensitization and strengthens the psychological impact. The effect is further contextualized by the player’s mental state, as low sanity increases susceptibility to visual distortions and hallucinations.

Design Rationale From a computer graphics standpoint, this technique: - Separates perception from physical presence, - Uses selective rendering to manipulate what the player can and cannot see, - Leverages real-time rendering and camera layering to create controlled visual deception.

Video: Mirror Reflection Hallucination Demonstration

  • Arvutiteaduse instituut
  • Loodus- ja täppisteaduste valdkond
  • Tartu Ülikool
Tehniliste probleemide või küsimuste korral kirjuta:

Kursuse sisu ja korralduslike küsimustega pöörduge kursuse korraldajate poole.
Õppematerjalide varalised autoriõigused kuuluvad Tartu Ülikoolile. Õppematerjalide kasutamine on lubatud autoriõiguse seaduses ettenähtud teose vaba kasutamise eesmärkidel ja tingimustel. Õppematerjalide kasutamisel on kasutaja kohustatud viitama õppematerjalide autorile.
Õppematerjalide kasutamine muudel eesmärkidel on lubatud ainult Tartu Ülikooli eelneval kirjalikul nõusolekul.
Courses’i keskkonna kasutustingimused