Closed dumppool closed 2 years ago
Hi,
The outputs are all written into subdirectories of differentiable-sdf-rendering/outputs/
. The optimized SDF itself will be in the params
subdirectory of the optimization's output folder. The format of the result is a mitsuba volume file (*.vol) storing the SDF values. This can be converted to a mesh using marching cubes (e.g., from scipy).
Hope that helps Delio
thanks for relpy
a few lines of code:
import mcubes
import trimesh
import numpy as np
import mitsuba as mi
mi.set_variant('cuda_ad_rgb', 'llvm_ad_rgb')
vol_path = None # your path to vol
ply_path = None # your path to save ply
loaded_data = np.array(mi.VolumeGrid(vol_path))
vertices, triangles = mcubes.marching_cubes(loaded_data, 0.0)
mesh = trimesh.Trimesh(vertices, triangles)
trimesh.repair.fix_inversion(mesh)
mesh.export(ply_path)
After finishing trainning,I could not find where is the result mesh generated by optiomization. Which folder contain the final mesh? how to dump the gid parameters into result mesh?