Skip to content

NovaPhy

A C++20/Python 3D physics engine for embodied intelligence.

Documentation last updated: 2026-05-28

NovaPhy is designed for robotics, reinforcement learning, and sim-to-real transfer. It provides a unified simulation framework with multiple solver backends, all accessible through a clean Python API.

Key Features

  • Rigid Body Dynamics

    Sequential Impulse solver (PGS) with warm starting, Coulomb friction, and Baumgarte stabilization.

  • Articulated Bodies

    Featherstone algorithms — FK, RNEA inverse dynamics, CRBA mass matrix, Cholesky forward dynamics.

  • Fluid Simulation

    Position Based Fluids (PBF) with SPH kernels, spatial hash grid, and Akinci rigid-fluid coupling.

  • IPC Contact

    GPU-accelerated Incremental Potential Contact via libuipc with guaranteed penetration-free contact.

  • VBD / AVBD

    Vertex Block Descent with primal-dual contacts, joints, and springs (SIGGRAPH 2025).

  • Python API

    Full pybind11 bindings with solver-primary simulation, scene import / export, sensors, actuators, and Polyscope visualization. Installable from source via scikit-build-core.

Quick Example

import numpy as np
import novaphy

builder = novaphy.ModelBuilder()
builder.add_ground_plane(y=0.0)

body = novaphy.RigidBody.from_box(1.0, np.array([0.5, 0.5, 0.5]))
idx = builder.add_body(body, novaphy.Transform.from_translation(np.array([0, 5, 0])))
builder.add_shape(novaphy.CollisionShape.make_box(np.array([0.5, 0.5, 0.5]), idx))

model    = builder.finalize()
solver   = novaphy.solvers.SolverSemiImplicit(model, novaphy.solvers.SolverSemiImplicit.Config())
state    = model.state()
control  = model.control()
collision_pipeline = novaphy.CollisionPipeline(model)
contacts = collision_pipeline.contacts()

for _ in range(1000):
    collision_pipeline.collide(state, contacts)
    # Newton-aligned step contract:
    #   solver.step(state_in, state_out, control, contacts, dt)
    solver.step(state, state, control, contacts, 1 / 120)

Solvers

All solvers share the Newton-aligned SolverBase.step(state_in, state_out, control, contacts, dt) contract:

Solver Description Status
SolverSemiImplicit Free-body PGS (Sequential Impulse) Stable
SolverFeatherstone Articulated body (FK → RNEA → CRBA → Cholesky) Stable
SolverXPBD XPBD maximal-coordinate constraints Stable
SolverPBF Position Based Fluids + Akinci coupling Stable
SolverSPH SPH fluids (CPU + optional CUDA) Stable
SolverVBD AVBD primal-dual (CPU / optional CUDA) Stable
SolverIPC IPC via external libuipc submodule (NVIDIA/CoreX GPU paths) Optional

Getting Started

Installation Quick Start