Skip to content

aallfik11/CyberninjaVR

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cyberninja VR - Unreal Engine C++ Source

Notice: This repository contains the core C++ architecture, configurations, and project files. It does not host the blueprints or other assets, where some of the game's functionality is also implemented.

🔗 Link to Full Portfolio & Gameplay Video


Project Overview

A melee combat-oriented Virtual Reality game, set in a futuristic, sci-fi environment. Developed as my Engineer's Thesis project.


Technical implementation

This section dives into the technical implementation of the most prominent feature of the project.

Real-Time Skeletal Mesh Slicing

Phase 1: Intersection & Bone Categorization

  • Trace & Angle: First, the angle of the slice is determined based on the weapon's trajectory during impact. Link to line #
  • Hierarchical Sorting: The skeletal mesh's bones are evaluated via tracing and divided into three subsets: strictly above the cut, strictly below, and "slice bones" (directly intersecting).
  • Optimization: Bones fully above or below bypass heavier bisection calculations. This also allows for localized severing (e.g., cutting off a hand doesn't split the entire torso).

Phase 2: Bisection & Topology Generation

  • Vertex Categorization: Vertices influenced by the slice bones are checked against the slicing plane in 3D space. Link to line #
  • Triangle Bisection: Triangles intersecting the plane are bisected, creating new geometry. New vertices are generated via linear interpolation to determine reference poses, tangents, and skin weights. Link to line #
  • Cap Generation: The exposed slice is capped using Delaunay Triangulation (via Artem Amirkhanov’s CDT library). Note: Ear clipping was initially evaluated but discarded, as its resulting topology could not support the complex deformations required by ragdoll physics. Link to line #

Phase 3: Physics & Memory Management

  • Dynamic Physics Assets: Physics assets are filled in at runtime for the newly severed components. Link to line #
  • Object Pooling: To mitigate the instantiation overhead and memory footprint of creating complex assets mid-combat, the system pulls from a pre-allocated pool of skeletal meshes and physics assets. Link to file

Engine Details

  • Unreal Engine Version: 5.4.4

About

C++ side of my engineer's thesis project, displaying its most important feature - realtime skeletal mesh slicing

Resources

License

Stars

Watchers

Forks

Contributors