S CORE - BASED G ENERATIVE 3D M ESH M ODELING
Anonymous authors
Paper under double-blind review
A BSTRACT
We consider the task of generating realistic 3D shapes, which is useful for a variety of applications such as automatic scene generation and physical simulation.
Compared to other 3D representations like voxels and point clouds, meshes are more desirable in practice, because (1) they enable easy and arbitrary manipulation of shapes for relighting and simulation, and (2) they can fully leverage the power of modern graphics pipelines which are mostly optimized for meshes.
Previous scalable methods for generating meshes typically rely on sub-optimal post-processing, and they tend to produce overly-smooth or noisy surfaces without fine-grained geometric details.
To overcome these shortcomings, we take advantage of the graph structure of meshes and use a simple yet very effective generative modeling method to generate 3D meshes.
Specifically, we represent meshes with deformable tetrahedral grids, and then train a diffusion model on this direct parameterization.
We demonstrate the effectiveness of our model on multiple generative tasks.
I NTRODUCTION
As one of the most challenging tasks in computer vision and graphics, generative modeling of high-quality 3D shapes is of great significance in many applications such as virtual reality and metaverse [11].
Traditional methods for generative 3D shape modeling are usually built upon representations of voxels [46] or point clouds [1], mostly because ground truth data of these representations are relatively easy to obtain and also convenient to process.
Both representations, however, do not produce fine-level surface geometry and therefore cannot be used for photorealistic rendering of shapes of different materials in different lighting conditions.
And despite being convenient to process by computers, both voxels and point clouds are relatively hard for artists to edit, especially when the generated 3D shapes are complex and of low quality.
Moreover, modern graphics pipelines are built and optimized for explicit geometry representations like meshes, making meshes one of the most desirable final 3D shape representations.
While it is still possible to use methods like Poisson reconstruction to obtain surfaces from voxels and points clouds, the resulted surfaces are generally noisy and contain many topological artifacts, even with carefully tuned hyperparameters.
To improve the representation flexibility, sign distance fields (SDFs) have been adopted to model shape surfaces, which enables us to use marching cubes [26] to extract the zero-surfaces and thus 3D meshes.
However, SDFs are typically harder to learn as it requires a carefully designed sampling strategy and regularization.
Because SDFs are usually parameterized with multi-layer perceptrons (MLPs) in which a smoothness prior is implicitly embedded, the generated shapes tend to be so smooth that sharp edges and important (and potentially semantic) details are lost.
Moreover, SDFs are costly to render and therefore less suitable for downstream tasks like conditional generation with
RGB images, which require an efficient differentiable renderer during inference.
We instead aim to generate 3D shapes by directly producing 3D meshes, where surfaces are represented as a graph of triangular or polygon faces.
With 3D meshes, all local surface information is completely included in the mesh vertices (along with the vertex connectivity), because the surface normal of any point on the shape surface is simply a nearest neighbor or some local linear combination of vertex normals.
Such a regular structure with rich geometric details enables us to better model the data distribution and learn generative models that are more geometry-aware.
In light of recent advances in score-based generative modeling [16, 43] where powerful generative performance and effortless training are demonstrated, we propose to train diffusion models on these vertices to generate meshes.
However, it is by no means a trivial task and poses two critical problems: (1) the numbers of vertices and faces are indefinite for general object categories, and (2) the underlying topology varies wildly and edges have to be generated at the same time.
A natural solution is to enclose meshes with another structure such that the space of mesh topology and spatial configuration is constrained.
One common approach is to discretize the 3D space and encapsulate each mesh in a tiny cell, and it is proven useful in simulation [34] and human surface modeling [32].
Observing that this sort of mesh modeling is viable in recent differentiable geometry modeling literature [29, 35, 39], we instead train diffusion models on a discretized and uniform tetrahedral grid structure which parameterizes a small but representative family of meshes.
With such a grid representation, topological change is subsumed into the SDF values and the inputs to the diffusion model now assume a fixed and identical size.
More importantly, since SDF values are now independent scalars instead of the outputs of an MLP, the parameterized shapes are no longer biased towards smooth surfaces.
Indeed, by such explicit probabilistic modeling we introduce an explicit geometric prior into shape generation, because a score matching loss of diffusion models on the grid vertices has direct and simple correspondence to a loss of the triangular mesh vertex positions.
We demonstrate that our method, dubbed MeshDiffusion , is able to produce high-quality meshes and enables conditional generation with a differentiable renderer.
MeshDiffusion is also very stable to train without bells and whistles.
We validate the superiority of the visual quality of our generated samples qualitatively with different rendered views and quantitatively by proxy metrics.
We further conduct ablation studies to show that our design choices are necessary and well suited for the task of 3D mesh generation.
Our contributions are summarized below:
• To our knowledge, we are the first to apply diffusion model for unconditionally generating 3D high-quality meshes and to show that diffusion models are well suited for 3D geometry.
• Taking advantage of the deformable tetrahedral grid parameterization of 3D mesh shapes, we propose a simple and effortless way to train a diffusion model to generate 3D meshes.
• We qualitatively and quantitatively demonstrate the superiority of MeshDiffusion on different tasks, including unconditional generation, conditional generation and interpolation.
R ELATED W ORK
3D Shape Generation .
3D shape generation is commonly done by using generative models on voxels [46] and point clouds [47], due to their simplicity and accessibility.
These resulted (often noisy) voxels or point clouds, however, do not explicitly encode surface information and therefore has to be processed with surface reconstruction methods in order to be used in applications like relighting and simulation.
Recent advances in implicit representations [28] lead to a series of generative models on neural fields [5, 6, 21, 38].
Based on these representations, one can learn 3D shapes directly from 2D images [5, 6, 38] with differentiable rendering in the generator.
Most of these implicit representations, despite representing shapes in a more photorealistic way, require additional post-processing steps to extract explicit meshes, and are more time-consuming steps to render images.
If the underlying topology is known, one may directly generate the vertices of a mesh [27, 44].
[30] extends this approach to the topology-varying case with autoregressive models, sequentially generating vertices and edges, but it is hardly scalable and yields unsatisfactory results on complex geometry.
A batch of concurrent work propose similar solutions to mesh generation, including: GET3D [13] which uses StyleGAN [18] with a differentiable renderer on tetrahedral grid representations and learns to generate 3D meshes from 2D RGB images, TetGAN [14] which trains GANs on tetrahedral grids and LION [48] which uses a trained Shape-As-Points [33] network to build meshes from diffusion-model-generated point clouds.
Mesh Reconstruction .
To obtain meshes for downstream tasks, generated non-mesh representations have to be processed with some mesh reconstruction method.
One of the most popular method is marching cubes [26] which assumes that a surface is represented by the zero level set of some continuous field, and this continuous field can be well approximated by linear interpolation of discrete grid points.
It is possible to avoid implicit representations and directly construct meshes.
For instance, by assuming the points lie on a surface, one can build triangular meshes by connecting these points, a process known as Delaunay triangulation [3, 10, 15, 20].
It is relatively rare because of its strong assumption on data.
With known mesh topology, one can deform a mesh template to fit the given representation.
This approach can be easily used to fit multiview images of shapes with known topology ( e.g. , human faces) using a differentiable renderer [23].
It is recently shown that we may parametrize meshes of varying topology [35, 39] and optimize them using differentiable renderers [29], which our work leverages.
Score-based Generative Models .
The recent years witness a surge in modeling data distributions with score-based models [16, 42, 43], which parametrizes the logarithm of the gradient of the probability, known as the score function.
Different from energy-based models, the intractable normalization constant is avoided and therefore training can be done by score matching.
It has been shown that, by using multi-scale models [16], U-Net architectures [37] and denoising score matching [45], score-based models can perform high-fidelity image generation and inpainting [16, 36, 43].
P RELIMINARIES
Deep marching tetrahedra (DMTet) [39] is a method to parametrize and optimize meshes of arbitrary topology in a differentiable way.
The 3D space is discretized with a deformable tetrahedral grid, in which each vertex possesses a SDF value.
The SDF of each 3D position in the space is computed by marching tetrahedra [12], which assumes SDF values to be barycentric interpolation of the SDF values of the vertices of the enclosing tetrahedra.
More specifically, for a point x q inside a tetrahedron of vertices x 1 , x 2 , x 3 , x 4 with SDF values being s 1 , s 2 , s 3 , s 4 , we obtain its unique barycentric coordinate ( a 1 , a 2 , a 3 , a 4 ) such that x q = (cid:80) i
a
i x i ( a i ∈ [0 , 1] ).
The SDF value s p of x q is then computed as s q = (cid:80) i
a i s i .
As a result, if there exists a triangular mesh in the tetrahedron ( i.e. , s 1 , s 2 , s 3 , s 4 are not of the same sign), the triangular mesh is exactly the zero surface in the tetrahedron.
The triangular mesh vertex v p on a tetrahedron edge ( v a , v b ) is thus v p =( v a s b − v b s a ) /
( s b − s a ) .
The advantage of using DMTet, compared to variants of deep marching cubes [24, 35] which relies on the marching cubes algorithm
[26], is that the grids are deformable and thus more able to capture some finer geometric details like very thin handles of chairs.
While the cubic grid used for deep marching cubes can be deformable as well, the deformed cubes are worse objects to deal with, compared to tetrahedra which remain tetrahedra after deformation.
Notably, DMTet can be fitted with a differentiable renderer by jointly optimizing for the geometry, the texture and the lighting of a 3D shape given multi-view RGB images within reasonable time and memory budget [29].
Diffusion models are a set of score-based generative models which learn and infer with the groundtruth time-dependent score function defined by a forward diffusion process [16].
Under the stochastic differential equation (SDE) framework proposed in [43], diffusion models construct the probability of each point in a space by diffusing all data points x 0 ∈ D to a target distribution at time T (normally p T ( x T ) =
N ( x T ; 0 , I ) ) in a time-variant manner: log p t ( x t |D )
=
E x 0 ∈D [log p t ( x t | x 0 )] , where p t ( x t | x 0 ) is modeled by the following Itô process, with w ( t ) being a standard Wiener process: dx = F ( x, t )
dt + G ( t ) dw , in which F ( x, t ) and G ( x, t ) are some predefined functions.
The training objective is to fit the score function ∇ x log p t ( x t | x 0 ) with a neural net s θ ( x t , t ) , with λ ( t ) being a scalar weight subject to model design:
[Equation]
[Figure]
With the trained score function predictor, samples can be generated by solving the reverse SDE [43] with the initial distribution p T ( x T ) using solvers like Euler-Maruyama method [19]:
[Equation]
A popular diffusion model DDPM [16], which utilizes a discrete diffusion process p ( x t | x t − 1 )
=
N ( x t ; (1 − β t ) x t − 1 , β t I ) , can be formulated within this SDE framework as [43]: dx = − β t xdt + √ β t dw .
The parameters β t are chosen such that p T ( x T ) is close to a standard Gaussian distribution.
MeshDiffusion : D IFFUSION M ODEL ON M ESHES
With DMTet, 3D meshes can be approximated and parametrized with tetrahedral grids.
Moreover, by initializing the tetrahedral grid using body-centered cubic (BCC) tiling of tetrahedra [22] and treating the deformation of each vertex only as an attribute, we obtain a uniform and almost-regular tetrahedral grid (with fewer vertex degrees on the boundary) in a 3D space in which translational symmetry is preserved.
Such nice properties enable us to train a diffusion model for generating 3D meshes.
For now on, we always assume that the undeformed tetrahedral grid is uniformly initialized and predict the deformation of tetrahedral grid vertices from their initial positions.
As a result, our model takes as input a uniform cubic grid with 4-dimensional attributes (1 dimension for SDF andfor deformation).
4. 3D CNN FOR D EFORMABLE T ETRAHEDRAL G RIDS
While it is natural to use graph neural nets (GNNs) for diffusion model on tetrahedral grids, it is better use CNNs which generally have more model capacity than GNNs due to the embedded spatial information in the convolution weights.
Specifically, the set of vertex positions of a uniform tetrahedral grid, created in the way described in [22], is a subset of the vertex position set of a uniform cubic lattice.
A standard voxel-like representation can therefore be easily created by infilling the “missing” sites of a tetrahedral grid (illustrated in Fig. 2).
We follow typical practices in diffusion models [43] and use a 3D U-Net for the score function predictor.
Details are in the appendix.
4. T RAINING O BJECTIVE
Since the tetrahedral grid representation of each object in the datasets is not given, our objective involves the following constrained optimization:
[Equation]
in which D is the 3D shape dataset, y 0 ∼ D is the set of 2D views of an object sampled from D , t is uniformly sampled from { 1 , ..., T } , s θ ( x, t ) is the score function approximator network, g ϕ ( y 0 ) is the mapping from 2D views of y 0 to its tetrahedral grid representation and L Render is the rendering (and relevant regularization) loss used in [29].
While in theory it is possible to train g ϕ such that s θ can be better learned, we instead take the simplest two-stage and non-amortized approach as detailed optimization and encoder architecture design to use is beyond our scope.
Specifically, we first solve for the constraint L Render and create a dataset D x of tetrahedral grids by fitting a tetrahedral grid x 0 for each y 0 ∼ D in a non-amortized way.
The second stage is simply optimize for the main objective, a L 2 denoising loss of diffusion model, on D x .
In principle, the first data fitting stage can be trained with multiview RGB images by following the procedure in [29].
However, we notice that with RGB images only, it fails to learn some complex geometries, especially when surface materials are highly specular.
To demonstrate our idea while not delving too deep into the rendering details, we instead assume that we have access to 3D mesh datasets (in our experiments, ShapeNet datasets [7]) so that RGBD images can be rendered with random lighting and simple surface materials.
More specifically, we use a single default material with diffuse components only for all ground truth meshes, and render multiview RGBD images with some known but randomly rotated environment light (represented as a cubemap [40]).
With the additional depth information, our reconstruction objective is L Render =
α image L image + α depth L depth + α chamfer L chamfer + α penalty L penalty , in which L image and L depth are the image loss (RGB and silhouette) and the depth loss between the rendered views and the ground truth views, respectively; L chamfer is the Chamfer distance [1] between a sampled point cloud from the predicted mesh and one from the ground truth mesh; L penalty is the regularization terms to move reconstructed meshes out from bad local minima.
Details of these losses are included in the appendix.
To remove absolute scales from SDFs (Sec. 4.3), we solve the optimization objective twice, where during the second pass we fix the SDFs to be the signs ( i.e. , ± 1 ) of the resulted SDF values from the first pass.
4. R EDUCING N OISE -S ENSITIVITY OF M ARCHING T ETRAHEDRA
It is tempting to train diffusion models on arbitrary D x , the dataset of fitted tetrahedral grids of objects, with low L Render .
However, the naively trained models generate highly non-smooth surfaces (Fig. 3) due to a mismatch between the L 2 denoising objective on the 4-dimensional inputs (SDF and deformation) and the ideal L 2 reconstruction objective on mesh positions.
Recall that the triangular mesh vertex position v p on a single tetrahedron edge e =
( a, b ) is computed by linear interpolation v p
= ( v a s b − v b s a ) /
( s b − s a ) , in which v a , v b are the positions of tetrahedron vertices a and b , and s a , s b are the corresponding SDF values.
With perfectly fitted v a , v b and s b but a small noise ϵ on s a and s b , the triangular mesh vertex is subject to a perturbation inversely proportional to s b − s a :
[Equation]
An arbitrarily fitted dataset D x does not provide any guarantee on the scale of | s b − s a | and clearly ∥ v p, noisy − v p ∥ can be unbounded in the worst case, even when the L 2 denoising loss is low on D x .
A similar issue arises when we consider the topological change due to a small noise in the SDF values.
For illustration, suppose for some ground truth edge in a tetrahedral grid, s a = 1 and − C <
s b <where C ≪ 1 is a tiny positive scalar.
With a small noise on s b , there can be a high probability of local topological changes ( e.g. , an undesirable hole) in the resulted 3D meshes even when the Ldenoising loss is small.
Due to these undesired behaviors, we propose to normalize the SDF values and adopt the two-pass optimization scheme described in Sec.
4.2, so that s a
, s b ∈ { +1 , − 1 } and | s b − s a | = 2 for all mesh-generating tedrahedron edges.
With normalized SDFs values and continuous deformation vectors, it is natural train a hybrid diffusion model in which the SDFs are modeled like in D3PM [2] since normalized SDFs take discrete values of ± 1 .
However, we empirically find that it suffices to simply treat the normalized SDFs as float numbers and train a standard Gaussian diffusion model.
The inference thus requires a final normalization operation to round SDFs to ± 1 according to their signs.
Because the generative model is trained under the assumption that
SDF values are un-normalized, a further refinement step can be applied by setting the generated and normalized SDFs as conditional inputs and run a conditional generation step on the deformation vectors only.
4. C ONDITIONAL G ENERATION WITH S INGLE - VIEW I MAGES
In many cases, we would like to generate 3D objects given a (possibly partial) single view RGBD image.
Such a task is simple with our mesh generative model by a two-stage process, first to
[Table] [Table]
fit a tetrahedral grid with the given single RGBD view and second to use diffusion models to (stochastically) correct the wrong parts.
We follow the following procedure shown in Alg. 2.
For the conditional inference process, we consider the simplest conditional generation methods [16] (called replacement method in [17]).
Specifically, we sample ˆ x t − 1 from x t and replace ˆ x bt − 1 by p t − 1 ( x bt − 1 | x a 0 ) which is defined by the forward diffusion.
More details are included in the appendix.
E XPERIMENTS 5. S ETTINGS
Data Fitting .
We fit tetrahedral grids on five ShapeNet subcategories: Chair, Airplane, Car, Rifle and
Table, the same set of categories used in [9, 49].
Fitting each object takes roughly 20-30 minutes on a single Quadro RTX 6000 GPU.
We use the same train/test split in [49].
The detailed architecture, training and hyperparameter settings are explained in the appendix.
Generative Model .
To show the effectiveness and universality of our approach of training diffusion models on 3D meshes, for the U-Net architecture we take an extremely approach by simply replacing the 2D convolution and other 2D modules in the U-Net architecture used by [43] with their 3D counterparts.
To improve model capacity, we provide to the model as a conditional input a mask indicating which lattice sites are artificially augmented.
We slightly increase the depths of the network due to the larger input size.
We do not tune the hyperparameters of diffusion SDEs but instead use the same set of hyperparemters as described in [43].
We train discrete-time category-specific diffusion models for all datasets for 90k iterations with batch size 48 on 8 A100-80GB GPUs.
The training process takes 2 to 3 days.
For ablation on alternative architectures, we train GANs on our datasets with an architecture similar to the one used in [46].
Our SDF-based baselines include IM-GAN [9] and SDF-StyleGAN [49].
5. U NCONDITIONAL G ENERATION
We randomly sample shapes from each of our trained generative models for each dataset, and apply the standard Laplace smoothing [31] on the generated meshes (smoothed with λ = 0 .
25 withoptimization steps).
We visualize samples created by our methods and baseline methods in Fig.
We note that our method produces the sharpest samples and preserve the most of geometric details, while pure SDF-based methods tend to be too smooth.
Part of the reason is that these SDF-based methods assume a very smooth interpolation between points, while our method explicitly model the interpolation in a piecewise linear way.
5.2. Q UANTATITVE M ETRICS .
In Table 1, we show various point cloud distances [1, 49] and light field distance (LFD) [8] between the test set and the generated samples by sampling point clouds of size 2048 from both ground truth and generated meshes.
Our MeshDiffusion better captures the geometric details, and therefore achieve better point cloud metrics
[Figure]
MeshDiffusion
C h a
i r
C a r
A i r p l a n e
T a b l e
R i f l e
[Figure]
CD
[Figure]
Chair
[Figure]
6.298 SDF-StyleGAN 15.
6.846 Ours 13.
Airplane
IM-GAN 3.
21.151 SDFStyleGAN 4.
26.304 Ours 3.
Car
IM-GAN 5.
SDFStyleGAN 5.
15.960 Ours 4.
[Table]
We also follow [49] and measure Frechet inception distances (FIDs) [4] on rendered views as a proxy of goodness of surfaces.
Same as in [49], the views are rendered with 24 camera poses uniformly distributed on a sphere; 3 fixed point light sources are used to light the meshes; a gray diffuse material is used for all meshes.
The FID score of each view is computed with an ImageNet-pretrained model and averaged to obtain the FID scores for 3D shapes.
Our MeshDiffusion is able to achieve competitive scores compared to SDF-StyleGAN.
We note, however, the computed FID is not a genuine score for 3D shapes since the distribution of rendered views of these meshes is very different from the distribution of natural RGB images.
Additionally, we perform ablation study on the choices of models in Table.
It is clear that the our SDF normalization strategy described in Sec. 4.3 is beneficial for the diffusion model and our diffusion model is better suited for our mesh generation setting.
5. C ONDITIONAL G ENERATION
Our model can generate meshes by conditioning on a single-view RGBD image, as shown in Fig.
Because the geometry estimated from the single-view fitting is not perfect even in the given single view, we allow the originally-fixed tetrahedral vertices to be slightly updated by the diffusion model near the end of the diffusion completion process (in our experiments, T = 50 ; the inference process starts at T = 1000 and ends at T = 0 ).
[Table]
[Table] [Table]
5. I NTERPOLATION
We use DDIM [41] to convert the stochastic sampling process into a deterministic one.
With DDIM, the initial random Gaussian noise x T is treated as the “latent code” of the generated image
[Table]
and we run the following sampling process:
[Equation]
t , t ) .
Following the settings in DDIM paper [41], we use spherical interpolation for the latent codes.
We visualize some of the interpolation sequences in Fig.
We set the number of inference steps tofor faster inference and use quadratic time spacing as described in [41].
D ISCUSSION
Optimization issues with DMTet.
While DMTet is capable of fitting geometries, it fails in cases where the underlying topology is complex.
Besides, it is not encouraged to learn the true topology of shapes and may produce invisible topological holes by contracting the neighboring triangular mesh vertices close enough.
Furthermore, we observe that the optimization process with differentiable rasterization of 3D meshes may produce floating and isolated meshes, especially when depth supervision is introduced.
It is therefore worth designing better optimization techniques, regularization methods and possibly better parametrization of meshes for the purpose of training mesh diffusion models.
Diffusion model design.
Our experiments demonstrate the effectiveness of the simple design with few hyperparameter and architecture changes: a 3D-CNN-based U-Net on augmented cubic grids with DDPM.
We note that it is straightforward to utilize advanced diffusion models and switch to more memory-efficient architectures.
Especially, since it is possible to regularize SDFs with methods such as Lipschitz constraints [25], it is a promising approach to train diffusion models on the latent space produced by a regularized autoencoder, the same strategy adopted in [36].
[Figure]
Limitations.
Diffusion model typically assumes a known dataset in the input modality (augmented tetrahedral grids in our case), but to efficiently train diffusion models on 2D images, we need a better way to amortize the costs and fully leverage the power of differentiable rendering.
Our paper avoids this important aspect but instead adopts the two-stage approach of "reconstruction-then-generation".
Moreover, in our formulation, the differentiable renderer is useful only during the tetrahedral grid creation process, while in principle we believe there can be ways to incorporate the differentiable render in the training and inference process of diffusion models.
Finally, our diffusion model is built with a very naïve architecture, thus limiting the resolution of input tetrahedral grids, while we notice that some of the fine details cannot be fully captured with the current resolution of 64 during the dataset creation stage.
With better architecture designs or adaptive resolution techniques (as in [39]), we may greatly increase the resolution and generate a more diverse set of fine-level geometric details.
C ONCLUSION
We demonstrate that our MeshDiffusion , a diffusion model on 3D meshes parametrized by tetrahedral grids, is able to generate fine-details of 3D shapes with arbitrary topology.
Such a model is minimally designed but still outperforms the baselines.
We demonstrate that, despite being trained and performing inference in the 3D space, can be easily used when only 2.5D information is available.
We believe that our model can potentially shed some light on future studies of score-based models for learning and generating high-fidelity shapes.
A D ETAILS ON D ATASET P REPARATION A. A RCHITECTURE AND L OSSES
RGB and silhouette loss.
By interpolating between a black background image and the binary mask (produced by rasterization to indicate the existence of rasterized meshes on each pixel), we obtain a smoothed binary mask M and M gt , for the fitted meshes and predicted meshes respectively.
We then compute the silhouette loss:
[Equation]
We compute the averaged pixel-wise log- L 1 loss between rendered images and ground truth images:
[Equation]
in which D pose is the set of random camera poses which always look at the center of the object, and x is the sampled tetrahedral grid from the dataset D .
Depth loss.
We use a mixed loss for depth: when the depth is greater than a threshold (set to 1 . 0 ), we use a L 2 loss; otherwise, we switch to L 1 loss as we find it producing much better surfaces.
[Equation]
The depth images are computed by barycentric interpolation following rasterization, in which the background is assumed to have a large default depth of 20 , which is much greater than the object depth (constrained in [ − 1 , 1] ).
Chamfer loss.
At every iteration, we randomly sample 50 , 000 points from both ground truth meshes and predicted meshes and compute the standard Chamfer distance:
[Equation]
SDF regularization loss.
Following [29], we use the same L 2 regularization loss and penalize the difference of SDFs of two neighboring tetrahedral vertices ( i.e. , E tet the set of all edges in the tetrahedral grid) as in [29] so that the occluded regions do not produce complex inner geometry.
It is also helpful for optimizing tetrahedral grids.
[Equation]
Hyperparameter setting.
We set α image =
α Chamfer = 1 .
and α depth = 100 . 0 .
We set α SDF to 0 .and
use a linear decay of the scale towards 0 .
We use an Adam optimizer for all the parameters with a learning rate of 5 e − 4 and ( β 1 , β 2 ) =
We train both reconstruction passes with 5000 iterations.
A. I MPLMENTATION DETAILS
The initial tetrahedral grid is initialized in a cube [ − 1 , 1] 3 by a dense body-centered cubic (BCC) tiling of tetrahedra [22].
As some tetrahedral generation packages produce additional tetrahedral vertices on the boundary of the cube which breaks translational symmetry (hence detrimental to the performance of 3D CNN), we remove such symmetry-breaking boundaries if any.
We find that using the clipped deformation vectors is better than using the tanh -ed deformation vectors as they remove some nonlinearity.
And to ensure that the deformation vectors are always differentiable, we clip the deformation vectors only after each gradient update, but not during the forward computational pass.
[Table]
We set the range of deformation to be three times of that used in [39] so that the meshes can better capture details in the absence of SDF scales (Sec. 4.3), and we do not observe many pathological artifacts with this setting.
Because we normalize SDFs after the first reconstruction pass, it is more desirable for the underlying shape to be captured mostly by the topology implied by SDF values, not the vertex deformation.
To encourage convergence to such solutions, during the first 2000 iterations, we periodically scale the learned SDF values by 0 .
4 for every 300 iterations.
We observe that depth supervision is not enough to remove some isolated floater meshes in the space.
Therefore, we cull these floaters by setting the SDF values of all tetrahedral vertices lying outside the visual hull to positive values (with the assumption that positive values represent ouside-ness).
Due to constraints on computational resources, we do not perform culling in a full 3D way, but use rendered shape silhouette to determine floaters visible in the rendered views only.
We notice that some of the meshes in ShapeNet are not watertight while some others have parts which are very thin.
Depth supervision on these parts can lead to more topological holes.
Therefore, during rasterization we extract the depths (stored in Z-buffers) of the two closet meshes for each pixel and decide if we compute the depth loss on these pixels according to the difference in depth of these two meshes.
Specially, depth supervision is not included if the difference is too small or there is only one rasterized mesh (meaning that the ray only intersects with a single mesh).
Motivated by the fact that only SDFs of the mesh-generating tetrahedra ( i.e. , tetrahedra with vertices of different SDF signs) matter, we set the SDFs of all the non-mesh-generating tetrahedral vertices to ± 1 (signs depending on if vertices inside/outside the shape) to reduce the complexity of the dataset.
For the single-view reconstruction stage in the conditional generation experiments, we observe that the lack of other views leads to many floating artifacts when the target shape consists of a bulk volume.
Therefore, during the first 300 iterations, we periodically (every 10 iterations) query the nearest neighbor ground truth mesh vertices for every tetrahedral vertex, and determine if the vertex is in front of the camera and not behind the current view (by computing the nearest surface normal, the displacement from the nearest face center and the view direction from camera).
If the tetrahedral vertex satisfies the condition, we set its SDF value to +1 .
B D ETAILS ON D IFFUSION M ODEL
We adapt the network of DDPM in [16] and use a base width of 64 .
The encoder in the U-Net is shown in Fig. 4, and the decoder follows the same but reverse pattern.
All the values at the artificially-introduced sites of a cubic lattice are set to zero.
We append to the cubic grid in the first and last few layers a binary mask that indicates which vertices are from the tetrahedral grid and which are fake.
The score matching loss is also masked accordingly so that the augmented vertices in the predicted cubic grids do not contribute.
To prevent overfitting, we augment the dataset by randomly translate all tetrahedron vertices by the same but tiny amount.
C Q UANTATIVE M ETRICS FOR 3D M ESHES
We briefly explain the metrics we used for evaluating the quality of 3D Meshes.
Minimum Matching Distance (MMD).
MMD measures the average distance to the nearest neighbor of individual points in one point cloud to another point cloud.
Coverage.
Suppose every point cloud in a set A is approximated by its nearest neighbor in another set B .
Coverage measures the fraction of elements in B which are used to cover A in the nearest neighbor matching sense.
Higher the coverage, Better that A is a representative set of B .
Leave-one-out Accuracy (1-NNA).
As its name indicates, 1-NNA is the average leave-one-out accuracy of the 1-NN classifier fitted on A to classify B .
It measures if each element in the set A is important in representing another set B .
A low 1-NNA score means that A well covers B .
Jensen-Shannon Divergence (JSD).
With JSD, we compute the distance between distribution of ground truth point clouds and that of the generated point clouds: JSD ( P A , P B ) =
12 KL ( P A || M ) + 12 KL ( P B || M ) , in which M = 12 ( P A + P B ) .
Light Field Distance (LFD).
LFD leverages the so-called light field descriptor [8], which combines local region-based and contour-based descriptors to measure the silhouettes and thus object shapes.
D M ORE U NCONDITIONAL G ENERATION S AMPLES
[Figure]