Skip to content

inamilab/ShapeShifter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ShapeShifter

A VR research project on embodiment using a shape-shifting avatar, built for Unity / Meta Quest.

Requirements

Item Version
Unity 2022.3.47f1
Target Meta Quest (Android) / OpenXR
Meta XR SDK com.meta.xr.sdk.all 85.0.0 (fetched automatically via UPM)

Setup

1. Clone the repository

git clone https://github.com/inamilab/ShapeShifter.git

Open the project with 2022.3.47f1 from Unity Hub.

2. Assets you must install separately

For licensing reasons (redistribution not permitted), the following are not included in this repository. You must add them yourself. Without them, component references in prefabs / scenes will be missing and the project will not work correctly.

  • Meta XR SDK When you open the project, the Unity Package Manager automatically fetches com.meta.xr.sdk.all (v85.0.0) according to Packages/manifest.json. No special action is required, but you need an internet connection and must accept Meta's terms of use.

  • RootMotion Final IK (paid / Unity Asset Store) Used for full-body IK. Purchase it on the Asset Store and import it into Assets/Plugins/RootMotion/.

Meta's build tool ovr-platform-util.exe is also excluded because it cannot be redistributed. If you need it (e.g. for store uploads), obtain it from the Meta XR SDK / Meta developer portal.

3. XR settings

In Project Settings > XR Plug-in Management, make sure Oculus / OpenXR is enabled (the configuration assets are included under Assets/XR/).

Script Overview

The author's original code lives under Assets/ShapeShifterAvatar/Scripts/. The main scripts are listed below.

Scripts/Metaball/ — generates the avatar's organic shape in real time using a signed distance field (SDF) and marching cubes.

Script Role
MetaballSphere.cs Base shape primitive: a sphere with radius, ellipsoid scale, and a pear-shaped bulge
MetaballTentacle.cs Defines a tentacle as a list of control points. Supports Catmull-Rom / NURBS curves and two SDF methods (sampled spheres / shortest distance to spline)
MetaballSubtractor.cs Subtraction primitive that carves the shape with a sphere / box / cylinder (with smooth blending)
SDFMeshGenerator.cs Turns the primitives above into an SDF with a compute shader and meshes it via marching cubes. Supports uniform / non-uniform bounds and surface ripple noise
MorphFieldRenderer.cs Debug / editing helper that draws gizmos for the child MetaballSphere set

Demo Scene

ShapeShifter_PlausibleControl contains the reaching scene used in the experiment.

License

For the usage terms of the author's original code and assets in this repository, see the separate LICENSE (third-party assets such as the Meta XR SDK and RootMotion Final IK are governed by their respective providers' licenses).

About

No description, website, or topics provided.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors