NeuPhysics: Editable Neural Geometry and Physics from Monocular Videos
Abstract
We present a method for learning 3D geometry and physics parameters of a dynamic scene from only a monocular RGB video input.
To decouple the learning of underlying scene geometry from dynamic motion, we represent the scene as a time-invariant signed distance function (SDF) which serves as a reference frame, along with a time-conditioned deformation field.
We further bridge this neural geometry representation with a differentiable physics simulator by designing a twoway conversion between the neural field and its corresponding hexahedral mesh, enabling us to estimate physics parameters from the source video by minimizing a cycle consistency loss.
Our method also allows a user to interactively edit 3D objects from the source video by modifying the recovered hexahedral mesh, and propagating the operation back to the neural field representation.
Experiments show that our method achieves superior mesh and video reconstruction of dynamic scenes compared to competing Neural Field approaches, and we provide extensive examples which demonstrate its ability to extract useful 3D representations from videos captured with consumer-grade cameras.
Introduction
Monocular RGB videos are ubiquitous today, and computers’ ability to understand spatial and physical properties embedded in their contents is essential for many applications.
Can you imagine one day being able to build a fully-interactive digital twin of your surrounding world using just a smartphone?
You could capture a moving, fully 3D portrait of yourself (Sec. 4.1), estimate the physical material parameters of objects and interact with them virtually (Sec. 4.3), playback existing recordings from new angles (Sec. 4.2), or even edit your favorite cartoon videos (Sec. 4.4).
In this paper, we design a system that makes progress toward realizing all of these things.
Taking a single RGB video as input, our method estimates the geometry and dynamics parameters of the scene, parameterized by neural fields [37] and enables subsequent editing and physically-based simulation.
While humans can easily infer 3D shapes and physical properties of their environment even from a single eye, these tasks remain challenging for computer algorithms.
Geometry reconstruction from a single view is an intrinsically under-constrained problem: there is usually more than one 3D structure that could result in a given 2D projection of a scene.
Another key challenge lies in choosing a suitable representation to model the complex geometry of the real world.
Explicit representations like surface mesh [4, 38] are widely used in computer graphics, but they suffer from limited resolution and fixed topology. Implicit representations such as signed distance functions (SDFs) describe complex geometric structure more elegantly, but are not directly suitable for reasoning about dynamics properties. Estimating dynamics parameters is yet more challenging, since it is contingent upon correctly estimating geometry and its variation over time. In this paper, we design an end-to-end differentiable rendering and simulation pipeline that can directly learn the geometry and dynamics from a monocular video.
By assuming the existence of a one-to-one dense mapping between temporal frames in 3D space, our method decouples the geometry estimation task into two complementary parts: a static reference frame, and a mapping function that encodes motion.
The static reference frame consists of three neural fields: Appearance, Rigidity, and an SDF for geometry.
Given a 3D spatial coordinate as input, these fields respectively output its RGB color, rigidity mask, and signed distance to the nearest surface, in the reference frame.
Time-variant motion is encoded in a separate Motion field, which takes as input a 3D spatial coordinate (sampled along a ray), plus a learned latent code denoting a particular discrete time step, and outputs the 3D displacement from the sampled coordinate back to its corresponding reference frame coordinate.
We utilize the density function from NeuS [61] for rendering, and the Rigidity mask from Non-Rigid
NeRF [57] to regularize the motion and obtain foreground/background separation.
A convenient property that emerges from factorizing the scene into static geometry + dynamic motion fields is that by querying the motion field, we can establish a point-wise correspondence across frames, which we leverage to infer dynamics properties of the scene.
Specifically, physics parameters are optimized by minimizing the difference between results from the differentiable simulator [12] and motion field.
Upon learning reasonable parameters, the differentiable simulator can be used for physically-based animation and editing of the scene.
Experiments show that our method outperforms competing approaches in surface reconstruction, video reconstruction, and novel view synthesis tasks, both qualitatively and quantitatively.
Multiple examples also demonstrate our full pipeline’s physically-based scene understanding and interactive scene-editing capabilities.
Our code and data are available here: https://sites.google.com/view/neuphysics
In summary, the key contributions of this work are as follows:
• We present a framework for estimating and editing the geometry, appearance, and physics parameters directly from a single monocular video (Figure 3).
• By decoupling the learning of static SDF geometry and dynamic motion, our method effectively regularizes this under-constrained problem and enables reconstruction of highquality dynamic surface mesh sequences from monocular videos (Figure 4).
• By connecting the neural-fields-based geometry reconstruction to a differentiable physics engine, this approach eliminates the need for manual construction of intermediate 3D models, and avoids poor initialization for the differentiable simulator, empowering users to estimate the modeling and physics parameters from scratch (Figure 6).
• We design a two-way conversion (Figure 2& 3) between the explicit hexahedral mesh and implicit neural fields in our end-to-end modeling, simulation and rendering pipeline, enabling users to (1) extract high-quality explicit meshes from the implicit fields, and (2) interact with the implicit 3D field (e
g. add, delete, move, deform, and simulate) by directly manipulating its explicit mesh counterpart.
Related Work
Differentiable volume rendering with implicit neural representations has recently been used to synthesize novel views, estimate geometry and appearance from images and videos.
Neural Radiance Fields (NeRF) [37], and following works [9, 53, 2, 68] have achieved photorealistic rendering results even on complex scenes.
The coordinate-based multi-layer perceptron (MLP) representation equips the scene with high resolution [74], can be effectively regularized [73], and is memory-efficient.
Compared with differentiable surface rendering [41, 42], volume rendering can backpropagate gradients through the entire space, which leads to better optimization of complex geometry that contains topological changes, and mitigates getting stuck in local minima.
The original density field from NeRF cannot directly reconstruct high-quality surface meshes, so neural SDF fields [61, 70, 44, 43, 67] have been proposed for multi-view geometry reconstruction.
Compared to other discrete representations like meshes [60, 25, 34], point clouds [14, 33] and voxels [6, 65], SDF fields have higher resolution, and do not require pixel-level segmentation [40, 69, 26] for reconstruction tasks.
Current approaches that employ neural SDF fields do not converge to accurate geometry when faced with dynamic scenes, while our method does so from a single video, which we show in figure 4.
Recent work has extended NeRF to videos of dynamic scenes [46, 1, 72], but they primarily focus on 2D image synthesis, not reconstructing 3D geometry.
These works either directly condition the neural fields on time [13, 16, 63] or they learn a canonical field separately from time-dependent motion [45, 47, 57, 5].
We choose the latter strategy because it better constrains the learning problem [Figure] based on a reasonable inductive bias, and importantly, it provides us with point-wise correspondence between time steps that is useful for dynamics estimation. By representing geometry with a neural
SDF field, and applying strong geometric priors, we can reconstruct dynamic 3D geometry better than existing dynamic extensions of NeRF, while even improving image reconstruction as shown in
Section 4.1.
Differentiable simulators enable physics priors to better fit into data-driven approaches, and have therefore increasingly been applied to robotics and computer graphics tasks [54, 11, 21, 30, 55, 66].
These physically-based simulation methods have been developed for dynamical systems with different properties, including rigid bodies [7, 48, 8, 15, 36], soft bodies [24, 23, 49, 17, 12, 29, 28, 20], articulated bodies [19, 62, 50], cloth [31, 32], and fluids [58, 59, 22, 56].
Methods
Given a monocular video consisting of N RGB image frames { I i } Ni =1 , our approach estimates the 3D geometry within the camera’s field of view, point-wise correspondence of the dynamic 3D scene across time, and static/dynamic segmentation.
By integrating the differentiable physics module, we can learn physics parameters from the dynamic motion sequence, which we leverage for video editing and forecasting.
Figure 1 shows an overview of our paper.
3.1 Rendering Pipeline
SDF and color networks.
Similar to recent Neural Fields methods [37], we parameterize the geometry and appearance of the scene using coordinated-based Multi Layer Perceptrons (MLPs), which can render 2D images using the volume rendering scheme proposed in NeuS [61].
Geometry is represented by an SDF network s θ SDF ( p ) : R 3 → R that maps a spatial coordinate p ∈ R 3 to its signed distance to the nearest surface.
Appearance is represented by another MLP c θ color ( p ) : R 3 → Rthat describes the RGB value of each spatial point.
During rendering, the points along a ray cast from a given pixel can be written as { p ( t ) =
o
+ t v | t ≥ 0 } , where o is the camera center, v is the unit direction of the ray, and t is distance from the camera center.
The pixel’s color is then calculated by integrating along the ray:
[Equation]
where w ( · ) [61] is a weight function describing the contribution of each point’s color based on its
SDF value.
More details can be found in the Appendix.
Motion network.
However, the above framework is only designed to handle multi-view images of a static scene, which motivates another component to accommodate temporal information.
Instead of directly conditioning the existing networks upon time, we choose to decouple the dynamic and static scene components.
Therefore, the SDF and color networks are defined on a static reference frame, while a motion network b θ motion ( l i , p ) : R d l × R 3 → R 3 estimates the offset field [57] for each time step, where l i ∈ R
d l is a learned latent feature encoding temporal information about the i -th frame I i .
The motion network bends each query ray { p ( t ) } to { p ′ ( t )
= p ( t ) + b ( l i , p ( t )) } , which is then queried on the reference frame for SDF and color values.
Rigidity network.
Since we want to segment and simulate dynamic objects within the scene downstream, we apply a rigidity network [57] r θ rigidity ( p ) : R 3 → R to distinguish dynamic foreground from static background.
The mask r ( p ) ∈ [0 , 1] defined on the reference frame indicates the likelihood that a point belongs to the swept volume of moving elements in the scene.
The offset value becomes b θ rigidity θ motion ( l i , p ( t ))
=
r θ rigidity ( p ) · b θ motion ( l i , p ( t )) .
This formulation pushes dynamic regions toward larger r ( · ) values during training, while driving static areas toward zero.
3.2 Simulation Pipeline
Geometry reconstruction.
Given the signed distance field s ( · ) and rigidity mask r ( · ) , we can reconstruct the geometry of the dynamic and static parts of the scene.
For example, the foreground in the i -th frame is contained within the swept volume of moving objects described by:
[Equation]
where k sdf and k rigidity are constant thresholds for the SDF and rigidity values, respectively.
This formulation is amenable to conversion into an explicit mesh representation.
For rendering purposes, a surface mesh could be obtained using the marching cubes algorithm
Alternatively, we represent the dynamic elements as a volume mesh .
We sample over a discrete 3D grid to find vertices within volume A i , and if a grid point p satisfies Equation 2, we add that voxel to a hexahedral volume mesh m i .
We choose hexahedral rather than tetrahedral volume mesh due to its simplicity and regular structure, and because hexahedral mesh can be simulated by DiffPD [12], a differentiable FEM simulator.
Figure 2 visualizes the conversion between the implicit and explicit representation. Triangle surface mesh and tetrahedral volume meshes could be explored in future work.
Physics Engine.
From the input video of a dynamic scene, we can extract a mesh sequence { m i } Ni = with consecutive motion.
An individual mesh model m i is described by its vertices and hexahedral elements { Q i ∈ R n v × 3 , E i ∈ N n e × 8 } , where the rows of Q i are the 3D coordinates of n v vertices, and each row in E i records the indices of eight vertices that form a hexahedron.
We focus on modeling dynamic objects as soft bodies in this work. Compared to rigid bodies, soft bodies offer more expressiveness to model a wide range of deformable objects that that are important in applications like physically-based mixed reality and digital twins.
As our physics engine, we use Projective Dynamics [3] implemented by DiffPD [12].
The governing equation can be written as
[Equation]
where M is the mass matrix, Q i is the vertex locations at frame i , h is the time step, ˙
Q i is the velocity,
E is the potential energy due to deformation, θ physics are the physics parameters, and f ext are the external forces.
Note that the gradient of the potential energy ∇ E can be interpreted as the internal forces within the soft materials.
This system uses implicit time integration for increased numerical stability, thus ∇ E is defined on the frame i + 1 .
Objects are modeled by homogeneous co-rotated materials, where the material parameters θ physics include Young’s modulus and Poisson’s ratio.
A detailed formulation of the elastic energy E can be found in the supplementary materials of [12].
System identification can be valuable for constructing faithful digital twins, producing plausible animations, and control of dynamical systems, but estimating states Q and ˙ Q , and parameters θ physics and f ext from only a monocular video is challenging due to the high-dimensionality and nonlinearity of the system.
Recent progress in differentiable physics tackles this challenge by making the entire simulation differentiable.
Gradients ∂ L ∂ Q i , ∂ L ∂ ˙ Q i , ∂ L ∂θ physics , and ∂ L ∂ f ext , where L is a user-defined scalar loss function, are all available, and allow us to estimate the parameters using a gradient-based optimizer like Adam [27]. [Figure]
Parameter Estimation.
Running one simulation step forward in time from the i -th frame gives us an updated model at frame i +1 , dependent on parameters θ physics : m ′ i
+1 ( θ physics )
=
sim ( θ physics , m i , i → i + 1) .
By simulating the reconstructed meshes in the differentiable physics engine sim ( θ physics , · ) and comparing with the ground truth reconstruction results as a supervision signal, we optimize the physics parameters θ physics using gradient-based methods.
One idea for a suitable loss function is to use a metric like Chamfer Distance distance ( m i +1 , m ′
i +1 ( θ physics ))
between the extracted and simulated mesh m i +1 and m
′ i +1 ( θ physics ) , searching for the θ physics that minimizes the distance.
However, this strategy requires sampling and mesh reconstruction for every time step, which is computationally expensive.
An ablation study and profiling numbers can be found in Figure 10.
Additionally, the reconstructed mesh might vary significantly across time steps, thus cannot guarantee point-wise correspondence, making the dynamics discontinuous and non-differentiable w.r.t.
the networks.
To save sampling time and make the gradient well-defined, we design a cycle-consistency loss to compute the distance between the simulation results and neural fields.
Starting from an arbitrary mesh m i sampled at the i -th frame, we run the differentiable simulation for j steps and get m ′
i + j ( θ physics ) =
sim ( θ physics , m i , i → i + j ) .
When m ′ i + j ( θ physics ) is deformed back to the reference frame using the learned motion field, the result should correspond to the original shape m i .
Since m ′ i + j ( θ physics ) and m i share a common topology, an exact point-wise correspondence exists, and we can directly subtract their point clouds to obtain their distance:
[Equation]
where b ( l i , m i ) is the motion field at frame i that maps mesh m i back to the reference frame.
L physics is differentiable w.r.t.
the motion network, rigidity network, and physics parameters.
Importantly, independent of the simulation duration, we only need to sample m i once, and it can be used as a reference point to compare all other frames.
Scene Editing.
The simulator in our pipeline imposes a strong physics prior for forecasting motion and modifying dynamics.
Figure 2 shows how we edit the signed distance and color fields through the hexahedral mesh.
Based on hexahedral mesh m i extracted from the i -th frame, we can simulate it to get a modified state m
i +1 .
In order to render the modified scene, we add an additional ‘bending’ layer b edit ( m ′ i , · ) on top of the primary motion field b ( l i , · ) .
When querying a ray point p ′ to render the modified scene, we first check if the point is displaced by our editing operation, i.e. if it is located within the hexahedral mesh m ′ i .
The inside-outside-test would be trivial if all hexahedra in m ′
i remained in a regular grid, however, they may have deformed during simulation.
Thus, we split each hexahedron into five tetrahedra – a query point p ′ is inside the hexahedron if and only if it is inside one of the tetrahedra. Following [71], we decide whether p ′ is inside a tetrahedron by its barycentric coordinates. For a tetrahedron consisting of four vertices { p ′ i = ( x ′ i , y ′
{+i , z ′ i ) ⊤ } 
+}
i =1 , the barycentric coordinates { c i } 4 i =1 of p ′ = ( x ′ , y ′ , z ′ )
⊤ can be computed as c i =
Det i /Det 0 , where:
[Equation]
[Equation]
and Det i is obtained by substituting the i -th row of Det 0 with ( x ′ , y ′ , z ′ , 1) .
p ′ is inside or on the surface of this tetrahedron if and only if 0 ≤ c i ≤ 1 holds for i
= 1 , 2 , 3 , 4 .
To determine tetrahedra to check for a given point, we use k-nearest neighbors Q ′ p ′ =
KNN ( m ′ i , p ′ ) to locate mesh vertices
Q ′ p ′
nearest to query point p , and select tetrahedra that contain those vertices.
𝜃 𝑚𝑜𝑡𝑖𝑜𝑛
MotionField (𝑡 1 ) 𝜃 𝑟𝑖𝑔𝑖𝑑𝑖𝑡𝑦
Rigidity Field 𝜃 𝑃ℎ𝑦𝑠𝑖𝑐𝑠
Diff.
Sim.
Object (𝑡 1 )
Canonical Object
Object (𝑡 2 ) 𝜃 𝑃ℎ𝑦𝑠𝑖𝑐𝑠
Diff.
Sim.
Object (𝑡 3 ) 𝜃 𝑚𝑜𝑡𝑖𝑜𝑛
MotionField (𝑡 2 ) 𝜃 𝑚𝑜𝑡𝑖𝑜𝑛
MotionField (𝑡 3 )
Canonical Object
CanonicalObject 𝐿 𝑝ℎ𝑦𝑠𝑖𝑐𝑠
Hex Mesh Reconstruction
WarpBack WarpBack
WarpBack
Cycle Consistency
Cycle Consistency 𝜃 𝑐𝑜𝑙𝑜𝑟
ColorField 𝜃 𝑆𝐷𝐹
SDFField 𝐿 𝑅𝑒𝑛𝑑𝑒𝑟𝑖𝑛𝑔
VolumeRendering
Non-Differentiable Operators
Trainable Parameters
Differentiable Operators
Loss Functions
[-i , z ′ i ) ⊤ } 
-]
If p ′ does belong to a tetrahedron, then it is displaced along with the mesh.
Assuming the modification can be linearly interpolated inside a tetrahedron, the original coordinate p in the i -th frame becomes the weighted sum p = (cid:80) {+
+}
i =1 c i p i , where p is the reference coordinate corresponding to p ′
i (before editing).
To account for the area that was once occupied by m i but is now empty after editing: we simply assign those points a large positive SDF value such that they are effectively transparent during volume rendering and do not influence 3D reconstruction.
3.3 Training and Losses
With video as the main supervision signal used to train our system, we wish to minimize the distance between rendered and the ground truth images L color =
(cid:13)(cid:13)(cid:13)
I i − ˆ
I i (cid:13)(cid:13)(cid:13) 1 .
We include additional terms to regularize training.
First, an important property of an SDF is its unit norm.
Eikonal term [18], L Eikonal = (cid:80) i,k ( ∥ p i,k ∥ 2 − 1) 2 is therefore added to the loss.
We also want to constrain the motion of our scene (i.e. to be locally rigid, incompressible, and contain mostly static ragions), so we include an offset loss L offset = (cid:80) i,k ∥ b ( l i , p i,k ) ∥ 2 + r ( p i,k ) and divergence loss [57]
L divergence =
(cid:80)
i,k ∥ div ( b ( l i , p i,k ))
∥ 2 .
Finally, we use the physics loss L physics when we train for physics parameters.
The total loss function is:
[Equation]
By default, we set w Eik = 0 .
1 , w off = 50 . 0 , and w div = 2 . [-
 and it might vary-]0 , though these weights may be further tuned depending on the scene.
Figure 3 demonstrates the data and flow of gradients during training.
In our proposed cycle-consistency physics loss, the rendering and simulation modules are connected by the rigidity and motion networks.
Instead of jointly training all the parameters together, we adopt a sequential training strategy where the rendering networks are first trained to optimize L total for 300,000 epochs, and the physics parameters are then trained to optimize L physics for 100 epochs. The physics module is trained independently after the geometry networks converge because the differentiable simulation is much more expensive than querying of MLPs. An ablation study for the efficiency of our training strategy is conducted in Section 4.5. In future work it would be interesting to try a faster simulation engine which could be incorporated as a physics prior during training of the rendering networks.
A full training cycle typically takes around 18 hours on an NVIDIA A GPU. For the training data (used with consent), we note that the background must contain sufficient detail, or the Structure from Motion implementation by COLMAP [51, 52] could fail.  Experiments 4.1 Dynamic Geometry Reconstruction
We visualize mesh reconstruction quality of dynamic scenes in Figure 4.
Table 1 shows quantitative results.
Our method frequently outperforms competitive approaches.
Additional geometry reconstruction comparisons can be found in Appendix E.
Method
Sitting
Standing
Basketball
Hand
LPIPS ↓
SSIM ↑
PSNR ↑
LPIPS ↓
SSIM ↑
PSNR ↑
LPIPS ↓
SSIM ↑
PSNR ↑
LPIPS ↓
SSIM ↑
PSNR ↑
D-NeRF 0.
34.146 NeuS 0.
34.485 NRNeRF 0.
33.999 Ours 0.
[Figure]
4.2 Novel View Synthesis
We simulate four cases of deformable objects moving in a room.
We render each scene with two different camera trajectories, so that one path may be used for training, while the other is used as a ground truth to evaluate novel view synthesis.
Quantitative results in Table 2 show that our method achieves the best synthesis quality in all metrics.
Datasets and results are shown in Figure 5.
(a) and (b) are frames from the training videos.
(c) is taken at the same time step as (b), but it is a novel view from the test path.
Notice that our method successfully synthesizes the dynamic scene from a novel view, while other methods struggle to reconstruct geometry and texture accurately.
4.3 Parameter Estimation
In these experiments, we first use our network to reconstruct the dynamic scene, then apply the embedded differentiable simulator to estimate physical parameters.
Finally, we edit the physical parameters to generate novel video frames.
More visual results can be found in the supplementary video.
Figure 6 shows the initial frame of a bouncing ball sequence, where the ball is released from a height and collides with the ground.
The ball is modeled by co-rotated material.
Using DiffPD [12], we estimate both Young’s modulus and vertical acceleration in two separate optimization tasks.
The physics loss is minimized for 100 epochs (as described in Section 3.2) using Adam [27] optimizer with a learning rate of 0.01.
We initialize Young’s modulus to 2 × 10 5 Pa and acceleration to 0 m/s 2 , and by the end of optimization, have estimated Young’s modulus at 2 .
96 × 10 6 Pa and acceleration at 3 .
78 m/s 2 .
Having identified accurate physics parameters, we may choose to modify some of them from their true values, and generate videos that contain modified physical properties from the original on which they are based.
For example, the original ball has no horizontal speed, so we add 0 .
3 m/s left and right initial velocities in Figure 6 (b) and (c), respectively.
We also decrease the Young’s modulus in Figure 6 (d), (e), and (f) from 2 × 10 7 Pa to 2 × 10 5 Pa , where the deformation is getting more significant.
[Table] NRNeRF 0. [Table] [Figure]
in Table 2, our method generates images from novel views with higher quality than previous methods.
[Figure]
In this section, we demonstrate how our hybrid representation provides a flexible interface for users to directly modify the geometry on the 3D hexahedral mesh and volume render the results.
Region of Interest.
First, we select a region of interest that we wish to edit.
Our system naturally provides the scene rigidity mask and SDF values, so a foreground area
A i at the i -th frame can be computed as Equation 2.
If users require a more precisely defined region of interest, a custom bounding box or even more complex hexahedra bounding volume A ′ can be provided.
A hexahedra mesh m can be reconstructed from the final region of interest, A ′ ∩ A i ,.
Delete.
Figure 7 (a) and (b) are two distinct time steps from a given input video.
In one, a hand flexes and deforms, and in the second, an elastic ball bounces.
First, we delete the foreground from
View 1 by simply setting the SDF value to a positive number (e.g. 1.0) for the query points inside the hexahedral mesh m .
Since we assume a bell-shaped density distribution centered at 0 [61], an area with large SDF value is less likely to be sampled, and therefore appears transparent.
After removing the foreground from View 1, even though some parts of the background were occluded in the original, the other views of the scene provide sufficient textural/structural information to complete the missing background.
Since editing takes place entirely in 3D space, the resulting 2D images feel sharp and physically grounded, as shown in (c). [Figure]
Appearance.
We can also modify the output of the color network to change the appearance of a specific region.
For example, we might like to emphasize the moving foreground of a video by desaturating the background.
This is easily done by changing the original color [ r, g, b ] =
c θ c ( p ) to be [ r + g + b, r + g + b, r + g + b] for all the query points outside m .
Results are shown in Figure 7 (d).
Duplicate.
Translation and scaling are basic operations in graphic design software.
With our pipeline, users are able to copy, move, and scale the hexahedral mesh m , creating a new version m ′ .
During volume rendering, the SDF and color values of the points p ′ inside m ′ are set equal to their counterparts p in m .
In Figure 7 (d), we duplicate an existing object and modify its size and position.
4.5 Ablation Study
[Figure]
In this section, we conduct several ablation studies using the bouncing ball example to justify our network design choices and training strategies
Sequential Vs.
Joint Optimization.
Our method learns the scene sequentially by first optimizing the rendering networks, followed by the physics parameters.
A seemingly more concise strategy might be to jointly train all parameters from scratch.
Unfortunately, the joint training strategy is impractical for two reasons: (1) the table in Figure 8 indicates that the physics module converges rapidly thanks to the effectiveness of the differentiable simulator, but running the forward and backward simulation is costly ( ∼ 70 s) compared to querying the rendering networks ( ∼ 0 .
22 s) – training the rendering module and physics module together would require many more iterations (300,000 epochs), with each taking much longer ( ∼ 70 sec per epoch), making the training infeasible, and (2) before the rendering module converges and provides satisfactory geometry estimation, the geometry makes little sense for simulation, so gradients flowing from the L physics do not help the optimization.
The smoothed plot in Figure 8 indicates that joint training slows down the rendering optimization early on.
Sequential optimization is therefore more practical.
We conducted two additional tests to study the relationship between the rendering and physics modules.
First, during the sequential optimization, we also update the rendering networks.
This harms the rendering quality (increases loss from 0.03 to 0.10) and does not help physics parameter estimation.
Second, we attempt to optimize the rendered image from physics simulation to match the ground truth image.
We found this process to be inefficient (2 minutes per image) and observed no significant benefits.
Physics Module.
Within our sequential optimization strategy, there are still multiple options for physical parameter estimation.
In our pipeline, we reconstruct the volume mesh m 1 of the first frame, then predict the following mesh sequence m ′
i = sim ( θ physics , m 1 , 1 → i ) with the differentiable simulator.
The physics loss for each frame can be computed in a cycle-consistency manner as in Equation 4.
Our proposed cycle-consistency loss naturally guarantees a point-wise correspondence for each vertex, and does not require mesh reconstruction for every time step.
For each epoch, we only reconstruct the volume mesh for the first frame, which reduces computation and makes the loss differentiable w.r.t.
the rendering networks.
A more direct physics loss could rely on reconstructing the geometry of each frame and computing the Chamfer distance between the simulated and reconstructed meshes.
We compare the two strategies in Figure 10.
‘Ours’ is optimized with our proposed cycle-consistency loss L physics and ‘Chamfer’ is optimized with the Chamfer distance.
(c) shows the value of acceleration , the optimization variable.
(a) and (b) indicate that the losses have comparable performance in both metrics.
However, ‘Chamfer’ takes significantly longer since every frame must be reconstructed.
Our proposed cycle-consistency loss runs faster and maintains differentiability between the rendering and physics simulation module.
Conceptually, decoupling the NeRF and differentiable physics has [Figure] another drawback: a mesh reconstructed purely from SDF cannot capture the interior stress and deformation .
Our proposed cycle-consistency loss addresses this concern, as it takes advantage of the learned motion field, so it is capable of finding the point-wise correspondence and describing the deformation. [Figure]
Rigidity Map.
Finding the correct dynamic foreground object is a prerequisite for physical simulation.
The raw output of the SDF field can only reconstruct a global scene, so the rigidity map is used to segment the dynamic part of the scene (assumed to be the foreground in this case).
The rigidity map collects the motion information from all frames and assigns a high rigidity mask value to dynamic regions.
Figure 9 (c, d) visualizes the rough segmentation results from using different rigidity thresholds.
We empirically find 0.2 to be a reasonable default threshold for separating the foreground from background.
If the rigidity map does not provide clean separation, users may manually specify a bounding box covering the moving object swept volume, and get the final foreground as shown in (e, f).
An alternative segmentation approach is to use the magnitude of the motion field as a criterion to separate dynamic foreground, i.e. large motion area corresponds to dynamic objects (and the converse).
However, in some frames, dynamic parts might only contain small offsets from the canonical frame.
For example, a cyclic bouncing ball could overlap with the canonical position and thus have offset values of zero, even though it should be classified as a dynamic area.
Figure 9 (a) and (b) show results of filtering the scene using motion magnitude.
It is not a good strategy, since a large portion of the background remains even as the ball is partially clipped off in (b).
Conclusion
In this paper, we design an end-to-end pipeline that can successfully estimate and enable physicallybased editing of geometry, appearance, and physics of a dynamic scene from a single video.
Some possible future directions include incorporating semantic priors to further constrain the optimization, and leveraging pre-trained networks [10] as supervision to further regularize training.
For example, optical flow / scene flow networks could be used as a motion detection signal, while a depth estimation network could help to initialize the signed distance field.
Another useful future goal would be to estimate texture [64] and UV maps directly, allowing artists to construct 3D models in standard formats with less effort.
Training and inference could also be accelerated dramatically by adopting a multi-resolution hash encoding [39].
Finally, we could couple this differentiable framework with other types of dynamics, to support a wider range of objects and scenes, e.g. cloth, tetrahedra mesh [49], or even robots [20].
Acknowledgements.
This research is supported in part by Dr. Barry Mersky and Capital One
E-Nnovate Endowed Professorships, and ARL Cooperative Agreement W911NF2120076.
Appendix A Weight Function
We follow the NeuS [61] paper to set the weight function w ( t ) in Equation 1.
First, a density function ρ ( t ) is defined as:
[Equation]
) where Φ h ( x )
= (1 + e − hx ) − 1 is the Sigmoid function, and w ( t ) can be constructed as: w ( t )
=
T ( t ) ρ ( t ) , where T ( t ) = exp (cid:18) − (cid:90) t 0 ρ ( u ) du (cid:19) .
Appendix B Additional Implementation Details
The Color Network (MLP) consists of 4 dense layers, each with 256 hidden dimensions, while the SDF Network has 8 dense layers of 256 hidden dimensions, the Motion Network has 5 dense layers of 64 hidden dimensions, and the Rigidity Network has 3 dense layers of 32 hidden dimensions.
Similar to NeRF++ [73], we use a separate NeRF network to render far-away points outside of a unit-sphere region of interest.
The Motion and Rigidity networks are not applied to those regions since we assume the background to be static.
If we do not disable these networks on the background, we observe significant jittering on those regions.
We have also tried enabling and disabling viewing direction as an input to the Color Network.
It turns out that disabling viewing direction can result in smoother geometry, as it prevents over-fitting to the viewing direction as discussed in NeRF++.
However, we also observed that disabling the viewing direction led to incorrect geometries (like holes) in some cases.
Appendix C Potential Applications
NeuPhysics enables high-resolution mesh reconstruction from a casual video captured by a smartphone.
It would be easy for users to collect their own data to customize virtual body avatars for games and social applications.
Accurate facial and body models can also be used in virtual try-on, or even customized suits, furniture, and sports equipment.
Moreover, the physically-based, dynamic, photorealistic editing technique could be used in designing, content creation, and broader VR/AR applications.
Appendix D Other Supplementary Materials
More dynamic visualization results can be found in our supplementary video; we invite the readers to view these videos for visual comparison.
A preliminary version of our code is included for reviewing only.
We will also open-source a release version in the future for research reproduction with the paper publication.
Appendix E Video Reconstruction
For the video reconstruction task, we evaluate the methods on a dataset consisting of both real-world captured and synthetic videos.
The synthetic data are animated by Blender, and the real-world videos are taken by a smartphone in both indoor and outdoor scenes.
Figure 11 visualizes the datasets as well as the reconstruction videos by different methods.
(a, b) are two frames from the input videos where both the scene and the camera positions have changed.
(c) is by our method, while (d) NRNeRF [57] (e) D-NeRF [47], and (f) NeuS [61] are SOTA methods for comparison.
Note that (d) and (e) are designed for dynamic videos as input, but not designed for geometry reconstruction.
(f) learns SDF field during the video reconstruction as ours does, however, it is originally designed for static scenes so inconsistency among views would likely undermine its performance. [Figure]