Skip to content

Commit

Permalink
add new pages, update vrm spritesheet doc
Browse files Browse the repository at this point in the history
  • Loading branch information
madjin committed Feb 23, 2024
1 parent 07d1c6c commit 5c8bd0e
Show file tree
Hide file tree
Showing 11 changed files with 122 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/Developers/Pages/batch-download.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Batch Download
1 change: 1 addition & 0 deletions docs/Developers/Pages/batch-manifest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Batch Manifest
1 change: 1 addition & 0 deletions docs/Developers/Pages/claim.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Claim
1 change: 1 addition & 0 deletions docs/Developers/Pages/wallet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Wallet
40 changes: 40 additions & 0 deletions docs/Modders/manifest-files/vrm-to-lora.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,46 @@ Specifically this part automates the part of gathering screenshots and tagging t

![Screenshot from 2024-02-14 12-17-25](/img/SkXX5KWnp.png)

This is what all the text files from the output look like, the screenshots and associated text is all configurable via the manifest file:

```
anata a person slowly walking, full shot plain white background
anata a person saluting, medium shot plain white background
anata a person boxing, full shot plain white background
anata a person sitting on the floor plain white background
anata a person falling with open arms plain white background
anata a person crossing arms, medium shot plain white background
anata a person crossing arms, looking away from camera, full shot plain white background
anata a person dodging to the right, full shot plain white background
anata a person kneeling, full shot plain white background
anata a person kneeling, pointing away, full shot plain white background
anata a person with aiming pose plain white background
anata a person stranding, greeting plain white background
anata a person sitting straight with arms on hips plain white background
anata a person running plain white background
anata a person running away from viewer plain white background
anata a person in fight stance, medium shot plain white background
anata a person in fight stance, cowboy shot plain white background
anata a person doing a high kick, side view, full shot plain white background
anata a person kneeling straight, looking at camera plain white background
anata a person kneeling straight, facing away from camera plain white background
anata a person flexing muscles, full shot plain white background
anata a person strut walking, full frame plain white background
anata a person strut walking away from viewer plain white background
anata a person throwing a punch plain white background
anata a person hanging with arms, shot from behind plain white background
anata a person crawling plain white background
anata a person doing squats plain white background
anata a person sitting with leg crossed plain white background
anata a person in attack stance plain white background
anata a person with taunting pose plain white background
anata a person dancing plain white background
anata a person posing for picture with raised leg plain white background
anata a person cheering with hands up plain white background
anata a person walking plain white background
anata a person posing for picture plain white background
```

For the rest of the steps, follow this guide: https://hackmd.io/@reneil1337/avatar-lora

---
Expand Down
73 changes: 73 additions & 0 deletions docs/Modders/manifest-files/vrm-to-spritesheet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
---
sidebar_position: 5
---

# VRM to Spritesheet

The spritesheet generator works very similar to the LoRA generator with the exception that the image outputs are turned into an atlas alongside a gif preview. Here's a very simple example of a manifest file that can generate a spritesheet:

![](/img/simple-spritesheet-manifest.png)

![](/img/joy2.gif)

You'll most likely want a walk cycle animation for a general usecase sprite sheet that can be used in gamedev or as a fallback avatar in supported platforms.

![](/img/walk2.gif)

---

The shot sizes being used for screenshots borrow from this cheatsheet:

![](/img/shotsize-cheatsheet.png)

There's 4 different `cameraFrame` positions as referenced in `src/library/screenshotManager.js`:

```javascript
frameCloseupShot(){
this.frameShot("head", "head")
}
frameMediumShot(){
this.frameShot("chest", "head")
}
frameCowboyShot(){
this.frameShot("hips", "head")
}
frameFullShot(){
this.frameShot("leftFoot", "head")
}
```

---

## Extension Research

**WIP**

M3 is currently doing research on creating a glTF extension for spritesheets that can be used as avatars: https://hackmd.io/@XR/vrm-spritesheet. Here is a rough idea of how an implementation might look like:

```json
{
"extensionsUsed": ["m3_spritesheet_animations"],
"images": [
{
"uri": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA..."
}
],
"extensions": {
"m3_spritesheet_animations": {
"spritesheets": [
{
"image": 0,
"name": "Sprite Animations",
"dimensions": { "width": 1024, "height": 1024, "framesH": 4, "framesV": 4 },
"frameRate": 12,
"animations": [
{ "name": "walking", "startFrame": 0, "endFrame": 3, "loop": true },
{ "name": "jumping", "startFrame": 4, "endFrame": 7, "loop": false }
]
}
]
}
}
}
```
5 changes: 5 additions & 0 deletions sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ const sidebars = {
'Modders/manifest-files/character-select',
'Modders/manifest-files/character-traits',
'Modders/manifest-files/vrm-to-lora',
'Modders/manifest-files/vrm-to-spritesheet',
'Modders/manifest-files/ai-personalities',
'Modders/manifest-files/generate-manifest-files',
]
Expand All @@ -46,14 +47,18 @@ const sidebars = {
collapsed: true,
items: [
'Developers/Pages/appearance',
'Developers/Pages/batch-download',
'Developers/Pages/batch-manifest',
'Developers/Pages/bio',
'Developers/Pages/claim',
'Developers/Pages/create',
'Developers/Pages/landing',
'Developers/Pages/load',
'Developers/Pages/mint',
'Developers/Pages/optimizer',
'Developers/Pages/save',
'Developers/Pages/view',
'Developers/Pages/wallet',
]
},
'Developers/sdk',
Expand Down
Binary file added static/img/joy2.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/shotsize-cheatsheet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/simple-spritesheet-manifest.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/walk2.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 5c8bd0e

Please sign in to comment.