this monster has a skull
A soft-bodied monster with a skull 100× stiffer than the rest of it, simulated live in your browser with a neural basis. It recreates Precise Gradient Discontinuities in Neural Fields for Subspace Physics by Mengfei Liu, Yue Chang, Zhecheng Wang, Peter Yichen Chen and Eitan Grinspun (SIGGRAPH Asia 2025).
loading the neural basis… · drag the monster with your mouse or finger
what you're looking at
The monster has no mesh. Its motion is a combination of ten basis functions φj(x) (the skinning eigenmodes of the body), each with a 2×3 affine coefficient zj:
u(x, z) = Σ_j z_j · φ_j(x) · [x; 1]That is 60 numbers in total. Every frame, a projected Newton solve finds the next z by minimising inertia plus elastic energy (Eq. 5 of the paper). The energy is stable neo-Hookean, integrated at 468 fixed sample points, with the skull counted 100× stiffer:
z⁺ = argmin ½‖z − ẑ‖²_M + h² ( Σ_q vol_q w(x_q) Ψ(F_q(z)) + gravity + contact + your drag )The φj come from a small neural network (5 layers of 128 sine units, about 56k parameters, 110 KB of float16). It takes the shape parameter α as an input, so one network covers every monster from squat (α = 0) to tall and big-eared (α = 1). When you move the slider, your browser runs the network again at the new α, in a background thread, and swaps the new basis in without stopping the simulation. That swap is the paper's Fig. 1 (“dancing through life”).
the problem: kinks
Where soft tissue meets stiff bone, the true eigenmodes are continuous but bend sharply. Across the interface the normal derivative has to jump by exactly the stiffness ratio (the jump condition, Eq. 7):
w_skull · ∂φ/∂n |inside = w_body · ∂φ/∂n |outsideA neural field is smooth everywhere, so it can't make a sharp bend at the boundary. It can only round it off. That makes the skull wobble along with the flesh.
the trick: lift the input
The network gets a third input coordinate next to x and y: H(x), the smoothly clamped distance to the skull boundary. H is computed in closed form from the boundary polyline and has no learned weights.
φ(x) = f_θ( x, H(x), α ), H(x) = ‖D(x)‖_SC = { D − D²/(2s) if D < s
{ s/2 otherwiseH has a kink exactly on the interface, so a perfectly smooth fθ evaluated at (x, H(x)) can have one too. The network only has to learn how much of the kink to use. Where the boundary sits comes from the geometry, not the weights. Move α and the boundary moves with it, and nothing needs retraining. Past the threshold s (here ⅛) H is flat, so points far from the skull never need it.
the modes, side by side
Two networks with the same architecture, trained with the same loss (the weighted Dirichlet energy of Eq. 6, Gram–Schmidt-orthonormalised) for the same number of steps. The only difference: the SIREN's third input is held at 0 instead of H. Both are evaluated live in your browser at the current α. At page scale the two look almost the same: both learn the right overall shape and nearly identical eigenvalues. The difference is in the last few hundredths of a unit at the skull boundary. In the zoomed plot the lifted field drops much more steeply. Measured as the ratio of normal derivatives just outside vs just inside the skull (exact answer 100×), the lifted network reaches roughly 20–35× and the SIREN about 2–3×. You can also switch the simulation above to “plain SIREN” and drag the monster by its skull.
how faithful is this?
- Same as the paper: the lifting function and smooth clamp (Eq. 4, s = ⅛); a 5-layer, 128-wide SIREN with positional encoding up to 2⁵; α-conditioning; the weighted Dirichlet loss with Gram–Schmidt orthonormalisation (Eq. 6); the skinning-eigenmode subspace and implicit time stepping (Eq. 5); a 100× stiffness ratio, as in the paper's snail and fox-to-bear examples.
- Different: it runs in 2D on one made-up shape family. The SIREN frequency is ω₀ = 10 (the paper doesn't give one). The inertia term uses the reduced mass matrix instead of the identity. The solver is projected Newton instead of gradient descent, so it runs at 60 fps. The elastic energy is stable neo-Hookean rather than the paper's St. Venant–Kirchhoff, and the line search refuses steps that would turn any sample point inside out: StVK has no inversion resistance (F = 0 is a stationary point), so a hard squash used to leave the monster permanently inverted. The raw network outputs are sorted into eigenmodes with a 10×10 Rayleigh–Ritz step, and mode 0 is pinned to exactly 1 so rigid motion is exact. The weights ship as float16.
- Results: the lift gives roughly a 10× sharper flux jump than the identical network without it, but after 10k training steps it still falls short of the exact 100× jump. The paper reports qualitatively sharp transitions (Figs. 5, 8, 9) and gives no numbers to compare against.
- Not covered: 3D, creases (Eq. 8), combined cuts and creases with winding numbers, the spatial hash, and shape optimisation.