A distance-based approach for human posture simulations

Human-like characters can be modeled by suitable skeletal structures, which basically consist in trees where edges represent bones and vertices are joints between two adjacent bones. Motion is then defined as variations of the joints' configuration (i.e., partial rotations) over time, which also influences joint positions. However, this representation does not allow to easily represent the relationship between joints that are not directly connected by a bone. This work is therefore based on the premise that variations of the relative distances between such joints are important to represent complex human motions. While the former representations are currently used in practice for playing and analyzing motions, the latter can help in modeling a new class of problems where the relationships in human motions need to be simulated. Our main interest in this work is in adapting previously captured human postures (one frame of a given motion) with the aim of satisfying a certain number of geometrical constraints, which turn out to be easily definable in terms of distances. We present a novel procedure for approximating the relative inter-joint distances for skeletal structures having arbitrary features and respecting a predefined posture. This set of inter-joint distances defines an instance of the Distance Geometry Problem (DGP), that we tackle with a non-monotone spectral gradient method.


I. INTRODUCTION
In computer animation, human characters are typically modeled by a skeletal structure, which is a weighted tree S = (V, E skel , b skel ), where every vertex v ∈ V represents a joint of the character, and where every edge connecting two joints u and v represents a bone.Weights are associated to the bones, that indicate their length δ uv through the function: In this setup, a motion for a given character can be represented by the joints' orientations over time, which influence joint positions [4], [9].While this representation is commonly used in domains such as video games or human motion analysis, it does not allow, however, to easily represent the relationship between joints that are not directly connected by a bone (e.g., how a wrist moves in relation to the hip of the character).
We focus our attention on a novel methodology to describe a character and its motion by relative inter-joint distances.In the current literature, the simulation of character motions is generally performed either by modifying existing captured motions, where character and/or motion features may be manipulated [8], or by simulating motions from physical equations [3].By exploiting distance information, it is our aim to study novel methods that are able to distinguish the geometrical information regarding a character, and the motion associated to it.In this way, the simulation of a modified motion for a modified character becomes trivial to model, and solely based on distance constraints.
In first analysis, we focus in this paper on human postures, that is, on only one "frame" of a given human motion.The main problem that we address is the following.How to adapt a given posture, extracted from a certain skeletal structure, to another skeletal structure having arbitrary bone lengths?The methods proposed in this paper can potentially be integrated in tools for motion simulation, and applied to all frames (all postures) of a given motion.
A posture x for the skeletal structure S in the Euclidean space R 3 is a mapping x : V −→ R 3 , so that every x v = x(v) provides the coordinates of the joint v in the posture.If an ordering is associated to the joints (some possible orderings can be deduced from the tree structure of S), then the posture can also be expressed in matrix form by X = [x 1 x 2 . . .x n ] ⊤ , where n = |V | and every x v is a column vector.The matrix X has n rows and 3 columns (corresponding to the dimension of the Euclidean space).From a known posture X for S, the distance matrix D = [D uv ] can be defined such that: where || • || is the Euclidean norm.Given a distance matrix D = [δ uv ], the Distance Geometry Problem (DGP) in dimension 3 asks whether a realization X in the three-dimensional space for D exists so that all distances δ uv are satisfied [6].Notice that, the distance matrix D is said a Euclidean Distance Matrix (EDM1 ), in dimension 3, when the DGP admits at least one solution.In our context, a realization X corresponds to a posture for the corresponding skeletal structure S.
A common approach to the DGP is to reformulate it as an unconstrained global optimization problem, where a penalty function is utilized for measuring the violation of the distance constraints [6].The terms of the penalty function, one for each constraint, measure the absolute difference between the computed value ||x u − x v || and the expected value δ uv .One example of penalty function, that also takes into consideration the fact that priority levels π uv can be associated to the distances, is given by After the reformulation of a DGP as a global optimization problem, its solution consists in finding a global optimum for the chosen penalty function.When the matrix D is an EDM, the value of the objective function in the solution is supposed to be zero.Otherwise, this value is strictly positive because of the error introduced on some of the distances.In our particular DGP application, the magnitude of the constraint violations cannot be a priori estimated.
In this work, we propose a novel procedure for manipulating distance matrices D with the aim of imposing a predefined set of geometrical constraints to the postures X to be simulated.Our procedure is based on the idea of separating the geometrical information concerning the character (the tree S) from the posture X.The modified distance matrix D = [δ uv ], containing an approximated set of distances, is then realized by using an ad-hoc approach to the DGP.
It is important to remark that, after performing some modifications on distance matrix D obtained by applying (1), it is likely that this distance matrix is no longer an EDM, so that approximate posture X, in a least squares sense, need to be searched.This is equivalent to searching for the EDM that is the nearest to D [1].In such a case, associating a priority level π uv to every distance δ uv becomes fundamental: we seek and select in fact approximate postures that are able to privilege higher priority distances.
The rest of this short paper is organized as follows.In Section II, we will present our original method for manipulating a distance matrix D, initially representing a posture for a given skeletal structure S, so that it represents the same posture for a skeletal structure having modified bone lengths.This distance matrix will be used for creating new DGP instances that we will solve by employing a spectral gradient method implementing a non-monotone line search.Some preliminary computational experiments on a predefined human walking posture are presented in Section III, and Section IV will briefly conclude the paper.

II. SKELETON-INDEPENDENT DISTANCE MATRICES
Let us suppose that the matrix X 1 of positions for the joints of the skeletal structure S 1 is known.X 1 is a possible realization of the skeletal structure S 1 which satisfies all bonelength constraints in the set b skel (E skel ).The other inter-joint distances, that are not pre-defined in S 1 , give a possible posture of the skeletal structure.Our main idea is to capture the distance information related to this posture, independently from the features of the skeletal structure (i.e. the bone lengths).This way, this distance-based information about the posture can be subsequently associated to a skeletal structure having different bone lengths.
Since X 1 is known for S 1 , all inter-joint distances D uv can be computed by applying equ.(1), so that an initial distance matrix D can be defined.Naturally, all bone-length constraints in b skel (E skel ) are satisfied by X 1 .The realization of this initial matrix D can be performed in polynomial computational time, and a high-quality approximation of the unique solution can be easily obtained [2].Naturally, this unique solution corresponds to the original posture X 1 of S 1 (modulo rotations, translations and reflections).
We propose to extract the information about the posture of S 1 represented by X 1 with the following procedure.Our procedure is based on the idea to compute all shortest paths P uv = {p 1 , . . ., p k } between pairs of distinct joints, where p 1 = u, p k = v and, for every i = 1, . . ., k − 1, we have {p i , p i+1 } ∈ E skel .The term "shortest" makes reference to the number of edges that need to the crossed by the path to walk from the vertex u to the vertex v of the skeletal structure S; it is not related neither to the distances δ, not to priority levels π.We refer to the sum of the distance values δ over a path P uv as the weight τ uv of the shortest path P uv , computed as: We will use the superscript "(1)" for indicating that shortest paths P uv and weights τ uv are related to the skeletal structure S 1 ; the superscript "(2)" will be employed below when referring to S 2 .
Once all shortest paths P uv over the skeletal structure S 1 are computed, we normalize the computed distances D uv with the weights τ (1) uv of the corresponding shortest path.In other words, instead of considering the distances computed by equ.(1), we apply the following formula: where x v is the position of the generic vertex v in the posture X 1 .Notice that all distances related to bone lengths are equal to 1 after the normalization, and that distances close to 0 indicate an inter-joint contact, while non-bone distances close to 1 are related to completely extended configurations.We point out that the idea to normalize relative distances is not completely new, and that it was partially exploited for example in [5] in a morphology-independent representation of the motions, which is however not solely based on distance information.
In order to impose the posture in X 1 to another skeletal structure S 2 , we apply first of all the formula for computing a new distance matrix: uv is the weight of the shortest path P (2) uv over S 2 .This formula makes it possible to reconstruct correctly the bone lengths of S 2 while modifying accordingly the original distances in X 1 , for them to be adapted to the new bone lengths of S 2 .
Intuitively, distances between joints that are close in the skeletal structure (i.e.corresponding to shortest paths P uv over fewer bones) can be approximated better than others (for example the distance between a hand and a foot is more difficult to approximate).For this reason, every computed distance δ uv is coupled with the priority level π uv , that is based on the cardinality |P uv | of the corresponding shortest path: where P max is the longest shortest path that can be defined over the two skeletal structures S 1 and S 2 .Notice that, in correspondence with the bone lengths, the priority π uv is maximal and equal to 1; the smallest possible priority value is given by 2/|P max |.This distance information, together with the associated priority levels, defines a DGP instance for the simulation of human postures.

III. COMPUTATIONAL EXPERIMENTS
In our computational experiments, we consider a human walking posture extracted from a walking motion.This section shows the results obtained by constructing an approximated distance matrix by the method detailed in Section II, and by looking for the corresponding posture by implementing the spectral gradient method with non-monotone line search described in [7].All codes were written in Matlab 2016b and the experiments were carried out on an Intel Core 2 Duo @ 2.4 GHz with 2GB RAM, running Mac OS X.
A graphical representation of the original skeletal structure is displayed in Fig. 1, together with the initial posture from which we extract the distance information.Table I shows the list of short labels for all joints forming the skeletal structure, together with the original distances from the corresponding joint parents (bone lengths).Table II shows some preliminary experiments, where the parameters of the non-monotone spectral gradient method, are the same of the experiments presented in [7].The distance matrix is generated by applying the procedure detailed in Section II.As a starting point X 0 in the spectral gradient method, we considered the original posture with the original bone lengths.All experiments took less than 1 second of CPU time.
As the table shows, the method is able to reproduce quite well the original posture in the new skeletal structures.It is possible to remark, however, that when very important changes in the bone lengths are imposed, the obtained posture can show some slight deformations w.r.t. the original one (see for example the posture obtained when imposing a 60% longer spine).In order to avoid such undesired effects, we are currently working on a more advance method for the definition of the approximated distance matrices and of the associated priority levels.

IV. CONCLUSIONS
We have presented a novel approach, solely based on distance information, for simulating a given human posture of a skeletal structure having arbitrary bone lengths.Once an approximated distance matrix is defined, the problem to be solved is a classical one in the context of distance geometry, where an EDM near to the approximated matrix needs to be identified, by revealing in this way the posture for the new skeletal structure.Our computational experiments show that the presented methodology is promising when the corresponding distance geometry problem is solved by using the non-monotone spectral gradient method proposed in [7] in the context of the dynamical distance geometry.Future works will mostly be aimed at improving and at performing a theoretical validation of the procedure detailed in Section II, as well as at extending the entire methodology to the simulation of motions.

Fig. 1 .
Fig. 1.The posture X 1 of the original skeletal structure S 1 .
EXPERIMENTS WHERE AN APPROXIMATED DISTANCE MATRIX IS GENERATED BY IMPLEMENTING THE PROPOSED METHOD, AND WHERE A POSTURE IS OBTAINED BY A SPECTRAL GRADIENT METHOD WITH NON-MONOTONE LINE SEARCH.

SOME
DETAILS ABOUT THE CONSIDERED SKELETAL STRUCTURE S, WITH THE ORIGINAL BONE DISTANCES (DISTANCE OF EVERY JOINT FROM ITS PARENT, IN PARENTHESIS).