npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

com.kagekirin.frozenape

v0.4.1

Published

Editor and Runtime exporter for skinned meshes frozen in a specific pose as static mesh

Downloads

37

Readme

Frozen A-Pose Exporter, a.k.a FrozenAPE 🧊🦍

Logo showing a frozen ape 🧊🦍

FrozenAPE is a set of Unity-specific functions and Editor Menus to allow moving a skinned model into a specific pose and exporting the frozen static mesh of that pose into a Wavefront OBJ or FBX file.

This rather experimental package can be used to pose any given character model into an A-Pose (hence this project's name), and export the frozen, static meshes as OBJ files, to allow further modifications, such as re-skinning, in another DCC tool.

The whole picture is to simplify the workload for Technical Artists when faced to recycling models to other games/engines that require skinning to a particular rig. The closest use-case would be to transform a character model to A-Pose, freeze and export as OBJ, and then reskin the model for e.g. Roblox.

🔧 Building and Running

Add the 2 registries as described below, followed by the dependency on com.kagekirin.frozenape.

Then follow the project configuration described by Cysharp's Csproj Modifier and add (copy) the LangVersion.props from this repo to the 'Addition Project Imports'.

🔨 Add the Project

Due to some dependencies, this projects requires adding the following registries to Unity:

  • OpenUPM (which hosts a Unity dependency)
  • Unity NuGet (which hosts a C# dependency)

Add OpenUPM registry

The following registry must be added to Unity's manifest.json .scopedRegistries[]:

{
    "name": "OpenUPM",
    "url": "https://package.openupm.com",
    "scopes": [
        "com.cysharp",
        "com.kagekirin"
    ]
}

Add Unity NuGet registry

The following registry must be added to Unity's manifest.json .scopedRegistries[]:

{
    "name": "Unity NuGet",
    "url": "https://unitynuget-registry.azurewebsites.net",
    "scopes": [
        "org.nuget"
    ]
}

Add package to project

Add com.kagekirin.frozenape to the manifest.json .dependencies{}:

"dependencies": {
    "com.kagekirin.frozenape": "0.0.7",
}

⚡ Usage guide

▶ Running from Editor

FrozenAPE adds a few menu/context menu entries:

  • FrozenAPE > Export as Wavefront OBJ: exports all the meshes from the currently selected GameObject or the currently selected Mesh as Wavefront|OBJ (aka Maya OBJ) file(s). CAVEAT: Since OBJ does not support skinning data per-se, the skinning data associated with SkinnedMeshRenderer will not be exported.
  • FrozenAPE > Create Sample Pose JSON: creates a sample pose.json to allow manual modification.
  • FrozenAPE > Pose From JSON: loads a JSON file and applies the pose data to the currently selected GameObject.
  • FrozenAPE > Freeze Current Pose: creates a copy of the currently select GameObject, where every mesh has been replaced by a (baked) static mesh, frozen at the current pose.

Given a manually prepaired pose.json, the workflow to export the frozen pose would be:

  1. FrozenAPE > Pose From JSON
  2. FrozenAPE > Freeze Current Pose
  3. FrozenAPE > Export as Wavefront OBJ

▶ Calling from code

The runtime consists of 4 interfaces and their respective implementations:

  • IWavefrontOBJWriter.WriteOBJ() creates the OBJ mesh data (text) from a given mesh and its materials
  • IWavefrontMTLWriter.WriteMTL() creates the OBJ material library (MTL file, text) from the materials associated with a mesh.
  • IRigPuppeteer.Pose() moves the provided Transforms (from GameObject.GetComponentsInChildren<Transform>(true)) into the pose specified by a set of PosedBones.
  • IPoseFreezer.Freeze() returns the frozen (in Unity terms: baked) meshes and their respective materials from a GameObject, respectively a SkinnedMeshRenderer.

NOTE: registering the interfaces and their implementations with a dependency injection framework allows to inject the implementations at runtime.

🤝 Collaborate with My Project

Please refer to COLLABORATION.md