Two visually identical animated characters can respond differently to the same action command because their body dynamics differ. For example, a stiff blob and its bouncy twin reach different heights when both receive the jump command. Given only the first frame and the action command, a visual world model has no information to distinguish these twins, because their initial appearances are identical. We therefore propose an in-context world model that encodes clips of a character's other actions into a body representation, using a contrastive loss to separate look-alike characters. We introduce ToonTwins, a benchmark of 144 2D cartoon characters that run, jump, fall, turn and crouch. Its characters form look-alike groups of four that differ only in their dynamics profile, and we also evaluate the model on 32 animated animals from DeformingThings4D. Even with a body code from these clips, the latent pixel world model we tested recovered at most 25 percent of the twins' jump height difference. On new shapes, our model identified the correct twin in 85.9 percent of cases, compared with 76.7 percent for a transformer baseline that reads the same clips without a body summary, and in a controlled ablation the contrastive loss gave more than half of this gain. On the animated animals, it reduced the mean path prediction error by 8.5 percent against a model without body information.
Figures & tables
Figure 1: Look-alike stiff and bouncy blobs. (a) Under the same jump command, the bouncy twin rises higher. (b) Their fall and run clips show the same difference, and the dashed line marks the start of the run.
Figure 2: ToonTwins. Characters are shown in color for display, and all models receive the same frames in gray.
Figure 3: Animated animals from DeformingThings4D [ 10 ] .
Figure 4: Overview of the model. A clip encoder and a context transformer summarize the context clips, a query decoder predicts the path and a renderer draws the frames.
Figure 5: Input of the path model. (a) A gray frame. (b) Its silhouette with the nine measures, which are the box edges, the area, the centroid, the height and the width.
Model
Body information it receives
Parameters
No body
First frame and action command only
0.60 M
Fine-tune at test
No-body model fine-tuned for 50 steps on the context clips
0.60 M
Body code
Single code from the context clips
0.78 M
Body code + contrastive loss
Same, with the contrastive loss
0.78 M
Context attention
Query attends over the context clip tokens
1.40 M
Ours
Body token, query-free context encoder and contrastive loss
1.62 M
Table 1: Models compared.
Figure 6: Twin matching of the pixel world model on new shapes (turn excluded), over the rollout steps (left) and by dynamics profile (right), with 95% CIs over units.
Figure 7: Height of the four twins of one biped over one jump, for three intents. The top row shows the truth, and the bottom row shows the pixel world model, whose four curves overlap.
Twin matching (chance 0.25)
Jump gain
Swap
Model
New shapes
Unseen body plans
New shapes
New shapes
No body
0.250
0.250
0.00
–
Body code
0.675 [0.630, 0.727]
0.436 [0.385, 0.485]
0.86
0.098
Body code + contrastive
0.672 [0.621, 0.728]
0.389 [0.351, 0.424]
0.82
0.106
Context attention
0.767 [0.699, 0.829]
0.412 [0.357, 0.465]
0.90
0.070
Ours
0.859 [0.820, 0.897]
0.422 [0.375, 0.466]
0.96
0.044
Table 2: Path prediction on ToonTwins (means with 95% bootstrap CIs over units). The swap column gives twin matching when each twin receives the context of another twin in its set, so a low value means that the prediction follows the context.
Figure 8: Predicted height of the four twins of one biped over one jump. Without body information, all twins get the same path, while our model follows the true order and spread.
Figure 9: Twin matching against the number of context clips. The dashed line marks chance.
Figure 10: Twin matching when the context holds only one action type (rows), for each query action (columns). Turning carries no body information.
Figure 11: Twin matching on new shapes by body plan, query action and dynamics profile (8 context clips, chance 0.25).
New shapes
Unseen body plans
Animated animals
Model
Body token + query-free encoder
Contrastive sets
TM
Jump gain
TM
Jump gain
Reduction (%)
Identification
Context attention
–
–
0.770
0.91
0.420
0.64
5.2
0.206
Ours, contrastive loss off
✓
–
0.806
0.93
0.418
0.64
3.2
0.153
Ours
✓
disjoint clips
0.857
0.96
0.409
0.49
8.1
0.296
Ours, action-disjoint sets
✓
disjoint actions
0.838
0.94
0.375
0.38
10.5
0.309
Table 3: Controlled ablation with the same folds and seeds, from a separate rerun. TM is twin matching with 8 context clips (chance 0.25).
Figure 12: Predicted against true spread of the four twins’ peak heights for each twin set on new shapes. The dashed line marks perfect prediction.
Split
Model
Cos, same body
Cos, twin
Gap
Retrieval
Action probe ( ↓ )
Profile probe
New shapes
Silhouette features, no learning
–
–
–
0.329 [0.315, 0.343]
0.999 [0.998, 1.000]
0.506 [0.491, 0.524]
Ours, contrastive loss off
0.987
0.833
0.154 [0.136, 0.173]
0.792 [0.769, 0.820]
0.626 [0.592, 0.661]
0.651 [0.631, 0.668]
Ours
0.813
0.248
0.564 [0.536, 0.597]
0.873 [0.862, 0.887]
0.139 [0.129, 0.150]
0.799 [0.767, 0.837]
Ours, action-disjoint sets
0.791
0.250
0.541 [0.506, 0.579]
0.852 [0.829, 0.877]
0.127 [0.119, 0.135]
0.765 [0.722, 0.816]
Unseen body plans
Ours, contrastive loss off
0.959
0.834
0.126 [0.016, 0.314]
0.450 [0.304, 0.622]
0.545 [0.465, 0.656]
0.353 [0.317, 0.390]
Ours
0.214
0.103
0.110 [0.044, 0.173]
0.369 [0.291, 0.443]
0.104 [0.088, 0.122]
0.326 [0.260, 0.423]
Table 4: Invariance of the body summary for held-out characters (95% CIs over runs in brackets). The gap is the cosine for the same body minus the cosine for a twin, computed before rounding. Chance is 0.25 for twin retrieval and 0.10 for the action probe.
Figure 13: Body summaries of held-out characters (first two principal components). Without the contrastive loss, they lie on one curve, and with it, each character forms its own cluster.
Method
IoU
Sharpness
Twin matching
Jump gain
(1 = truth)
in images
in images
Copy first frame
0.502
0.97
0.250
0.00
Pixel world model
0.448
0.66
0.300
0.25
No body, path-guided
0.799
0.94
0.250
0.00
Context attention, path-guided
0.846
0.94
0.822
0.89
Ours, path-guided
0.861
0.94
0.904
0.95
Table 5: Rendered frames on new shapes, compared with the truth at 48×48 pixels.
Figure 14: Four look-alike twins at the peak of one jump, with lines at the true heights. The pixel model and the no-body renderer draw the same body for all four, while ours places each twin near its own height.
Figure 15: Pixel world model on the animated animals. The left panel shows how often the rollout is closer to the animal’s own future than to other animals’ futures (chance 0.159), and the right panel shows the silhouette IoU.
Figure 16: Pixel world model rollouts for a held-out bear performing a jump absent from its context. The model draws a blurred average body.
Figure 17: Error reduction against the no-body model on the animated animals, by query action and animal family. Blue cells are better than no body, and red cells are worse.
Figure 18: Predicted motion on held-out animals. The solid box is the true silhouette box, the dashed boxes are predictions from the same first frame, and the right column shows the rise of the centroid.
Figure 19: Twin matching when the whole body plan is held out (columns), with 8 context clips (chance 0.25).
Appendix figures & tables2 assets
Supplementary material from the paper’s appendix.
Appendix
Body plan
Jump
Bounce
Squash
Bob
Gait
Run speed
Crouch
Fall
Turn rate
Biped
28
0.05
0.5
1.5
0.80
3.0
0.45
1.4
1.4
Blob
40
0.35
1.6
6.0
0.60
2.2
0.70
1.3
0.8
Disjointed
30
0.20
0.5
2.0
0.85
3.3
0.50
1.0
1.2
Limbless
18
0.02
0.8
0.0
1.10
2.6
0.60
1.5
0.7
Multilimb
22
0.15
0.4
0.6
1.50
3.6
0.35
1.1
1.6
Quadruped
34
0.10
0.6
1.2
0.95
4.2
0.55
1.6
1.0
Appendix
Table 7: Default dynamics parameters of the six body plans.
Profile
Jump
Bounce
Squash
Bob
Gait
Run speed
Crouch
Fall
Stiff
0.78
0.35
0.35
0.55
0.88
0.92
0.80
1.15
Firm
0.92
0.75
0.75
0.85
0.96
0.97
0.93
1.05
Soft
1.08
1.50
1.45
1.30
1.04
1.00
1.08
0.95
Bouncy
1.22
2.30
2.00
1.75
1.12
1.03
1.20
0.86
Appendix
Table 8: Multipliers that each dynamics profile applies to the default parameters of a body plan.