THE CONTENT BELOW is outdated and useless. It will be updated in few days (not before 16/11/2016)

 

——————————————————————————————————-

Motivation: Using MH bases of the whole mesh does not generate good ambient occlusion results when we decrease the number of bases in use. Thus, diving the mesh into clusters will help to get better results.

Clustering Schemes

Maximum Skinning Weight: Cluster the mesh vertices depending on the maximum value of the bone weights. This scheme generates good clusters; however it will be problematic for animated meshes since it discards effect of all the bones other than the one with maximum weight. Additionally, this approach is problematic between cluster borders.

Minimum Distance: Cluster the mesh vertices depending on the distance with the bones. Here, the vertices are assigned to cluster of the closest bone. Even though this approach also creates good clusters, it suffers on the cluster borders as maximum weight approach, and discards effect of all the other bones except the closest one.

Bone Weight Clustering: This approach considers all the weights a vertex has. Effects of all the bones are considered in this approach; however, it also generates lots of small clusters having one, two, six, etc. vertices. These kinds of small clusters effect approximated ambient occlusion results, and generates wrong results when number of the bases is decreased.

Threshold Clustering

We need clusters depending on more than one bone and yet including reasonable number of vertices. If we consider all the bones effect on a vertex, we can face with some bone weights such as 0.003 and 0.001 with a weight 0.996. Considering these kinds of small weights only generates small clusters tending to generate wrong results. So, we will going to add a user defined threshold that eliminates effect of bones with small weights on the vertices.

  ---Threshold Clustering Algorithm---

THRESHOLD ϵ [0, 1]
for i = 0 to N   // For each vertex in the mesh
   for j = 0 to M // For each bone weight
      if Wj > THRESHOLD
          - Add the bone index j into the list
      end
   end

   if there is a cluster including the same bone indices
      // Add the vertex into that cluster
   else
      // Generate a new cluster with the bone indices
      // Add that cluster into cluster set
   end
end

Experiments with Threshold Clustering

For now, we used a hand model with 5406 vertices (figure 1).

Hand model with 5406 vertices and per-vertex ray traced AO

Figure 1. Hand model with 5406 vertices and per-vertex ray traced AO

Experiment with the threshold showed that the best threshold value for this mesh is 0.11. By using this threshold, we are eliminating small clusters (size(clusteri)) > 20 for each clusters), keep enough number of bones to affect, and good cluster locations for decreasing MH bases (figure 2 and figure 3).

Figure 2. Clusters with 0.11 threshold. Having independent clusters between fingers is important for getting correct AO result when we decrease the number of bases.

Figure 2. Clusters with 0.11 threshold. Having independent clusters between fingers is important for getting correct AO result when we decrease the number of bases.

Figure 3. 0.11 threshold value also generates good clusters for the palm. This model has 40 clusters for 0.11 value.

Figure 3. 0.11 threshold value also generates good clusters for the palm. This model has 40 clusters for 0.11 value.

Even though using a threshold solves many problems, there are still problems on the borders between clusters (figure 4). However, this approach is more promising to get better results among the other approaches. Especially, for the big clusters with uniform ambient occlusion (such as wrist), we are able to decrease the number of bases more than 90%.

Figure 4. Left, clusters. Middle AO. Right, AO after the bases decreased %10. The vertex marked with red circle (left) is problematic because of assigning into wrong cluster. Because of that, even if we decrease the bases 10%, we get a wrong result (right). This problem occurs because of some mistakes during the rigging process of the mesh.

Figure 4. Left, clusters. Middle AO. Right, AO after the bases decreased %10. The vertex marked with red circle (left) is problematic because of assigning into wrong cluster. Because of that, even if we decrease the bases 10%, we get a wrong result (right). This problem occurs because of some mistakes during the rigging process of the mesh.

Also, for some parts (such as between fingers), we are able to decrease the number of bases around 50% (figure 5 and figure 6).

Figure 5. First row, from left to right: Clusters, 100% bases, 90%, 80%, 70%, 60%. Second row, left to right: 50%, 40%, 30%, 20%, 10%. Reason behind the black vertices explained above and in figure 4.

Figure 5. First row, from left to right: Clusters, 100% bases, 90%, 80%, 70%, 60%. Second row, left to right: 50%, 40%, 30%, 20%, 10%. Reason behind the black vertices explained above and in figure 4.

Figure 6. GIF version of figure 5. Quality of the images has reduced during the conversion.

Figure 6. GIF version of figure 5. Quality of the images has reduced during the conversion.

For the nails, even though there is no such problems as figure 4, we begin to lose some details when we use less than 80% of the bases (figure 7).

Figure 7. Details on the nails has been lost starting from 60% of the bases. Left, 100%. Middle 80%. Right, 60%

Figure 7. Details on the nails has been lost starting from 60% of the bases. Left, 100%. Middle 80%. Right, 60%