From c52e8c9d714efca44159f3341681ab6bb83b0abd Mon Sep 17 00:00:00 2001 From: Hui Wang Date: Tue, 3 May 2022 22:52:43 +0800 Subject: [PATCH] update doc --- docs/animation/skinning.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/animation/skinning.md b/docs/animation/skinning.md index caa910a..4c6116e 100644 --- a/docs/animation/skinning.md +++ b/docs/animation/skinning.md @@ -25,7 +25,9 @@ Below we have an equation representation. The i-th vertex v is the new vertex po
-In Scotty3D, the `Skeleton::skin()` function gets called on every frame draw iteration, recomputing all skinning related quantities. In this function, you should read vertices from `input.verts()` and indices from `input.indices()`, and write the resulting positions and norms to `v.pos` and `v.norm` for every vertex in the input vertices list. + + +In Scotty3D, the `Skeleton::skin()` function gets called on every frame draw iteration, recomputing all skinning related quantities. In this function, you should read vertices from `input.verts()` and indices from `input.indices()`, and write the resulting positions to `v.pos` for every vertex in the input vertices list. You will be implementing a Capsule-Radius Linear Blend Skin method, which only moves vertices with a joint if they lie in the joint's radius. The `Skeleton::skin()` function also takes in a `map` of vertex index to relevant joints that you must compute the above distance/transformation metrics on. You are also responsible for creating this `map`, which is done so in `Skeleton::find_joints()`. Don't worry about calling this function, it is called automatically before skin is called, populating the `map` field and sending it over to the `skin()` function. Your `Skeleton::find_joints()` implementation should iterate over all the vertices and add joint j to vertex index i in the map if the distance between the vertex and joint is less than `j->radius` (remember make sure they're both in the same coordinate frame.) -- GitLab