modular-avatar/docs/intro/index.html
2022-08-30 23:50:01 +00:00

46 lines
19 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!doctype html>
<html lang="en" dir="ltr" class="docs-wrapper docs-doc-page docs-version-current plugin-docs plugin-id-default docs-doc-id-intro">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="generator" content="Docusaurus v2.0.1">
<title data-rh="true">Modular Avatar | My Site</title><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:url" content="https://your-docusaurus-test-site.com/docs/intro"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="Modular Avatar | My Site"><meta data-rh="true" name="description" content="Modular Avatar is a suite of non-destructive tools for modularizing your avatars, and for distributing avatar"><meta data-rh="true" property="og:description" content="Modular Avatar is a suite of non-destructive tools for modularizing your avatars, and for distributing avatar"><link data-rh="true" rel="icon" href="/img/favicon.ico"><link data-rh="true" rel="canonical" href="https://your-docusaurus-test-site.com/docs/intro"><link data-rh="true" rel="alternate" href="https://your-docusaurus-test-site.com/docs/intro" hreflang="en"><link data-rh="true" rel="alternate" href="https://your-docusaurus-test-site.com/ja/docs/intro" hreflang="ja"><link data-rh="true" rel="alternate" href="https://your-docusaurus-test-site.com/docs/intro" hreflang="x-default"><link rel="stylesheet" href="/assets/css/styles.a1148d27.css">
<link rel="preload" href="/assets/js/runtime~main.102aa7f4.js" as="script">
<link rel="preload" href="/assets/js/main.6dd80f64.js" as="script">
</head>
<body class="navigation-with-keyboard">
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus">
<div role="region"><a href="#" class="skipToContent_fXgn">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/logo.svg" alt="My Site Logo" class="themedImage_ToTc themedImage--light_HNdA"><img src="/img/logo.svg" alt="My Site Logo" class="themedImage_ToTc themedImage--dark_i4oU"></div><b class="navbar__title text--truncate">Modular Avatar documentation</b></a><a aria-current="page" class="navbar__item navbar__link navbar__link--active" href="/docs/intro">Docs</a><div class="navbar__item dropdown dropdown--hoverable"><a href="#" aria-haspopup="true" aria-expanded="false" role="button" class="navbar__link"><svg viewBox="0 0 24 24" width="20" height="20" aria-hidden="true" class="iconLanguage_nlXk"><path fill="currentColor" d="M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"></path></svg>English</a><ul class="dropdown__menu"><li><a href="/docs/intro" target="_self" rel="noopener noreferrer" class="dropdown__link dropdown__link--active">English</a></li><li><a href="/ja/docs/intro" target="_self" rel="noopener noreferrer" class="dropdown__link">日本語</a></li></ul></div></div><div class="navbar__items navbar__items--right"><a href="https://github.com/bdunderscore/modular-avatar" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a><div class="toggle_vylO colorModeToggle_DEke"><button class="clean-btn toggleButton_gllP toggleButtonDisabled_aARS" type="button" disabled="" title="Switch between dark and light mode (currently light mode)" aria-label="Switch between dark and light mode (currently light mode)"><svg viewBox="0 0 24 24" width="24" height="24" class="lightToggleIcon_pyhR"><path fill="currentColor" d="M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"></path></svg><svg viewBox="0 0 24 24" width="24" height="24" class="darkToggleIcon_wfgR"><path fill="currentColor" d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"></path></svg></button></div><div class="searchBox_ZlJk"></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper mainWrapper_z2l0 docsWrapper_BCFX"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_sjWU" type="button"></button><div class="docPage__5DB"><aside class="theme-doc-sidebar-container docSidebarContainer_b6E3"><div class="sidebar_njMd"><nav class="menu thin-scrollbar menu_SIkG"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link menu__link--active" aria-current="page" href="/docs/intro">Modular Avatar</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/test">test</a></li></ul></nav></div></aside><main class="docMainContainer_gTbr"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_VOVn"><div class="docItemContainer_Djhp"><article><nav class="theme-doc-breadcrumbs breadcrumbsContainer_Z_bl" aria-label="Breadcrumbs"><ul class="breadcrumbs" itemscope="" itemtype="https://schema.org/BreadcrumbList"><li class="breadcrumbs__item"><a aria-label="Home page" class="breadcrumbs__link" href="/"><svg viewBox="0 0 24 24" class="breadcrumbHomeIcon_OVgt"><path d="M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z" fill="currentColor"></path></svg></a></li><li itemscope="" itemprop="itemListElement" itemtype="https://schema.org/ListItem" class="breadcrumbs__item breadcrumbs__item--active"><span class="breadcrumbs__link" itemprop="name">Modular Avatar</span><meta itemprop="position" content="1"></li></ul></nav><div class="tocCollapsible_ETCw theme-doc-toc-mobile tocMobile_ITEo"><button type="button" class="clean-btn tocCollapsibleButton_TO0P">On this page</button></div><div class="theme-doc-markdown markdown"><h1>Modular Avatar</h1><p>Modular Avatar is a suite of <strong>non-destructive</strong> tools for modularizing your avatars, and for distributing avatar
components.
With Modular Avatar, adding a new outfit or gimmick to your avatar is as easy as drag-and-drop!</p><p>Modular Avatar currently supports:</p><ul><li>Merging prefab armatures into the parent avatar, as is often done to add outfits. MA minimizes the number of bones
that are created in this process, reusing existing bones where possible.</li><li>Merging subcomponent animators into the parent avatar, for use with various types of avatar gimmicks.</li></ul><h2 class="anchor anchorWithStickyNavbar_LWe7" id="merging-outfits-and-similar-things">Merging outfits (and similar things)<a class="hash-link" href="#merging-outfits-and-similar-things" title="Direct link to heading"></a></h2><p><img loading="lazy" alt="img_1.png" src="/assets/images/img_1-80880403f6f7ae3518b167d63511f28c.png" width="1492" height="672" class="img_ev3q"></p><p>By attaching the Modular Avatar Merge Armature script to the armature of an outfit, Modular Avatar will merge this
outfit armature into the parent armature automatically at build or play time. The result looks a bit like this:</p><p><img loading="lazy" alt="img_3.png" src="/assets/images/img_3-85406f3c725f156a51f933bdfe6fed56.png" width="1487" height="670" class="img_ev3q"></p><p>Note that new bones have only been created for bones that are present only in the outfit.</p><p>The Merge Armature script will automatically find corresponding bones under the Merge Target for each bone under the
transform it is attached to. It assumes each bone under the prefab to be merged to start with the Prefix and end with
the Suffix. If it finds an object that does not match, or if it can&#x27;t find a corresponding base object, it will attach
this transform as a new child object in the base avatar (this can be used for bones corresponding to e.g. skirts or
ribbons).</p><p>The outfit can be enabled or disabled (including physbones and other dynamics) simply by toggling the prefab. To
facilitate this, any physbones or other components on the armature bones will remain at their old location, but will be
adjusted to reference the bones in the armature instead. For PhysBones and contacts, the root transform will be set to
point to the corresponding armature bone. For other components, a parent constraint will be automatically generated if
necessary.</p><p>Note also that as part of the armature merge, skinned meshes are adjusted (bindposes recalculated) in order to be
compatible with the base avatar&#x27;s mesh. This means that outfits generated using different 3D software are still
compatible.</p><p>If fine adjustments to positioning are required, they can be made to the prefab armature before merging; as long as
the &#x27;locked&#x27; option (described later) is disabled, the world position of the bones will be retained (effectively, it
will behave as if each bone was moved inside the corresponding bone in the base avatar).</p><h2 class="anchor anchorWithStickyNavbar_LWe7" id="merging-more-complex-gimmicks">Merging more complex gimmicks<a class="hash-link" href="#merging-more-complex-gimmicks" title="Direct link to heading"></a></h2><p>For gimmicks involving animators, Modular Avatar has a <code>Merge Animator</code> component.</p><p><img loading="lazy" alt="img_4.png" src="/assets/images/img_4-93695aa922cd7bd377b5c8961843811d.png" width="835" height="672" class="img_ev3q"></p><p>This component will merge the specified animator controller into the corresponding Avatar 3.0 playable layer.
If <code>Delete Attached Avatar</code> is enabled, any animator on the same gameobject will also be deleted (having such an
animator around can be handy for editing animations).</p><p>In order to ease editing, animations on a merged animator should have their clips created based off of the location of
the Merge Animator script in the hierarchy. In other words, you don&#x27;t cite the path up to the merge animator script, but
only the path from that point:</p><p><img loading="lazy" alt="img_5.png" src="/assets/images/img_5-e1459030e1d2bebe9ab9fd2e94cf8210.png" width="422" height="806" class="img_ev3q"></p><p>If you use the unity &#x27;record animation&#x27; mode to record an animation on an animator on the same game object, this should
all Just Work.</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="placing-objects-elsewhere-in-the-avatar">Placing objects elsewhere in the avatar<a class="hash-link" href="#placing-objects-elsewhere-in-the-avatar" title="Direct link to heading"></a></h3><p>Your gimmick may sometimes need to put objects (eg contacts) at other places in the hierarchy. To do this, you could use
the Merge Armature script as described above, but this depends on matching up bone names and positions, and so is not
ideal for a gimmick that is meant to work with any avatar.</p><p>Instead, you can use the <code>Modular Avatar Proxy Bone</code> component. Attaching this component to a transform will cause that
transform to match its position and orientation to the humanoid bone (or sub-bone) in question.</p><p><img loading="lazy" alt="img_6.png" src="/assets/images/img_6-a4e78a20ded289ad4cc6f5d5ccd59027.png" width="394" height="292" class="img_ev3q"></p><p>Just drag the transform your want to reference onto Target, and the bone reference and sub path will be automatically
configured.</p><p>At build time, the proxy bone object will be moved under the actual bone in question, and animation references will be
updated to match.</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="animating-humanoid-bones">Animating humanoid bones<a class="hash-link" href="#animating-humanoid-bones" title="Direct link to heading"></a></h3><p>Normal humanoid animations can be used with merged animators without special setup.</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="animating-non-humanoid-bones">Animating non-humanoid bones<a class="hash-link" href="#animating-non-humanoid-bones" title="Direct link to heading"></a></h3><p>When animating non-humanoid bones (e.g. cat ears), some special setup is needed. Use a <code>Modular Avatar Merge Armature</code>
component with the <code>Locked</code> setting enabled:</p><p><img loading="lazy" alt="img_7.png" src="/assets/images/img_7-aa712d94bc0c0e6ebd2f7a557945978e.png" width="1134" height="668" class="img_ev3q"></p><p>When locked is enabled, the base bone and prefab bone will be locked together; if you move one, the other will move.
This means you can move your prefab&#x27;s merge-armature proxy bones when recording an animation, and the corresponding
base-avatar bone will also update, making it easy to see what you&#x27;re doing.</p><p>At build time, these proxy bones will be merged into the base avatar, so they won&#x27;t count against performance stats.</p></div><footer class="theme-doc-footer docusaurus-mt-lg"><div class="theme-doc-footer-edit-meta-row row"><div class="col"><a href="https://github.com/bdunderscore/modular-avatar/tree/main/docs/docs/intro.md" target="_blank" rel="noreferrer noopener" class="theme-edit-this-page"><svg fill="currentColor" height="20" width="20" viewBox="0 0 40 40" class="iconEdit_Z9Sw" aria-hidden="true"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>Edit this page</a></div><div class="col lastUpdated_vwxv"></div></div></footer></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages navigation"><a class="pagination-nav__link pagination-nav__link--next" href="/docs/test"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">test</div></a></nav></div></div><div class="col col--3"><div class="tableOfContents_bqdL thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#merging-outfits-and-similar-things" class="table-of-contents__link toc-highlight">Merging outfits (and similar things)</a></li><li><a href="#merging-more-complex-gimmicks" class="table-of-contents__link toc-highlight">Merging more complex gimmicks</a><ul><li><a href="#placing-objects-elsewhere-in-the-avatar" class="table-of-contents__link toc-highlight">Placing objects elsewhere in the avatar</a></li><li><a href="#animating-humanoid-bones" class="table-of-contents__link toc-highlight">Animating humanoid bones</a></li><li><a href="#animating-non-humanoid-bones" class="table-of-contents__link toc-highlight">Animating non-humanoid bones</a></li></ul></li></ul></div></div></div></div></main></div></div><footer class="footer footer--dark"><div class="container container-fluid"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Docs</div><ul class="footer__items clean-list"><li class="footer__item"><a class="footer__link-item" href="/docs/intro">Documentation</a></li></ul></div><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items clean-list"><li class="footer__item"><a href="https://stackoverflow.com/questions/tagged/docusaurus" target="_blank" rel="noopener noreferrer" class="footer__link-item">Stack Overflow<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://discordapp.com/invite/docusaurus" target="_blank" rel="noopener noreferrer" class="footer__link-item">Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://twitter.com/docusaurus" target="_blank" rel="noopener noreferrer" class="footer__link-item">Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li></ul></div><div class="col footer__col"><div class="footer__title">More</div><ul class="footer__items clean-list"><li class="footer__item"><a href="https://github.com/bdunderscore/modular-avatar" target="_blank" rel="noopener noreferrer" class="footer__link-item">GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2022 bd_. Built with Docusaurus.</div></div></div></footer></div>
<script src="/assets/js/runtime~main.102aa7f4.js"></script>
<script src="/assets/js/main.6dd80f64.js"></script>
</body>
</html>