diff --git a/README.md b/README.md
new file mode 100644
index 0000000..6fe57f3
--- /dev/null
+++ b/README.md
@@ -0,0 +1,8 @@
+Docs for the benthic project.
+This is meant to give a high level overview of how the project goes together, along with descriptions of gotchas and confusing aspects of the opensim/secondlife protocol.
+
+# Getting Started
+
+run
+
+`Jekyll serve `
diff --git a/_layouts/default.html b/_layouts/default.html
index 32b1aa0..c489a09 100644
--- a/_layouts/default.html
+++ b/_layouts/default.html
@@ -467,6 +467,7 @@
Inventory
Agent
Rendering
+ Animation
diff --git a/animation.html b/animation.html
new file mode 100644
index 0000000..459f3ff
--- /dev/null
+++ b/animation.html
@@ -0,0 +1,103 @@
+---
+layout: default
+title: Animation
+---
+
+{% include happy_benthic.html %}
+
+
Animation
+
+ Animation packets are sent shortly after the session is established with the
+ viewer. These packets identify an animation to play based on UUID, which
+ either represents the UUID of a default animation, or one that needs to be
+ retrieved from a capability endpoint.
+
+
+ This file
+ in the default assets project contains the UUIDs of the default animations,
+ and associates them with their corresponding playable animation files. These
+ animation files can be viewed
+ here
+ with software such as
+ Blender. These default
+ animation files contain only the joints with no mesh, to save on storage
+ space.
+
+
+
+
The Reskeletonizer
+ All animations must be able to play on all possible avatar skeletons. In order
+ to do this, all animations must be stored with every possible bento bone, and
+ then pared down to a subset of those bones in order to apply them to specific
+ avatars. Applying a full bento skeleton animation to an avatar using only some
+ of the bento bones does not work in any engine. The solution to this is the
+
reskeletonizer
+ project, which takes in rust struct representations of animations, and then
+ outputs new GLTF files with unused bones removed.
+
+
+
+
Animation Flow
+
+
+
+
1.
+
+ At compile time, the
+ Benthic Asset Pipeline
+ runs its build.rs. This uses the
+ Benthic Default Assets
+ project to retrieve the default bento skeleton and default animations.
+ It then generates rust files from the defaults that can be imported
+ and used by the reskeletonizer.
+
+
+
+
2.
+
+ The animation packet is received from the server in the
+ Metaverse Core
+ crate, including which user is playing the animation.
+
+
+
+
3.
+
+ Determine if the animation is a default animation, and if not,
+ download the animation
+
+
+
+
4.
+
+ Store the generated rust struct representation of the animation, and
+ pass that to the reskeletonizer along with the skeleton of the model
+ you want to retarget the animation to.
+
+
+
+
5.
+
+ Send a message to the UI containing the on-disk location of the
+ generated .gltf file, which can be applied to the agent's model
+ in-world.
+
+
+
+
+
diff --git a/index.html b/index.html
index 925ac56..f075aa7 100644
--- a/index.html
+++ b/index.html
@@ -113,8 +113,7 @@ Testability
Getting Started
-
The benthic project stretches across several repos, containing several different crates. There are four primary
- crates that contain the majority of the project's code.
+
The benthic project stretches across several repos, containing several different crates. These are the crates required for running the benthic project.
+
+
+ Reskeletonizer
+ Accepts animations built on the full bento skeleton, and removes bones not included in the target avatar, outputting GLTF files with compatable skeletons. This allows for easy animation retargeting for other game engines.
+
+
+
+ Benthic Default Assets
+ This repo contains all of the default assets that the protocol expects the user to have pre-downloaded. This includes textures, shaders, animations, sounds, and 3d models. This is meant to be a standalone project that can be imported by other viewer projects who need the full default asset kit.
+
+
+
+ Benthic Asset Pipeline
+
+ This is a very small repo that includes a build script that generates certain default files into rust structs from the default assets dir, such as the default skeleton and animations to be imported into other crates.
+
The recommended project layout for developing looks like this:
@@ -152,6 +167,9 @@
Serde LLSD
├── metaverse_client/
├── metaverse_gltf/
├── benthic_viewer/
+ ├── reskeletonizer/
+ ├── benthic_default_assets/
+ ├── benthic_asset_pipeline/
└── serde-llsd/
OpenSimulator
diff --git a/objects.html b/objects.html
index 705f0fc..5cf0c01 100644
--- a/objects.html
+++ b/objects.html
@@ -202,3 +202,25 @@
ImprovedTerseObjectUpdate
>ObjectUpdate, packet.
+
+
Rendering Parented Objects
+
+ A primary concept in open metaverse worlds is object hierarchies. Object
+ update packets with parents don't come from the server with their global
+ transforms, but their local transforms relative to the parent object. When
+ placing objects with parents, their position must be calculated from their
+ parent's position and rotation using these formulas:
+
+
+
Child Position
+ parent_position * (child_object_position * parent_rotation)
+
+
+
Child Rotation
+ parent_rotation * child_rotation
+
+
+ It is important to mention that if you store the object's position as a Vec3,
+ you cannot simply multiply it by a quaternion. Use built-in functions like
+ mul_vec3 in glam to apply the scale properly.
+