Git Product home page Git Product logo

nmsr-rs's Introduction

NickAc's Minecraft Skin Renderer

A speedy and fairly-accurate Minecraft avatar renderer service.

A hosted version of NMSR is available here. It's provided on a best-effort basis, so please don't abuse it.

NMSR supports custom render parameters, player armour, armour trims, many render modes, native Ears mod support and Minecraft capes.

Supported render modes

Category Render Mode Description Example Example (Back)
Body FullBody Full body render
FullBodyIso Full body isometric render
BodyBust Body bust render
FrontBust Bust isometric front render
FrontFull Full isometric front render
Head Head Head render
HeadIso Head isometric render
Face Face render
Extra Skin Player skin
Custom Custom render settings

Crates

Since this project contains a few crates, here's a short explanation for each.

nmsr-aas - NickAc's Minecraft Skin Renderer as a Service

Maintained Status (Yes)

The star of the show. This is the service that does the actual rendering. If you're looking to self-host NMSR, this is the crate you're looking for.

nmsr-3d-renderer/nmsr-player-parts - Player parts provider

Abstraction of a Minecraft player model. This serves as a base for the 3d model cubes and quads.

When compiled with the ears feature, it also provides Ears mod support.

nmsr-3d-renderer/nmsr-rendering - 3D rendering

The actual 3D rendering engine. This is where the magic happens. Implemented using wgpu-rs which allows for plugging many different rendering backends.

nmsr-lib - UV map library

Maintained Status (Yes)

This is the (now legacy) UV map library. This used to do the actual "rendering" in previous versions. It requires pre-rendered images to be provided.

Currently, it uses version 2 of the UV map layout instead of the previous format.

For more information on the UV map layout, see here.

utils/** - Utilities

Maintained Status (it depends)

Crates in this directory are provided as-is and some may or may not be maintained.

Contains experiments that could be promoted to officially supported crates in the future.

nmsr-jni

Maintained Status (No)

This is the JNI library, which contains the native code for invoking the skin renderer from the JVM.

UV map layouts

Version 2

This is the current version of the UV map layout. It's an 8-bit RGBA image. It improves on the previous version by not being wasteful with the bits, at the cost of being more complex.

UV map layout v2
R G B A
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
U V Shading Depth

Version 1

This is the previous version of the UV map layout. It's a 16-bit RGBA image. It's wasteful with the bits, but it's simple.

If you're looking for the last commit that used this UV map layout, checkout commit e62100095a7fcdc83c989a4fb603866cf338edca.

UV map layout v1
R G B A
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
U V (100% - V coordinate) Depth Alpha

nmsr-rs's People

Contributors

nickacpt avatar techpizzadev avatar wyatt-herkamp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

nmsr-rs's Issues

Issue building Docker

Hello, I have issues trying to build with Docker

=> ERROR [builder 7/7] RUN RUSTFLAGS="-Ctarget-cpu=native" cargo build --release --bin nmsr-aas --features ears --package   2.1s
------
 > [builder 7/7] RUN RUSTFLAGS="-Ctarget-cpu=native" cargo build --release --bin nmsr-aas --features ears --package nmsr-aas:
0.664     Updating git repository `https://github.com/NickAcPT/smaa-rs`
1.011     Updating git repository `https://github.com/NickAcPT/ears-rs`
1.297     Updating crates.io index
1.951 error: failed to select a version for the requirement `smaa = "^0.10.1"`
1.951 candidate versions found which didn't match: 0.12.0, 0.11.0, 0.10.0, ...
1.951 location searched: crates.io index
1.951 required by package `nmsr-rendering v0.1.0 (/tmp/nmsr-rs/nmsr-3d-renderer/nmsr-rendering)`
1.951 perhaps a crate was updated and forgotten to be re-vendored?
------
Dockerfile:12
--------------------
  10 |     RUN git checkout nmsr-aas/next
  11 |
  12 | >>> RUN RUSTFLAGS="-Ctarget-cpu=native" cargo build --release --bin nmsr-aas --features ears --package nmsr-aas
  13 |
  14 |     FROM rust:slim-bookworm
--------------------
ERROR: failed to solve: process "/bin/sh -c RUSTFLAGS=\"-Ctarget-cpu=native\" cargo build --release --bin nmsr-aas --features ears --package nmsr-aas" did not complete successfully: exit code: 101

Custom skins servers

Hey! more than an issue this is only a question lol

I have a self hosted Yggrasil API but it doesnt include a skin renderer on its own... So, i was wondering, its possible to use this project to use my own session server and textures? i tried with Crafatar but it doesnt work, maybe bcs the uuids on my session server are trimmed? idk

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.