Generative AI Exploration

Description

An interactive WebGL experience where users engage in dynamic conversations with AI-powered virtual characters. Through prompt-based interactions, participants can spark debate, stage emotional scenes, or explore imaginative scenarios—each uniquely voiced, animated, and generated in real time. The experience showcases the potential of generative AI in storytelling, education, and entertainment.

Purpose

Created as an experimental showcase of generative AI’s storytelling capabilities, this project highlights how large language models, text-to-speech synthesis, and expressive avatars can bring spontaneous, personalized interactions to life in a game engine environment.

Role

Lead Unity Developer & Technical Designer

Key Responsibilities

  • Unity Development:
    Built the core WebGL scene, integrated Ready Player Me avatars, implemented character spawning, and managed interaction flow.
  • AI Integration:
    Connected text prompts to generative AI models for real-time dialogue and coordinated sequential voice output using TTS systems.
  • UI/UX Design:
    Designed the onboarding tutorial, text input system, and UI transitions to ensure user clarity and ease of use.
  • Voice and Animation Sync:
    Scripted logic for facial animations and character reactions based on emotional tone and text context.
  • Performance Optimization:
    Minimized WebGL loading times through asset compression, efficient UI layering, and runtime asset control.

Tech Stack

  • Game Engine: Unity 
  • AI Tools: Integration with OpenAI / local LLMs and TTS services
  • Version Control: Git, GitHub
  • Scripting: C#

Design Tools

  • Mixamo & Ready Player Me

Platform(s)

  • Desktop, Chrome Browser Support
  • Mobile 

Core Mechanics / Features

  • Prompt-Based Interaction: Users submit any scene or question as a prompt, which generates a live two-character exchange.

  • Fully Voiced Dialogue: AI-generated responses are converted into speech using dynamic voice synthesis.

  • Facial Expressions & Animation: Characters respond with emotion-based movements and lip-syncing to increase immersion.

  • Scene-Based Onboarding: Intro tutorial explains user flow, prompt crafting, and what to expect from the generative system.

Challenges Faced

  • AI Latency: Managing asynchronous generation of voice and dialogue while maintaining flow.

  • Voice Timing: Coordinating voice lines to trigger in proper sequence for conversational realism.

  • WebGL Constraints: Dealing with build size limits and runtime memory management.

  • Character Compatibility: Addressing lack of blendshapes in some avatar imports.

     

Solutions

  • Sequential Dialogue Queuing: Built a custom system to manage line delivery in real-time.

  • Runtime Checks & Fallbacks: Created error handling for missing blendshapes or animations.

  • Async Control Pipeline: Leveraged coroutines to coordinate AI generation, voice synthesis, and playback.

  • Optimized Build Pipeline: Reduced load time and memory usage through asset compression and selective streaming.

Contact Me