Giter VIP home page Giter VIP logo

inox2d's Introduction

Inox2D

Officially supported experimental Rust port of Inochi2D.   Discord

 

The Inox2D workgroup provides support in the #inox2d channel on the Inochi2D Discord.

Currently this library and the specification is in a prototype state, it is not recommended to use this library in production.

 

Rigging

If you're a model rigger you may want to check out Inochi Creator, the official Inochi2D rigging app in development.
This repository is purely for developers and is not useful if you're an end user.

 

Status

INP parsing works completely fine, but not INX (bad indexes, wrong reading?).

Both renderers (OpenGL, WGPU) now work on all models we could test them on (Aka, Midori, Arch-chan).

Support for parameters, physics and animations is on the way!

Feature tree

  • Parsing
    • INP format
  • Rendering
    • OpenGL
      • WASM (WebGL)
    • WGPU
      • WASM (WebGL)
    • Draw List
  • Parameters
    • Deforms (mesh vertex offsets)
    • Values (node transform offsets)
    • Z-sort
  • Physics
  • Animations

INP parsing

cargo run -p inox2d --features owo --example parse-inp path/to/puppet.inp

Parsed foxgirl

OpenGL renderer

cargo run -p render-opengl path/to/puppet.inp

OpenGL-rendered Arch-chan

WebGL demo

See the render_webgl example.

WebGL-rendered Aka

WGPU renderer

cargo run -p render-wgpu path/to/puppet.inp

WGPU-rendered Arch-chan

 

Implementation

Inox2D aims at supporting all features currently present in the standard D implementation.

Inox2D is designed to be extensible. Nodes are extensible through a generic InoxData<T> enum which has a Custom(T) variant. Every other part of the library accounts for it: the OpenGL renderer accepts any struct that implements the CustomRenderer trait to be able to render your custom nodes, and the deserialization functions accept generic Fns for deserialization of custom nodes when it is relevant.

 

Optimization on OpenGL

Implementation language OpenGL calls
Inochi2D reference* D 3076
Link Mauve's inochi2d Rust 551
Inox2D Rust 1639

The OpenGL renderer on Inox2D has a few simple optimizations that result in fewer OpenGL calls:

  • it uses a simple OpenGL cache to avoid making calls when the resulting state won't change,
  • it only uploads a model's part textures once instead of every frame.

* Reference implementation is subject to change as optimisation passes are done, additionally code is more geared towards readability than performance for implementers to be able to more easily use it as reference.

 

License

This project is licensed under the 2-Clause BSD license. See LICENSE for details.

inox2d's People

Contributors

speykious avatar richardn2002 avatar carbotaniuman avatar togetherwithasteria avatar dependabot[bot] avatar lunathefoxgirl avatar striezel avatar marysaka avatar orowith2os avatar ilovecherries avatar linkmauve avatar

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.