The nearest neighbor model. This model contains the PCA basis of the cloth vertex deltas and a small set of cloth for nearest neighbor search. Given a new pose, the pre-trained neural network first predicts the PCA coefficients of the vertex deltas. Then this model uses the predicted PCA coeffcients to find a nearest neighbor in the small cloth set. The total vertex delta is computed by vertex_delta = mean_delta + pca_basis * pca_coeff + nearest_neighbor_delta To prevent popping, a time filtering is applied on predicted vertex deltas. The vertex delta at time t is computed by vertex_delta(t) = decay_factor * vertex_delta(t-1) + (1 - decay_factor) * vertex_delta The cloth can be separated into several parts (e.g. shirt, pants...). The nearest neighbor search is carried out separately for each part. The pca basis and the nearest neighbor data are compressed into morph targets.