A web application that converts (various types of) 3D avatars from The Sandbox format to MSquared format (MML-wrapped GLBs).
- Avatar Conversion: Convert Sandbox NFT avatars to MSquared-compatible format
- 3D Preview: Real-time preview of original and converted 3D models using Three.js
- Token Lookup: Fetch avatars by contract address and token ID
- Random Selection: Browse random avatars from the collection
- Cloud Storage: Automatic upload of converted files to Google Cloud Storage
- Enter a contract address and token ID (or search by avatar name)
- The app fetches the original GLTF model from The Sandbox
- Converts the model to GLB format with proper skeleton mapping
- Generates an MML file containing the converted avatar
- Uploads both files to cloud storage and provides download links
- Copy the the MML url into a Morpheus Platform game client to use it
Note: This converter is specifically designed for humanoid avatars from The Sandbox collection. Only tokens from The Sandbox's Humanoids collection are good candidates for conversion.
Results may vary depending on:
- How niche the skeleton structure is (the converter accommodates the most common skeletons)
- Please reach out if you have a model with a skeleton which isn't supported yet
- The complexity of the 3D model (some are humanoid but had various accessories to the mesh, eg. a drum kit)
npm install
npm run dev
The app will be available at http://localhost:3000
Copy env.template
to .env
and fill in your actual values:
cp env.template .env
Required environment variables:
ALCHEMY_API_KEY
- API key for blockchain/NFT metadata servicesGCS_BUCKET_NAME
- Google Cloud Storage bucket for file uploadsGOOGLE_CLOUD_CREDENTIALS
- Base64 encoded service account JSONGOOGLE_CLOUD_PROJECT
- Your Google Cloud project ID
Optional:
HOST_DOMAIN
- Base URL for the application (defaults tohttp://localhost:3000
)
The converter requires specific skeleton and joint mapping files located in /public/data/
:
skeleton.glb
- Reference skeleton modeljoints-map.json
- Joint mapping configurationjoints-remove.json
- Joints to remove during conversiont-pose.json
- T-pose reference data