Skip to content

meta-space-org/sandbox-to-msquared-avatar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sandbox.game > MSquared avatar converter

Loads GLTF of humanoids, e.g. from this collection. Reparents nodes with meshes to the root. Rigs the meshes based on original hierarchy. Replaces skeleton with MSquared one. Optionally merges meshes into a single one with texture atlasing.

In the result, we get a small GLB (99%+ size reduction), with one mesh and two textures (albedo, emissive), and simplified MSquared skin, so UE5 animations can be applied on it.

Example:

WebGL demo: https://playcanv.as/e/b/bb92b862

Usage

npm install
node tool.js --file ./path/to/file.gltf --output ./path/to/output.glb --merge

Options

--help

Print possible options.

--file

GLB/GLTF file to convert.

--output

A path for output GLB.

--merge

Default false.
If enabled, then all meshes will be merged into a single one. All textures will be merged into an Atlases based on slots: base, emissive.

--inspect

Default false.
Print resulting GLBs structure: scenes, meshes, materials, textures.

--silent

Default false. If set, then console logs will be only errors.

Models Download

To get models from OpenSea, you need to:

  1. Find desired model from the collection
  2. In the top right corner, hit three dots and select "View Original Media"
  3. New tab will have url like: "https://www.sandbox.game/model-viewer-light/?assetId=79610d33-3b3c-45a5-9d39-9d93d6774991", copy assetId
  4. Then open new tab with link: https://public-assets.sandbox.game/assets/ASSET_ID/gltf replace "ASSET_ID", e.g.: https://public-assets.sandbox.game/assets/79610d33-3b3c-45a5-9d39-9d93d6774991/gltf

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published