mirror of
https://github.com/lhns/steam-frame-nix.git
synced 2026-10-06 06:00:22 +02:00
VR pet: model sources in the repo
The Toon Cat (sources/toon-cat/), the Tuxedo Cat glTF (sources/tuxedo-cat/)
and the Quaternius Shiba Inu and Fox (models/{shiba,fox}/model.glb), each
byte-identical to the previously fetched file and with a LICENSE.md
(author, original URL, licence, changes). The build no longer downloads
them; three.js (preview only) still comes from npm. The baked frames,
model dirs and icons are unchanged.
This commit is contained in:
1 parent
77085bad8a
commit
4819ea26a7
15 files changed
+16201
-47
No files matched your search
@@ -490,39 +490,38 @@ steam-frame-nix's modules, so it can't clean up after them.)
|
|||||||
|
|
||||||
## Credits
|
## Credits
|
||||||
|
|
||||||
The [VR pet](docs/pet.md)'s models are not in this repository: Nix fetches
|
The [VR pet](docs/pet.md)'s model sources are included in this repository,
|
||||||
them at build time from the URLs pinned (with their hashes) in
|
unchanged (byte-identical to the originals linked below), each with a
|
||||||
`modules/pet/package.nix` and `modules/pet/models/<id>/model.json`, and
|
`LICENSE.md` next to it: the cat's in `modules/pet/sources/`, the animals'
|
||||||
bakes them into the store.
|
in `modules/pet/models/<id>/`. Nix bakes them into the store at build time.
|
||||||
|
|
||||||
- **Toon Cat FREE** by [Omabuarts Studio](https://sketchfab.com/omabuarts)
|
- **Toon Cat FREE** by [Omabuarts Studio](https://sketchfab.com/omabuarts)
|
||||||
([model](https://sketchfab.com/3d-models/toon-cat-free-b2bd1ee7858444bda366110a2d960386)),
|
([model](https://sketchfab.com/3d-models/toon-cat-free-b2bd1ee7858444bda366110a2d960386)),
|
||||||
[CC-BY 4.0](https://creativecommons.org/licenses/by/4.0/): the cat (mesh,
|
[CC-BY 4.0](https://creativecommons.org/licenses/by/4.0/): the cat (mesh,
|
||||||
texture, rig, walk) and its coats. Modified: recoloured coats (Tuxedo,
|
texture, rig, walk) and its coats. Modified: recoloured coats (Tuxedo,
|
||||||
Blue, Cream, Snow), retargeted and hand-keyed animations, baked to one OBJ
|
Blue, Cream, Snow), retargeted and hand-keyed animations, baked to one OBJ
|
||||||
per frame. Fetched from a third-party GitHub mirror
|
per frame. Included as `modules/pet/sources/toon-cat/toon_cat_free.glb`
|
||||||
([DevTakao/threejs-cat](https://github.com/DevTakao/threejs-cat), pinned
|
(the glb of [DevTakao/threejs-cat](https://github.com/DevTakao/threejs-cat)).
|
||||||
commit and hash).
|
|
||||||
- **Tuxedo Cat Animated 2.0** by [DreamNoms](https://sketchfab.com/DreamNoms)
|
- **Tuxedo Cat Animated 2.0** by [DreamNoms](https://sketchfab.com/DreamNoms)
|
||||||
([model](https://sketchfab.com/3d-models/tuxedo-cat-animated-20-783fcb78b55b4394a212c2b6392e1113)),
|
([model](https://sketchfab.com/3d-models/tuxedo-cat-animated-20-783fcb78b55b4394a212c2b6392e1113)),
|
||||||
[CC-BY 4.0](https://creativecommons.org/licenses/by/4.0/): only its
|
[CC-BY 4.0](https://creativecommons.org/licenses/by/4.0/): only its
|
||||||
SitDown, IdleSit and StandUp clips, retargeted onto the Toon Cat and
|
SitDown, IdleSit and StandUp clips, retargeted onto the Toon Cat and
|
||||||
baked. Fetched from a third-party GitHub mirror
|
baked. Included as `modules/pet/sources/tuxedo-cat/` (the glTF of
|
||||||
([xialin-he/xialin-he.github.io](https://github.com/xialin-he/xialin-he.github.io),
|
[xialin-he/xialin-he.github.io](https://github.com/xialin-he/xialin-he.github.io)).
|
||||||
pinned commit and hash).
|
|
||||||
- **Shiba Inu** and **Fox** from the
|
- **Shiba Inu** and **Fox** from the
|
||||||
[Ultimate Animated Animal Pack](https://quaternius.com/packs/ultimateanimatedanimals.html)
|
[Ultimate Animated Animal Pack](https://quaternius.com/packs/ultimateanimatedanimals.html)
|
||||||
by [Quaternius](https://quaternius.com),
|
by [Quaternius](https://quaternius.com),
|
||||||
[CC0 1.0](https://creativecommons.org/publicdomain/zero/1.0/) (credited
|
[CC0 1.0](https://creativecommons.org/publicdomain/zero/1.0/) (credited
|
||||||
anyway). Modified: clips sampled per frame, sit, lie, sleep and the
|
anyway). Modified: clips sampled per frame, sit, lie, sleep and the
|
||||||
held-by-the-scruff pose hand-keyed, a wagging tail and breathing added,
|
held-by-the-scruff pose hand-keyed, a wagging tail and breathing added,
|
||||||
material colours turned into a texture. Fetched from the Poly Pizza
|
material colours turned into a texture. Included as
|
||||||
mirror ([Shiba Inu](https://poly.pizza/m/y4wdQpg767),
|
`modules/pet/models/{shiba,fox}/model.glb` (the glbs of Poly Pizza:
|
||||||
[Fox](https://poly.pizza/m/Bc97C66HKi), pinned hashes).
|
[Shiba Inu](https://poly.pizza/m/y4wdQpg767),
|
||||||
|
[Fox](https://poly.pizza/m/Bc97C66HKi)).
|
||||||
- **Dachshund:** the Quaternius Shiba Inu (CC0 1.0), reshaped (longer back
|
- **Dachshund:** the Quaternius Shiba Inu (CC0 1.0), reshaped (longer back
|
||||||
and ears, shorter legs) and recoloured black and tan.
|
and ears, shorter legs) and recoloured black and tan.
|
||||||
- **three.js** (desktop preview only), [MIT](https://github.com/mrdoob/three.js/blob/dev/LICENSE),
|
- **three.js** (desktop preview only), [MIT](https://github.com/mrdoob/three.js/blob/dev/LICENSE),
|
||||||
fetched from npm.
|
from npm at build time (not in this repository).
|
||||||
|
|
||||||
The baked cat's store output carries a short `CREDITS.md` pointing here.
|
The baked cat's store output carries a short `CREDITS.md` pointing here.
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -7,7 +7,8 @@ scripts in `modules/pet/` point here). Credits of the built-in models:
|
|||||||
Every model is a folder with a `model.json` (its spec) and any files the
|
Every model is a folder with a `model.json` (its spec) and any files the
|
||||||
spec names (a texture, a `.glb`, a thumbnail, a Blender script). The
|
spec names (a texture, a `.glb`, a thumbnail, a Blender script). The
|
||||||
built-in ones are `modules/pet/models/<id>/`, found by `builtins.readDir`
|
built-in ones are `modules/pet/models/<id>/`, found by `builtins.readDir`
|
||||||
(nothing else lists them). Your own go into `steamFrame.pet.extraModels`:
|
(nothing else lists them); an animal's source is in its folder with a
|
||||||
|
`LICENSE.md`, the cat's in `modules/pet/sources/`. Your own go into `steamFrame.pet.extraModels`:
|
||||||
either such a folder (`corgi = ./pets/corgi;`) or the spec as an attrset,
|
either such a folder (`corgi = ./pets/corgi;`) or the spec as an attrset,
|
||||||
with files as Nix paths (`calico = { name = "Calico"; png = ./calico.png; };`).
|
with files as Nix paths (`calico = { name = "Calico"; png = ./calico.png; };`).
|
||||||
Rebuild, and the model shows up in the pet's ⋯ menu and in
|
Rebuild, and the model shows up in the pet's ⋯ menu and in
|
||||||
@@ -171,8 +172,7 @@ it) and relax the ears on top at `Ear2` (sleep).
|
|||||||
{
|
{
|
||||||
"name": "Shiba Inu", "kind": "gltf", "order": 10,
|
"name": "Shiba Inu", "kind": "gltf", "order": 10,
|
||||||
"credit": "Shiba Inu, Ultimate Animated Animal Pack by Quaternius, CC0 1.0",
|
"credit": "Shiba Inu, Ultimate Animated Animal Pack by Quaternius, CC0 1.0",
|
||||||
"src": { "url": "https://static.poly.pizza/ba6d0ee3-bcc0-4ef0-9d3c-a3e245b41c77.glb",
|
"src": "model.glb",
|
||||||
"hash": "sha256-nL1PHhL4UCQSbqtqLFcGwJkZbfGhDbdObItnusP/9Uo=" },
|
|
||||||
"height": 0.35,
|
"height": 0.35,
|
||||||
"feet": ["FrontLowerLeg.L_end", "FrontLowerLeg.R_end", "BackLowerLeg.L_end", "BackLowerLeg.R_end"],
|
"feet": ["FrontLowerLeg.L_end", "FrontLowerLeg.R_end", "BackLowerLeg.L_end", "BackLowerLeg.R_end"],
|
||||||
"follow": { "IKFrontLeg.L": "FrontLowerLeg.L", "IKFrontLeg.R": "FrontLowerLeg.R",
|
"follow": { "IKFrontLeg.L": "FrontLowerLeg.L", "IKFrontLeg.R": "FrontLowerLeg.R",
|
||||||
|
|||||||
+2
-2
@@ -53,8 +53,8 @@ steamFrame.pet.enable = true;
|
|||||||
|
|
||||||
The first switch bakes the models: a few minutes on the Frame and about
|
The first switch bakes the models: a few minutes on the Frame and about
|
||||||
0.5 GB in the store (1.1 GB without `auto-optimise-store`, which hardlinks
|
0.5 GB in the store (1.1 GB without `auto-optimise-store`, which hardlinks
|
||||||
the coats' copies of the cat's frames); the sources are fetched at build
|
the coats' copies of the cat's frames); the model sources are in this
|
||||||
time (no Blender needed for the built-in models). Adding your own model, the spec and the
|
repository (no model download, no Blender needed for the built-in models). Adding your own model, the spec and the
|
||||||
animation mapping: [VR pet models](pet-models.md). A model of a character
|
animation mapping: [VR pet models](pet-models.md). A model of a character
|
||||||
someone else owns belongs in your own `extraModels` with `"private": true`
|
someone else owns belongs in your own `extraModels` with `"private": true`
|
||||||
([private models](pet-models.md#private-models)), never in this repository.
|
([private models](pet-models.md#private-models)), never in this repository.
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
# Fox
|
||||||
|
|
||||||
|
- `model.glb`: the Fox from the
|
||||||
|
[Ultimate Animated Animal Pack](https://quaternius.com/packs/ultimateanimatedanimals.html)
|
||||||
|
by [Quaternius](https://quaternius.com)
|
||||||
|
- Licence: [CC0 1.0](https://creativecommons.org/publicdomain/zero/1.0/)
|
||||||
|
(public domain; credited anyway)
|
||||||
|
- This copy: byte-identical to Poly Pizza's glb (https://poly.pizza/m/Bc97C66HKi,
|
||||||
|
https://static.poly.pizza/e18e86df-1692-48d8-ac6e-1e25ab4ad574.glb; sha256-mRd3HhQUxGVXsBHLqu5t6CqCdgUAgiejZMOGLwvmLdw=).
|
||||||
|
- Changed in steam-frame-nix (at build time, this file is unchanged): clips
|
||||||
|
sampled per frame, poses hand-keyed, a wagging tail and breathing added,
|
||||||
|
material colours turned into a texture (`bake_gltf.py`).
|
||||||
|
|
||||||
|
Credits: README.md, "Credits".
|
||||||
Binary file not shown.
@@ -3,10 +3,7 @@
|
|||||||
"kind": "gltf",
|
"kind": "gltf",
|
||||||
"order": 11,
|
"order": 11,
|
||||||
"credit": "Fox from the Ultimate Animated Animal Pack by Quaternius, CC0 1.0 (https://quaternius.com/packs/ultimateanimatedanimals.html, mirrored at https://poly.pizza/m/Bc97C66HKi)",
|
"credit": "Fox from the Ultimate Animated Animal Pack by Quaternius, CC0 1.0 (https://quaternius.com/packs/ultimateanimatedanimals.html, mirrored at https://poly.pizza/m/Bc97C66HKi)",
|
||||||
"src": {
|
"src": "model.glb",
|
||||||
"url": "https://static.poly.pizza/e18e86df-1692-48d8-ac6e-1e25ab4ad574.glb",
|
|
||||||
"hash": "sha256-mRd3HhQUxGVXsBHLqu5t6CqCdgUAgiejZMOGLwvmLdw="
|
|
||||||
},
|
|
||||||
"height": 0.32,
|
"height": 0.32,
|
||||||
"feet": ["FrontLowerLeg.L_end", "FrontLowerLeg.R_end", "BackLowerLeg.L_end", "BackLowerLeg.R_end"],
|
"feet": ["FrontLowerLeg.L_end", "FrontLowerLeg.R_end", "BackLowerLeg.L_end", "BackLowerLeg.R_end"],
|
||||||
"follow": {
|
"follow": {
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
# Shiba Inu
|
||||||
|
|
||||||
|
- `model.glb`: the Shiba Inu from the
|
||||||
|
[Ultimate Animated Animal Pack](https://quaternius.com/packs/ultimateanimatedanimals.html)
|
||||||
|
by [Quaternius](https://quaternius.com)
|
||||||
|
- Licence: [CC0 1.0](https://creativecommons.org/publicdomain/zero/1.0/)
|
||||||
|
(public domain; credited anyway)
|
||||||
|
- This copy: byte-identical to Poly Pizza's glb (https://poly.pizza/m/y4wdQpg767,
|
||||||
|
https://static.poly.pizza/ba6d0ee3-bcc0-4ef0-9d3c-a3e245b41c77.glb; sha256-nL1PHhL4UCQSbqtqLFcGwJkZbfGhDbdObItnusP/9Uo=).
|
||||||
|
- Changed in steam-frame-nix (at build time, this file is unchanged): clips
|
||||||
|
sampled per frame, poses hand-keyed, a wagging tail and breathing added,
|
||||||
|
material colours turned into a texture (`bake_gltf.py`). The Dachshund (models/dachshund/) is this model,
|
||||||
|
reshaped and recoloured.
|
||||||
|
|
||||||
|
Credits: README.md, "Credits".
|
||||||
Binary file not shown.
@@ -3,10 +3,7 @@
|
|||||||
"kind": "gltf",
|
"kind": "gltf",
|
||||||
"order": 10,
|
"order": 10,
|
||||||
"credit": "Shiba Inu from the Ultimate Animated Animal Pack by Quaternius, CC0 1.0 (https://quaternius.com/packs/ultimateanimatedanimals.html, mirrored at https://poly.pizza/m/y4wdQpg767)",
|
"credit": "Shiba Inu from the Ultimate Animated Animal Pack by Quaternius, CC0 1.0 (https://quaternius.com/packs/ultimateanimatedanimals.html, mirrored at https://poly.pizza/m/y4wdQpg767)",
|
||||||
"src": {
|
"src": "model.glb",
|
||||||
"url": "https://static.poly.pizza/ba6d0ee3-bcc0-4ef0-9d3c-a3e245b41c77.glb",
|
|
||||||
"hash": "sha256-nL1PHhL4UCQSbqtqLFcGwJkZbfGhDbdObItnusP/9Uo="
|
|
||||||
},
|
|
||||||
"height": 0.35,
|
"height": 0.35,
|
||||||
"feet": ["FrontLowerLeg.L_end", "FrontLowerLeg.R_end", "BackLowerLeg.L_end", "BackLowerLeg.R_end"],
|
"feet": ["FrontLowerLeg.L_end", "FrontLowerLeg.R_end", "BackLowerLeg.L_end", "BackLowerLeg.R_end"],
|
||||||
"follow": {
|
"follow": {
|
||||||
|
|||||||
+8
-20
@@ -4,8 +4,9 @@
|
|||||||
# patch (core.js + systemui.js), the `vr-pet` CLI (cli.mjs), the "+" menu
|
# patch (core.js + systemui.js), the `vr-pet` CLI (cli.mjs), the "+" menu
|
||||||
# entry and its icons (steam-frame-nix-pet-icon: icon.sh), the desktop preview (preview/)
|
# entry and its icons (steam-frame-nix-pet-icon: icon.sh), the desktop preview (preview/)
|
||||||
# and the tests (tests/, the flake check pet). System-independent
|
# and the tests (tests/, the flake check pet). System-independent
|
||||||
# inputs (pinned fetchurl, Python + numpy/pillow), so it also builds on
|
# inputs (the model sources, in this repository: sources/ and
|
||||||
# x86_64. Credits and licences: README.md, "Credits".
|
# models/<id>/; Python + numpy/pillow), so it also builds on x86_64.
|
||||||
|
# Credits and licences: README.md, "Credits".
|
||||||
{ pkgs, lib ? pkgs.lib
|
{ pkgs, lib ? pkgs.lib
|
||||||
, height ? 0.30 # m, standing height of the cat (ears)
|
, height ? 0.30 # m, standing height of the cat (ears)
|
||||||
, fps ? 24 # baked frames per second, and core ticks per second
|
, fps ? 24 # baked frames per second, and core ticks per second
|
||||||
@@ -20,22 +21,9 @@
|
|||||||
, hicolor ? "/nonexistent" # steam-frame-nix-pet-icon: the hicolor dir whose mtime it bumps
|
, hicolor ? "/nonexistent" # steam-frame-nix-pet-icon: the hicolor dir whose mtime it bumps
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
toonCat = pkgs.fetchurl {
|
# The cat's sources, in this repository (sources/*/LICENSE.md):
|
||||||
name = "toon_cat_free.glb"; # Omabuarts, CC-BY 4.0
|
toonCat = ./sources/toon-cat/toon_cat_free.glb; # Omabuarts, CC-BY 4.0
|
||||||
url = "https://raw.githubusercontent.com/DevTakao/threejs-cat/97b71575ebd84ff32c50785563bb6b97a9b87012/assets/models/toon_cat_free.glb";
|
tuxedo = ./sources/tuxedo-cat; # DreamNoms, CC-BY 4.0
|
||||||
hash = "sha256-92KR9dN9YPxY6ABqERGllglYVF/E2VkpiGgq06mq74E=";
|
|
||||||
};
|
|
||||||
tuxedo = "https://raw.githubusercontent.com/xialin-he/xialin-he.github.io/054a1f088cdd19544a8fd5d6d5eaad11e8b0d08e/public/tuxedo_cat_animated_2.0";
|
|
||||||
tuxedoGltf = pkgs.fetchurl { # DreamNoms, CC-BY 4.0
|
|
||||||
name = "tuxedo-scene.gltf";
|
|
||||||
url = "${tuxedo}/scene.gltf";
|
|
||||||
hash = "sha256-BLwRrWZL65yEKE+4pOYw3lrun8ZUrw5HqeM3ol96HoI=";
|
|
||||||
};
|
|
||||||
tuxedoBin = pkgs.fetchurl {
|
|
||||||
name = "tuxedo-scene.bin";
|
|
||||||
url = "${tuxedo}/scene.bin";
|
|
||||||
hash = "sha256-iiRZRV2GxilBDUvz6tUAzT3z5+Vqr/AkzQ6wFZFfTqw=";
|
|
||||||
};
|
|
||||||
threeTgz = pkgs.fetchurl { # MIT
|
threeTgz = pkgs.fetchurl { # MIT
|
||||||
url = "https://registry.npmjs.org/three/-/three-0.170.0.tgz";
|
url = "https://registry.npmjs.org/three/-/three-0.170.0.tgz";
|
||||||
hash = "sha256-SmCKNV3KunLg5Tg83IFDA/W2BgtDwjjN9pMtzraZI40=";
|
hash = "sha256-SmCKNV3KunLg5Tg83IFDA/W2BgtDwjjN9pMtzraZI40=";
|
||||||
@@ -48,8 +36,8 @@ let
|
|||||||
|
|
||||||
models = pkgs.runCommand "vr-pet-models" { nativeBuildInputs = [ python ]; } ''
|
models = pkgs.runCommand "vr-pet-models" { nativeBuildInputs = [ python ]; } ''
|
||||||
mkdir tuxedo
|
mkdir tuxedo
|
||||||
cp ${tuxedoGltf} tuxedo/scene.gltf
|
cp ${tuxedo + "/scene.gltf"} tuxedo/scene.gltf
|
||||||
cp ${tuxedoBin} tuxedo/scene.bin
|
cp ${tuxedo + "/scene.bin"} tuxedo/scene.bin
|
||||||
${srcOf [ "bake.py" "rig.py" ]}
|
${srcOf [ "bake.py" "rig.py" ]}
|
||||||
python3 src/bake.py ${toonCat} tuxedo/scene.gltf $out ${toString height} ${toString fps}
|
python3 src/bake.py ${toonCat} tuxedo/scene.gltf $out ${toString height} ${toString fps}
|
||||||
cp ${credits} $out/CREDITS.md
|
cp ${credits} $out/CREDITS.md
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
# Toon Cat FREE
|
||||||
|
|
||||||
|
- `toon_cat_free.glb`: "Toon Cat FREE" by [Omabuarts Studio](https://sketchfab.com/omabuarts),
|
||||||
|
<https://sketchfab.com/3d-models/toon-cat-free-b2bd1ee7858444bda366110a2d960386>
|
||||||
|
- Licence: [CC-BY 4.0](https://creativecommons.org/licenses/by/4.0/)
|
||||||
|
- This copy: byte-identical to the glb in
|
||||||
|
[DevTakao/threejs-cat](https://github.com/DevTakao/threejs-cat)
|
||||||
|
(`assets/models/toon_cat_free.glb`, commit 97b71575ebd84ff32c50785563bb6b97a9b87012;
|
||||||
|
sha256-92KR9dN9YPxY6ABqERGllglYVF/E2VkpiGgq06mq74E=).
|
||||||
|
- Modified in steam-frame-nix (at build time, this file is unchanged):
|
||||||
|
recoloured coats (Tuxedo, Blue, Cream, Snow), retargeted and hand-keyed
|
||||||
|
animations, baked to one OBJ per frame (`bake.py`).
|
||||||
|
|
||||||
|
Credits: README.md, "Credits".
|
||||||
Binary file not shown.
@@ -0,0 +1,15 @@
|
|||||||
|
# Tuxedo Cat Animated 2.0
|
||||||
|
|
||||||
|
- `scene.gltf`, `scene.bin`: "Tuxedo Cat Animated 2.0" by [DreamNoms](https://sketchfab.com/DreamNoms),
|
||||||
|
<https://sketchfab.com/3d-models/tuxedo-cat-animated-20-783fcb78b55b4394a212c2b6392e1113>
|
||||||
|
- Licence: [CC-BY 4.0](https://creativecommons.org/licenses/by/4.0/)
|
||||||
|
- This copy: byte-identical to the files in
|
||||||
|
[xialin-he/xialin-he.github.io](https://github.com/xialin-he/xialin-he.github.io)
|
||||||
|
(`public/tuxedo_cat_animated_2.0/`, commit 054a1f088cdd19544a8fd5d6d5eaad11e8b0d08e;
|
||||||
|
scene.gltf sha256-BLwRrWZL65yEKE+4pOYw3lrun8ZUrw5HqeM3ol96HoI=,
|
||||||
|
scene.bin sha256-iiRZRV2GxilBDUvz6tUAzT3z5+Vqr/AkzQ6wFZFfTqw=).
|
||||||
|
- Modified in steam-frame-nix (at build time, these files are unchanged):
|
||||||
|
only its SitDown, IdleSit and StandUp clips are used, retargeted onto the
|
||||||
|
Toon Cat and baked (`bake.py`).
|
||||||
|
|
||||||
|
Credits: README.md, "Credits".
|
||||||
Binary file not shown.
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user