Text2Sim: Agentic Physics-Based Simulation Generation with Distilled Expertise

Xiaoyu Xiong, Tsun-Hsuan Wang, Yi-Ling Qiao, Tao Du, Minchen Li

TL;DR

Text2Sim is a multi-agent pipeline that transforms simple text prompts into executable, high-fidelity physics simulations. By combining a hierarchical agent structure with "Debug Cards"—distilled expertise from top-tier graphics research—it automates the complex, labor-intensive process of authoring and debugging dynamic physical scenes.

What Problem Does This Paper Address?

Creating a physical simulation is a multi-dimensional headache. It requires coordinating 3D assets, spatial layouts, physical parameters (like friction and Young’s modulus), motion control, and rendering settings. Traditionally, this is a manual, iterative process where experts "tweak and pray."

While large language models (LLMs) are excellent at writing general code, they often lack "physical common sense." An LLM might generate code that runs without errors but produces a scene where objects pass through each other or explode due to unstable solver settings. The challenge is bridging the gap between high-level intent ("make a cloth fall on a table") and the low-level numerical stability required for a plausible simulation.

Methods

Text2Sim uses a hierarchical agentic architecture built on the Genesis simulation engine. The system is organized into three main roles:

  1. The Planner: The central coordinator that decomposes the text prompt into a global plan and manages the iteration loop.
  2. Specialized Writers: Four distinct agents—Scene, Body, Action, and Render—each own a specific part of the simulation code. This "separation of concerns" ensures that a bug in the lighting (Render) doesn't require rewriting the collision logic (Action).
  3. The Critic: An independent agent that reviews the simulation after execution. Crucially, it looks at both numerical logs (trajectories, contact events) and visual evidence (rendered frames) to diagnose failures.
Fig. 2. Text2Sim pipeline. The Planner receives a text prompt, accesses simulator documentation and Debug Cards (reusable simulation skills), and invokes the tools in the dashed box to produce simulation code and video. Four Writers author the Scene, Body, Action, and Render modules; the Critic evaluates executed cases; Mesh and Articulation agents provide assets; and harness tools execute the code. Solid arrows indicate control or artifact flow, and purple dashed arrows indicate on-demand retrieval. The antenna of the Planner indicates that it is responsible for sending commands, while the headphones of the subagents indicate that they are responsible for receiving commands. The two modules are colored green to indicate that, unlike the blue modules, they are not built on general-purpose LLMs.

The "secret sauce" of Text2Sim is the Debug Card library. The authors distilled expertise from 99 high-quality SIGGRAPH and SIGGRAPH Asia demonstrations into compact, human-readable cards. These cards link specific physical symptoms (e.g., "jittering contacts") to likely causes and proven repair strategies, providing the agents with simulation-specific guidance that general LLMs lack.

Fig. 3. Writer responsibilities in a projectile–brick wall example, shown before and after impact. Green links the Scene Writer to the ground and simulation settings; blue links the Body Writer to object geometry and physical properties; orange denotes the Action Writer’s launch, simulation, and logging; purple denotes the Render Writer’s camera and lighting. The two path-traced frames share a crop, with simulation times labeled in seconds.

Datasets

The authors evaluated Text2Sim using a benchmark of 42 held-out prompts spanning rigid bodies, articulated mechanisms, deformable solids, and cloth. To ensure true generalization, they enforced a "paper-level split": if a research paper was used to create a Debug Card, no prompts from that paper were allowed in the evaluation set.

The project also introduces a new dataset of 141 generated cases, each including the text prompt, rendered video, executable code, assets, and recorded physical states. This dataset is designed to help train future vision-language models (VLMs) that need to understand the underlying physics of a scene, not just the pixels.

Key Insights and Ideas

  • Physical Reasoning > Coding Ability: The paper shows that even the most advanced coding models (like GPT-4 or Claude 3.5) struggle with simulation because they don't understand the coupling between parameters. Text2Sim’s success comes from providing domain-specific experience via Debug Cards.
  • Multimodal Flexibility: Because the system is agentic, it can easily incorporate other inputs. The authors demonstrated "sketch-to-simulation," where a handwritten drawing defines the shapes of objects while the text defines their behavior.
  • The Importance of the Critic: A simulation can be "successful" in terms of code execution but a failure in terms of physics. By having a Critic that audits numerical records (like energy injection or interpenetration), the system catches subtle errors that a human might miss just by watching a video.

Key Results

Text2Sim significantly outperformed state-of-the-art baselines (including GPT-5.6-Sol, Claude-Opus-5, and Code2Worlds) across all metrics:

  • Physical Quality: Achieved a score of 95.32/100, beating the best baseline by over 6 points.
  • Visual Quality: Scored 70.23/100, a 10-point lead over the strongest baseline.
  • Human Preference: In blinded user studies, participants preferred Text2Sim results 61.41% of the time (with the anchor baseline fixed at 50%).
  • Ablation: Removing the Debug Cards led to a significant drop in performance, confirming that distilled expertise is vital for handling complex interactions like cloth and deformable bodies.
Fig. 1. Text2Sim generates physical simulations from text. (a) A chain-suspended sphere scatters rigid blocks. (b) A piston compresses and twists soft blocks inside a cylindrical cup. (c) Colorful cloth pieces tumble inside a rotating drum. The embedded sentences summarize the input prompts. The large views show interaction snapshots from simulations lasting 10, 10, and 12 s, respectively; upper-right insets show the initial frames.

Limitations and Future Work

The authors acknowledge two primary limitations:

  1. Simulator Bounds: Text2Sim is currently limited by the capabilities of the underlying Genesis engine. If the solver doesn't support a specific phenomenon (like complex fluids), the agents cannot generate it.
  2. Computational Cost: The iterative "generate-simulate-criticize" loop is resource-intensive. As scenes become more complex, the time and token cost for multiple agent calls will scale rapidly.

Future work involves expanding the physical scope to more complex materials and optimizing the pipeline to reduce the number of iterations needed for a successful "first-shot" generation.

Summary updated

BibTeX
@misc{xiong2026text,
  author = {Xiaoyu Xiong and Tsun-Hsuan Wang and Yi-Ling Qiao and Tao Du and Minchen Li},
  title = {{Text2Sim: Agentic Physics-Based Simulation Generation with Distilled Expertise}},
  year = {2026},
  eprint = {2609.36593},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2609.36593},
}
Figure