\section{Introduction}
Virtual characters are present everywhere in computer assisted media; populating virtual worlds, embodying players, telling stories. Producing qualitative motion for them is crucial to achieve engaging animation and raise interest in the viewer. Character animation software provide tools and interfaces which help artists do so. Many of such tools have been developed over the years, striving to find balance between precision, ease of use, and controllability. \cite{lasseterPrinciplesTraditionalAnimation1987, catmullProblemsComputerassistedAnimation1978} 

The human eye perceives a lot of information through motion: it is a complex behavior through which character convey intent, emotions or personality. A same gesture can be performed in an wide variety of ways, even by a same character. Editing an existing animation to change the way it is performed, but not the gesture itself, is then an interesting research topic. Many techniques have been proposed to tackle the problem of animation style edition, but most of them act from the highest level, and lack the fine-grained control users look for.

This paper presents a new framework for character motion edition using pose metrics as a middle-ground between raw bone manipulation and high-level "style" labels. 
We introduce these intermediate-level descriptors, then propose a neural-networks-based edition pipeline which allows animators to edit a character's motion by manipulating the metrics.

\section{Related work}

Virtual characters are traditionally represented by a mesh on which various textures and materials are applied. Its motion is driven by an underlying skeleton on which the mesh is fitted ("skinned"). The role of an animator is to design the character's motion by editing the skeleton's poses at specific time stamps, called key-frames. Instead of key-framing a new animation from the ground up this way, it is also possible to capture the motion of real-life actors through dedicated motion capture (MoCap) setups. MoCap data is a good source of realistic motion, but the resulting  animation still often needs to be cleaned up and edited to fit the animator's vision.   

Previous research on character animation investigates tools, algorithms and interfaces to help make authoring and editing motion a simpler process. 
Increased availability and quality of natural motion acquired by MoCap systems has led to raising interest in data-oriented methods. Meaningful information can be extracted from ground truth data and put to use to provide animators with more efficient tooling.


\subsection{Animation edition}
Whether originally key-framed by an an animator or recorded in a MoCap setting, animation data is set to change for any number of reasons, ranging from tweaking details to fit an artist's vision, to re-purposing it to be used on a different character. This paper builds upon a large body of work whose common goal is to provide animators with tools facilitating the edition process. The common animation edition pipeline can be split in two phases: posing and interpolation control. During the first, animators manipulate the skeleton to define key poses at specified key frames. In the second, they manipulate the interpolation process which is used to fill the gaps between key-frames.

\paragraph*{Posing.}
In most posing techniques the skeleton is conceptualized as a set of kinematic chains \cite{magnenat-thalmannJointDependentLocalDeformations1988}. With forward kinematics (FK), the modification of a joint's position or rotation trickles down, modifying joints down the chain. The opposite technique, inverse kinematics (IK) \cite{wangCCDInverseKinematics, aristidouFABRIKFastIterative2011}, find a suitable parameterization of the chain given a target end-effector, allowing the user to pose the character much like a puppet. These two methods are at the core of most modern animation software and lead to precise results, but can be tedious to use from an artist's perspective. Other techniques and interfaces have then been studied to alleviate this problem.

Some describe alternative frameworks in which the character's pose is derived from a line drawn by the user, much like a paintbrush stroke \cite{guayLineActionIntuitive2013, choiSketchiMoSketchbasedMotion2016}. This method has also been extended to virtual reality, tracking the user's hand in 3 dimensions and interpreting their motion as strokes \cite{garciaSpatialMotionDoodles2019}. On the data-oriented side, Wu \etal \cite{wuNaturalCharacterPosing2011} use learned clustering techniques to extract from a motion database a pose which most closely match the user's input. Victor \etal \cite{victorLearningbasedPoseEdition2021} train deep neural networks to solve the IK problem, learning skeleton constraints from existing data to lift some of the burden of respecting them from the user. Finally, some work has been dedicated to designing physical devices to facilitate the posing process \cite{yoshizakiActuatedPhysicalPuppet2011, jacobsonTangibleModularInput2014}.

\paragraph*{Interpolations.} Once key poses have been set, different methods exist to control how the software will interpolate between them to produce motion. Animators usually provide the interpolation factor used for each joint's position and rotation values over the elapsed time between key frames by manipulating animation curves through control points \cite{catmullClassLocalInterpolating1974}.
In the same veins, optimization-based methods have been proposed to improve the curve edition process \cite{koyamaOptiMoOptimizationGuidedMotion2018, cicconeTangentspaceOptimizationInteractive2019}. In the family of data-oriented solutions, Chai \etal \cite{chaiConstraintbasedMotionOptimization2007} propose to learn a low-dimensional space of motion, and solve the same kind of optimization problems within it. Recently, Harvey \etal \cite{harveyRobustMotionInbetweening2020} trained deep neural networks to learn to produce inbetweening motion from key frames.

Creating high-quality, appealing motion is a complex task. Animating a character according to fit one's vision, while depicting the desired action and conveying the right emotion requires an advanced knowledge of anatomy and physics rules. All the previously mentioned work allow animators to edit animation, but they all focus on controlling the character's body at bone-level. The process, while facilitated, is still a complex one. In order to provide animators and the greater public access to fast an expressive animation tools, higher-level concepts and tools are needed.  

\subsection{Motion style manipulation and transfer}

Stemming from the need of methods to reuse existing animation, another body of work has taken interest on editing animation by manipulating the motion style. The notion of \emph{style} is most commonly used as opposed to the notion of \emph{content}. Given an animation sequence, the terms are used as a way to separate \emph{what} the character is doing (the content) from \emph{how} it is doing it (the style). For example, several animations sequence could represent a character walking in various ways: fast, slow, making shorter or largers strides, swinging its arms... In this case they all share the same \emph{content}, walking, but the various \emph{styles} set them apart.

Being able to generate stylized animation, and to modify the style of an existing one, is then a desirable goal. Such control would allow the user to easily experiment with different styles, and it would be possible to generate a wide array of variations from an existing sequence.

Early solutions to the style edition problem use hand-made labels of style and content to categorize existing motion, and interpolate between categories to produce new motion. Rose \etal \cite{roseVerbsAdverbsMultidimensional1998} use such a method, coupled with an interface using a notion of verbs and adverbs to parameterize the generated motion. Brand \etal \cite{brandStyleMachines2000} describe a learned state machine, in which motion sequences are organized by shared style characteristics. More recently, Rodriguez \etal \cite{rodriguezParameterizedAnimatedActivities2019} stray away from the usual style paradigm and propose to edit animation trough high level trajectories parameterization.

Some other methods leverage the work produced in related fields, such as dance theory, to categorize motion style. Durupinar \etal \cite{durupinarPERFORMPerceptualApproach2016} build upon Laban Movement Analysis \cite{labanMasteryMovement1971} to attempt to formulate a link between personality and body motion. Aristidou \etal \cite{aristidouEmotionControlUnstructured2017} map the Laban features to a system of emotions coordinates, which can be interpolated in to edit and existing animation style.

Drawing inspiration from the success achieved by style transfer methods on images, Holden \etal \cite{holdenDeepLearningFramework2016} train a deep convolutional neural network to extract "style" features from of an animation and apply them to another. In the same vein, other types of neural networks have been used, such as variational autoencoders \cite{duStylisticLocomotionModeling2019}, adversarial learning \cite{wangAdversarialLearningModeling2020} or generative flow \cite{wenAutoregressiveStylizedMotion2021}.

On the opposite end of the spectrum from the posing methods discussed above, these style edition approaches share the common drawback of being \emph{too} high-level. Because the notion of animation style is still loosely defined (and this shortcoming is discussed further in the next section), tools using styles as control parameters could be met with incomprehension on the user's end when reaching broader audiences.

\section{Problem formulation}

The previously defined usage of \emph{style} as a separation from an animation's \emph{content} is commonly accepted in the computer animation literature. The limits of what the term itself entails are however not clearly defined.

Some associate an animation's style to emotions experienced by the character, such as "joy", "anger" or "sadness" \cite{fouratiEmilyaEmotionalBody2014}. Some link it to existing motion analysis systems, such as Laban's \cite{labanMasteryMovement1971, durupinarPERFORMPerceptualApproach2016}, or to psychological concepts such as the arousal/valence scale \cite{ekmanHeadBodyCues1967, randhavaneIdentifyingEmotionsWalking2019}. Some others use arbitrary categories, such as "gorilla", "childish", "zombie", or "neutral" \cite{xiaRealtimeStyleTransfer2015}. 

\begin{figure}[h!]
    \centering
    \includegraphics[width=0.8\columnwidth]{figures/style_categories.pdf}
    \caption{Examples of walk animations in exaggerated styles from existing motion databases \cite{holdenLearningMotionManifolds2015, xiaRealtimeStyleTransfer2015}. (1) "zombie"; (2) "old man"; (3) "childish". Distinguishing each style with no context is not straight-forward.}
    \label{fig:exaggerated_styles}
\end{figure}

We argue that this categorization is too subjective to be considered as an expressive parameter to provide to users. Various factors can introduce bias in style categories, leading edition tools based on them to fail to meet the user's expectation. 

The bias lies in how the data used to calibrate the style categories is recorded. It is usually not captured in the wild, but rather played by actors \cite{xiaRealtimeStyleTransfer2015}. The source sequence are thus often overplayed, exaggerated representations of the actor's and director's vision of the categories (see Fig. \ref{fig:exaggerated_styles}). In the most grounded acquisition procedures, emotions states are elicited in a subject by exposing him to a pre-determined scenario. The bias is however not totally avoided, possibly induced by the design of the experiment \cite{mccambridgeSystematicReviewHawthorne2014, henrichWeirdestPeopleWorld2010}, or even by the divergent interpretations of a common emotion in different cultures \cite{elfenbeinUniversalityCulturalSpecificity2002}. 


The main goal of animation edition research is to provide tools to animators so that they can transform their mental representation of a character motion into tangible animation data. If low-level methods are fine-grained but tedious to manipulate, and if high-level ones are likely biased and take too much of the control out of the user's hands, finding a middle ground is an important open problem. Efficient tooling, allowing easy manipulation for the naïve user and controllable enough for the professional one, are yet to be developed. 

The parameterized edition paradigm, as seen in \cite{rodriguezParameterizedAnimatedActivities2019}, offer interesting perspective in working around the bias problem while still allowing higher-level control. Following this line of thought, this paper proposes an alternative solution, introducing a method to manipulate style from higher-level, but still objective, controls: pose metrics. 


\section{Method}

We propose a new character animation edition paradigm in which the animator manipulates intermediate-level parameters called pose metrics, leveraging neural networks to learn and automatically account for complex morphological constraints. We first introduce this new concept, then describe the neural networks pipeline we use in our experiments. We finally describe the method we use to edit whole animation sequences according to a user's input.

In the subsequent sections the term \emph{skeleton} is used to define the virtual armature of a character composed of a hierarchy of joints and bones \cite{magnenat-thalmannJointDependentLocalDeformations1988}. We call \emph{pose} the data vector describing the concatenated position and/or orientation of each joint in the skeleton at a single time frame.  An \emph{animation sequence} is then a sequence of key poses, which represent the character's motion.

In equations the notation is as follow: we denote $A$ an animation sequence containing $N$ frames, with $p = A_n$ the pose at frame $n$. In a skeleton composed of $J$ joints, the pose can be indexed to access a specific joint's data: $p_{head}$.

\subsection{Pose metrics}
 Being able to edit an animation sequence by manipulating higher-level parameters is a desirable capacity, but the literature is polarized between low level controls (operating on crude pose data such as bone position or orientation using forward and inverse kinematics) and high level ones, using \emph{style} labels relating to emotions or behavior (i.e. "angry", "childish", etc. )  \cite{wangAdversarialLearningModeling2020,duStylisticLocomotionModeling2019,abermanUnpairedMotionStyle2020}.
These style controllers lack control in the sense that they produce a stylized animation at once based on a generalized style definition, which users might not share.

As a compromise, filling the gap between these poles, we introduce \emph{pose metrics}: higher-level, objective, style agnostic values, that can be directly computed from a single pose and do not rely on any assumed universal human perceptive behavior.

The vision for these metrics is to be as flexible as possible, so as not to restrict the user. All characters are different, and the concept must make as little assumption as possible on the way they move. That way the user is responsible for designing his own metrics, mentally link them to his own definition of a particular style, and edit the animation through them.

For the sake of an example, imagine an artist editing an animation sequence of a character walking, expressing cold rage. In his mind, the character should be taking short, fast steps, his arms tense, stretched toward the floor. With previous style edition methods, he might be able to hit an "angry" button, maybe use a slider to determine how angry the result should be. Unfortunately, it might be that the system was calibrated with another definition of angry in mind: the character now walks faster, the arms bent and swinging, with the fists close to the torso. Using metrics would allow the user to circumvent this problem. Creating a few metrics such as the angle formed by the elbows, distance between feet, or between hands and the floor, and editing the animation through them, we avoid relying on assumed style characteristics.

The only requirement for a new metric is to be computable from a single pose, and to provide a function to do so. Given a function calculating such a user-provided metric, the proposed associated framework is extendable enough to accommodate it and edit animation sequences accordingly.

\begin{figure}[h!]
    \centering
    \includegraphics[width=0.8\columnwidth]{figures/example_metrics.pdf}
    \caption{Visual depiction of the three metrics used in this paper's examples.}
    \label{fig:metrics_example}
\end{figure}

\paragraph*{Experimental pose metrics.} As previously explained pose metrics are intended to be provided by the user. In order to demonstrate the application of our system, the following experiments use three sample metrics applicable to a human skeleton: \metric{spine\_flexion}, \metric{shoulders\_openness} and \metric{legs\_spread}.

All three represent the angle formed at the intersection of two vectors $\vec{u}$ and $\vec{v}$ obtained from the pose. Formally the angle at the intersection is computed following Eq. \ref{eq:vector_angle}.

\begin{equation}
    \label{eq:vector_angle}
    \theta(\vec{u}, \Vec{v}) = \arccos \frac{
    \Vec{u} \cdot \Vec{v}
    }
    {
        \lVert \Vec{u} \rVert \cdot \lVert \Vec{v} \rVert
    }
\end{equation}
The \metric{spine\_flexion} metric represents the angle between $\vec{y}$ the world "up" vector and the spine axis. It is computed as shown in eq. \ref{eq:spine_flexion}. It could be used to bend the character forward when in a hurry, or backward when relaxed.

\begin{equation}
    \label{eq:spine_flexion}
    SF(p) = \theta(p_{neck} - p_{pelvis}, \vec{y})
\end{equation}

Next the metric \metric{shoulders\_openness} (Eq. \ref{eq:shoulders_openness}) describes how open the character's torso/shoulders area is. Example usages might be to raise the character shoulders to denote anxiety or shyness, and to open up to denote a more relaxed or proud behavior.

\begin{equation}
    \label{eq:shoulders_openness}
    SO(p) = \theta(
        p_{spine1} - p_{rshoulder},
        p_{lshoulder} - p_{spine1}
    )
\end{equation}

Finally, \metric{legs\_spread} (Eq.\ref{eq:legs_spread}) denotes how close the character's knees are to each other. Possible usages include restricting walking strides, or tweaking whether the character appears in balance.

\begin{equation}
    \label{eq:legs_spread}
    LS(p) = \theta(
        p_{pelvis} - p_{rknee},
        p_{lknee} - p_{pelvis}
    )
\end{equation}

In this paper's equations, the value $m$ of a metric $M$ for a pose $p$ is denoted as the function $m = M(p)$.

\subsection{Learned metric pipeline}

This section introduces a pipeline through which an animation sequence can be edited using pose metrics. It is designed with modularity in mind, as we want users to be able to decide on which metric should be used at any time, as well as extending it with custom metrics if need be. We first describe the global layout of the pipeline, then each of its pieces separately.
We also explain how the pipeline can be extended by the user, and set up to satisfy any combination of metrics. Finally, we propose a procedure to edit whole animation clips, by taking advantage of our architecture to propagate changes made to a selected frame to the rest of the sequence.

\paragraph*{Pipeline layout. } 
Our pipeline (Fig. \ref{fig:pose_pipeline}) relies on several small neural networks. We opt for these networks because of their low memory footprint and fast run time. Using smaller independent networks also allows us to easily configure the pipeline by adding, removing or modifying modules.

The outer part of the pipeline is an encoder-decoder model pair whose purpose is to learn a latent pose space, in which a pose representation is more compact and easier to manipulate. As the decoder can only map latent codes to the real pose space, there is no risk of accidentally generating a broken pose when averaging and interpolating samples. The edition itself is done by the metrics network, which operates only on the latent space. An instance of the metric network is trained to modify a latent pose given a \emph{single} metric value. The reduced size of the network and the fact that we re-use the already trained encoder-decoder, mean that training times are fairly short. This in turn further facilitates the possibility for users to design their own metrics, train a network, and incorporate it in the pipeline. 

\begin{figure}[h]
    \centering
    \includegraphics[width=0.9\columnwidth]{figures/pipeline_pose_maths.pdf}
    \caption{Overview of the proposed pipeline with its pose metric module. The process modifies an input pose $p$ according to an arbitrary number of user-provided target metric values $\tilde{m}_{0...i}$. An encoder-decoder pair ($E$ and $D$) maps poses to and from a latent pose space, on which the other modules operate. Each metric is processed by a dedicated network $M_{0..i}$. Their resulting latent samples $\hat{z}_{0..i}$ are averaged, then mapped back to the pose space.}
    \label{fig:pose_pipeline}
\end{figure}

\paragraph*{Encoder-Decoder.} The encoder $E$ and decoder $D$ networks are trained together to map a pose $p$ to a latent representation $z$, as shown in Eq. \ref{eq:autoencoder}. In practice they are trained to minimize the squared reconstruction error between $p$ and its reconstructed version $\hat{p}$. Both networks are simple 1-layer perceptrons, using 512 units in the hidden layer and rectified linear unit (ReLU) activation functions. In our experiment, the latent size dimension is set to 64.

\begin{equation}
    \label{eq:autoencoder}
    \begin{split}
    z &= E(p) \\
    \hat{p} &= D(z) \\
    \mathcal{L_{\textrm{ED}}} &= \frac{1}{J}\sum_{j=0}^{J}{\big(p_j - \hat{p}_j \big)^2}
    \end{split}
\end{equation}

\paragraph*{Metric network(s)}. A metric network $N_m$ learns to produce a modified latent pose $\hat{z}_m$, taking as input a starting one $z$ concatenated with a target metric value $\targetnotation{m}$ (see Eq. \ref{eq:metric_network_output}).

\begin{equation}
    \label{eq:metric_network_output}
    \hat{z}_m = N_m \big(z \oplus \targetnotation{m}\big)
\end{equation}

To reflect this objective during training, we sample two poses from the same original animation sequence: an input $p = A_t$ and a target $\targetnotation{p} = A_{t+n}$. Sampling from a neighboring frame prevents the target pose from being too far from the starting one and ensures the network learns to \emph{edit} a pose rather than to generate an unrelated one. In our experiments, $n$ is sampled randomly for each iteration in $n \in [-10, 10]$. As we target an interactive edition context, aiming for smaller changes in metric is reasonable.
The input target metric is computed from $\targetnotation{p}$ and fed to the network along with $z = E(p)$. The resulting modified latent pose $\hat{z}$ is mapped back to the pose space using the decoder, i.e. $\hat{p} = D(\hat{z})$. Finally the networks are trained to minimize the mean squared error between the target pose and the modified one, as shown in the loss function in Eq. \ref{eq:metric_loss_fn}.

\begin{equation}
    \label{eq:metric_loss_fn}
    \mathcal{L} = \frac{1}{J} \sum_{j=0}^{J}{\big( \targetnotation{p_j} - \hat{p}_j \big)^2}
\end{equation}

Keeping with the idea of smaller networks we opt for a single layer perceptron with 126 hidden units and ReLU activation. The input layer's number of units is equal to the size of the auto-encoder's latent dimension plus one (to account for the metric value). The output is the same size as the latent dimension. We empirically find that this architecture suits our needs, larger/deeper networks yielding no perceptible value. If a users deemed a different one more suitable for one of his metrics, the only requirements would be on the size of the input and output layers.

\paragraph*{Data}. We use a pose dataset of about 1.5 million poses as described by Victor \etal \cite{victorLearningbasedPoseEdition2021}. The dataset is obtained by merging several pre-existing animation databases\cite{fouratiEmilyaEmotionalBody2014, carnegiemellonuniversityCMUGraphicsLab2003, holdenDeepLearningFramework2016}.
Each animation clip is retargeted to a common skeleton \cite{holdenLearningMotionManifolds2015}. The poses data is composed of the positions of each joint relative to the projection of the pelvis joint on the floor. When used to train the networks, the dataset is normalized by subtracting the mean and dividing by the standard deviation of each component value.

\paragraph*{Training parameters}. The encoder-decoder and metrics networks are trained separately, but using the same hyper-parameters: using the Adam optimizer \cite{kingmaAdamMethodStochastic2015} with a learning rate of $0.0001$, and batches of 1024 pose pairs until convergence, which takes around 15 minutes on an NVIDIA Quadro T1000.

\paragraph*{Pipeline modularity} 
In cases where it is desirable to edit multiple metrics at once, it is possible to combine the results of a set of metric networks. As the output of the network is a latent representation of a pose we can combine them. In \cite{victorLearningbasedPoseEdition2021}, the authors ran multiple networks sequentially. We instead suggest averaging multiple latent poses, so that we don't have to pick an order for the modules.

As explicited in Eq. \ref{eq:metrics_average}, the source pose $p$ is first mapped to the latent space, then each specialized metric network $M{0..i}$ produces modified latent result. These intermediary results are all averaged, and finally mapped back to pose space by the decoder.

\begin{equation}
    \label{eq:metrics_average}
    \hat{p} = D\Big(\frac{1}{n}\sum_{i=0}^{n}{M_i\big(E(p)\big)}\Big) 
\end{equation}

This method operating on single key-frames, can be used conjointly with other posing solutions, and integrated with interpolation methods, to offer as much control to the user as possible. Using a shared latent space also allow us to incorporate other modules from the literature into the pipeline. For example, the IK solver from \cite{victorLearningbasedPoseEdition2021} operates on a similar latent space, and, if trained on the pipeline's one, its output can be averaged with the metric network ones. 

\subsection{Animation edition}

The pose pipeline described above only operates on a single pose at once. In a real-world scenario however animators typically edit a specific key frame, expecting their changes to be gradually applied to the neighboring ones. To meet these expectations we propose a method to edit an entire animation sequence through a single set of target metrics. 

Our approach (Fig. \ref{fig:pipeline_anim}) resembles the traditional animation curve paradigm, using a user provided weight curve $W$ to control how much each key pose will be impacted by a modification. We once again leverage the good interpolation properties of the latent space. 

\begin{figure}[h!]
    \centering
    \includegraphics[width=0.9\columnwidth]{figures/pipeline_anim.pdf}
    \caption{Visual overview of the proposed method to echo modifications made to a key pose $A_n$ of an animation clip. The blend operation occurs between latent poses (source $z_n$ and modified by the metric module $\overline{z}_n$), and use a factor $W(n)$ sampled from the user-provided curve.}
    \label{fig:pipeline_anim}
\end{figure}

To edit an animation $A$, the user selects a key frame $A_n$ and provides an arbitrary number of target metrics values $\tilde{m}_{0..i}$ as well as a weight curve $W$. For each frame $A_t$ in the sequence, a latent representation $z_t$ is encoded. Each of them is then processed by the pose metric module, resulting in an intermediary latent pose $\overline{z}_t$. The final modified latent pose $\hat{z}_t$ is given by blending the between $z_t$ and $\overline{z}_t$ by the $W(t)$ factor (Eq. \ref{eq:interpolation}).

\begin{equation}
    \label{eq:interpolation}
    \hat{z}_t = \big(1 - W(t)\big) \cdot z_t + W(t) \cdot \overline{z}_t
\end{equation}

In our experiments $W$ is a hat function peaking at $1$ at the selected frame, and reaching $0$ at the clips extremities. This weight function is however an external parameter: experiments with a sinusoidal yield comparable results, and the curve could be edited by animators to fit their expectations, much like existing animation curves. We also note that each one of the clip's poses is processed independently from the others. The edition can thus happen in parallel, maintaining real time interactivity.

\section{Results}

This section presents visual animation edition results of the pipeline in different scenarios. More examples can be found in the accompanying video.

\subsection{Pose edition}

\begin{figure}[h!]
    \centering
    \includegraphics[width=0.9\columnwidth]{figures/metric_edition.pdf}
    \caption{Incremental modification of a pose by providing a target $spine\_flexion$ input. On each step, the user's input is a $0.1$ increase over the computed metric value.}
    \label{fig:spine_flexion_pose}
\end{figure}

In Fig. \ref{fig:spine_flexion_pose}, a single pose is modified by a user by providing gradually increasing target \metric{spine\_flexion} metric values. The results respect the desired changes as shown by the measured metric values below each pose. While it could be argued that changing the orientation angle of the pelvis bone would produce similar results, a closer look to the resulting poses illustrates the interesting properties of the latent pose space. At every iteration, the skeleton's arms are slightly raised, and its knees bent, so as to compensate the loss of balance induced by the flexion of the spine. 

\subsection{Modular pipeline}

\begin{figure}[h]
    \centering
    \includegraphics[width=0.6\columnwidth]{figures/multiple_metrics_and_ik.pdf}
    \caption{Sample results of the pipeline using multiple modules. In (1), \metric{shoulders\_openness} (so) and \metric{spine\_flexion} are used simultaneously. In (2) we incorporate the latent inverse kinematic solver from \cite{victorLearningbasedPoseEdition2021} into the pipeline, using it along \metric{spine\_flexion}.}
    \label{fig:multiple_metrics_results}
\end{figure}

Fig. \ref{fig:multiple_metrics_results} presents some results obtained by averaging the latent outputs from multiple modules. The first example show the result of modifying the \metric{spine\_flexion} and \metric{shoulders\_openness} metrics at the same time. Both modifications can be seen on the skeleton: its spine is straightened, and its shoulders lowered. The rest of the pose is also slightly edited to accommodate for those change: the hands are lowered, and knees bent a little further.

The second one shows the result of using the \metric{spine\_flexion} metric module along with the neural IK method from \cite{victorLearningbasedPoseEdition2021}. Averaging the latent outputs leads our method to find a compromise between each provided constraint. Here, the skeleton's back is straightened, and the IK targets for the hands are reached for.

\subsection{Animation edition}

\begin{figure}[b]
    \centering
    \includegraphics[width=0.9\columnwidth]{figures/anim_edition_results.pdf}
    \caption{Editing an animation clip according to the user input. The output is produced by the pipeline given a selected frame $A_n$, a target value for the \metric{legs\_spread} metric, and a weight curve. }
    \label{fig:animation_edition_result}
\end{figure}

Fig. \ref{fig:animation_edition_result} showcases the result of an animation $A$ being edited using the pipeline described earlier. The user selects a frame $A_n$, provides a target \metric{leg\_spread} metric value, and and interpolation factor curve, a hat function peaking at one on the $A_n$ and reaching down to 0 on both sides at $A_{n-3}$ and $A_{n+3}$. The remaining frames use a factor of 0.

Each frame pose is processed separately by the network, and the result is given by interpolating the latent representations of the input and output poses, using the frame-specific factor. 

As a result, the output animation $\hat{A}$ is modified, with the impact being most important on the selected frame and gradually lowering on each side. At frame $n$ the output pose is modified the most, and the reduced legs angle is very visible. At frames $n-2$ and $n+2$ this impact is barely visible, while further frames are not modified at all, as expected.

Interpolating between original and modified poses allow the whole sequence to keep its temporal coherence even though the pipeline processes one frame at a time, with no knowledge of the past and future frame context. We also take advantage of the properties of latent spaces: any latent interpolation result is mapped back to the real pose space, thus avoiding artifacts such as skeleton interpenetration.

\section{Conclusion}
In order to avoid the pitfalls of categorizing animation styles, we introduce the concept of pose metrics, values computed on a single pose that user can define themselves to fit their \emph{own} perception of styles. We propose a pipeline to edit an animation by manipulating these metrics, which uses a modular set of tiny neural networks, running in real time. A user can extend the pipeline by designing a custom metric and training an associated metric network in a short 15 minutes.

The main shortcoming of this approach is that it is limited to a single standardized humanoid skeleton, with which the networks are trained. This is a common problem with data-driven methods: in order to adapt to a new skeleton, the network would need to be retrained. This could be difficult if access to existing animation data for the new skeleton is limited, but recent progress in animation retargeting \cite{abermanSkeletonawareNetworksDeep2020} could help by allowing more accessible data augmentation. The modularity of metrics helps here as well, as different skeleton will require a new set of metrics.

Future work will focus on grounding the proposed pipeline: securing the process by automatically detecting overlapping metrics, and conducting user studies to evaluate the usability of the method. 



\bibliographystyle{ACM-Reference-Format}
