🎨
MYTY
MYTY Kit
MYTY Kit
  • 👋Before you begin
    • GM, MYTY! 👐
    • What is MYTY Kit?
    • MYTY Kit System Requirements
    • Prerequisites
    • MYTY Kit Glossary
  • ✍️Getting started
    • 1. Prepare Illustration PSB
      • Key Requirements
      • Basics of Avatar Animation
      • Recommended PSB file structure for Trait Mapper
    • 2. Trait Mapping
      • Guide to MYTY Kit Trait Mapper
      • New Field: Token ID
    • 3. Install Unity
    • 4. Import MYTY Kit
    • 5. Import 2D Avatar Assets
  • 🔮Make animation
    • 6. Before Rigging
    • 7. Rigging in Sprite Editor
      • Mesh in Unity
    • 8. MYTY Kit Controllers
      • Bone 1D Controller
      • Bone 2D Controller
      • Sprite 1D Range Controller
      • Sprite 2D Nearest Controller
      • Rigged Sprite 2D Nearest Controller
    • 9. Apply Motion Tracking
      • Character Movement
      • Bone Motion Adapters
        • Bone2D
        • BoneTiltOrPosition
        • EyeBlink & EyeBlinkAll
        • EyeBrow & EyeBrowAll
        • Pupil & PupilAll
      • Sprite Motion Adapters
        • EyeBlink & EyeBlinkAll
        • EyeBrow & EyeBrowAll
        • MouthSprite
      • Advanced documentation
        • Mapper & Reducer
        • Stabilizing method
    • 10. Set up AR Face Mode
    • Advanced Animation
      • Physics 2D
      • Sprite Masking
      • Idle Animation
  • 🤹Connect with MYTY Metaverse
    • 11. Export MYTY Avatar
      • MYTY Avatar Viewer
      • Updates on File Export Format — Zip file
    • 12. Upload to Avatar Manager
  • 🗒️Appendix
    • 😄Mediapipe Extension
    • 🎨MotionAdaptorPalette
  • 🗂️MISC
    • About Us
    • Troubleshooting & FAQ
    • Change Log
    • License
      • License.md
    • Legacy Documentation
      • [v0.1.0] 4. Import MYTY Kit
      • [v0.1.0] 6. Before Rigging
      • [v0.1.0] 9. Apply Motion Tracking
      • [v.0.1.0] 11. Export MYTY Avatar
Powered by GitBook
On this page
  • Mapper
  • Reducer
  • The component-wise input for Controllers
  1. Make animation
  2. 9. Apply Motion Tracking
  3. Advanced documentation

Mapper & Reducer

This document is an advanced document on the Mapper and Reducer.

Mapper

Let's think of the motion adapter for a joint anchor template. In the mocap pipeline of MYTY Kit, The template provides rotation information composed of two vectors - LookAt and Up. Most tasks for this motion adapter simply convey the vectors' partial or whole components. For example, If we want to control the 2D rotation of the head in the XY plane, we should set the motion adapter to convey XY components of the LookAt vector to the input of the Bone2DController, which governs the head movement.

We are saying the action of the motion adapter is 'conveying.' It implies a relation between the sender and the receiver of the conveyed property, and we call this relation 'Mapping' and call the motion adapter 'Mapper.'

In the Mapper, we set up the mapping information from a component of one of the rotation vectors for the joint template rotation to a component of the Controller input. The captured rotation value will be conveyed via this predefined pipeline in runtime.

The Mapper is valid for parametric templates (ex. facial), too. We can map a template property to a component of the target Controller input.

Reducer

Let's think of the case like this; 'I want to move the eye object by the averaged value of the pupils' position.' In this situation, the task of the motion adapter is not mapping anymore. The mapping implies a relation of 1:1, but we need a 2:1 relation to resolve this.

We can generalize this situation like this. ‘Do something with N values and yield a result.’ It means, we want to ‘Reduce’ the input value to a result. So we call this ‘Reducer.’

You may have a question, ‘How to reduce the inputs?’ We introduce ‘Reduce Operator’ to cover this question. Reduce Operator describes how to reduce inputs. A reducer can have one or more reducers as its output count. We provide 2 operators in default - Linear Combination and Component Product. The new operator can be added in later kit updates.

  • Linear Combination: Calculate the linear combination of the inputs. Weights, scale, and offset are given. This takes Vector3 as input and calculates the output component-wise.

xn:inputwn:weights:scaleC:offsetoutput=s∑i=1nwixi+Cx_n : input\\ w_n : weight\\ s : scale\\ C : offset\\ output = s\sum_{i=1}^{n}w_ix_i +Cxn​:inputwn​:weights:scaleC:offsetoutput=si=1∑n​wi​xi​+C
  • Component Product: Calculate the product of the inputs. Exponents and scale are given.

output=s∏i=1nxiwioutput = s \prod_{i=1}^{n}x_i^{w_i}output=si=1∏n​xiwi​​

For the anchor template, we don’t provide Reducer because we cannot figure out the usage of reducers for it. For the parametric and points template, we provide only a reducer because the mapper is a specialization of the reducer (linear combination of input with weight 1.0).

The component-wise input for Controllers

In Kit v1.0, the component-wise input for the Controller is enabled. Each adapter has a list of configurations, which specifies the input component of the target Controller. It enables a flexible setting of Controllers and motion adapters like visual scripting. An adapter can have several Controllers as an output sink.

PreviousAdvanced documentationNextStabilizing method

Last updated 2 years ago

🔮