autonomousvision / sdfstudio

A Unified Framework for Surface Reconstruction
Apache License 2.0
1.96k stars 183 forks source link

How to render-mesh with a camera-path? #251

Open juuso-oskari opened 10 months ago

juuso-oskari commented 10 months ago

Hi,

I would like to render the mesh along a given camera-path file (.json file created in viewer). But if I try

ns-render-mesh --meshfile meshes/scan1.ply --camera-path-filename camera_path_replica_scan1.json --traj filename --output-path renders/neus-facto-replica-scan1.mp4 sdfstudio-data --data data/replica/scan1

It still just opens the rendering viewer where I would have to move the mesh myself. I would like the created videos to be exactly from the same positions for 2 different models, hence I would need to use camera-path.

juuso-oskari commented 10 months ago

I actually got it to move now with downgrading the open3d by pip install open3d==0.16.0. But theres some problem with the camera-trajectory as I can only partially see my mesh (suggesting that the camera trajectory is slightly off). How should the camera trajectory be acquired? How I'm doing it now is by placing cameras in the viewer and then exporting the path.

niujinshuchong commented 10 months ago

Hi, did you enable auto-orient in your training? maybe there is some miss alignment in the trajectory.

juuso-oskari commented 10 months ago

Hi @niujinshuchong. No I didnt. You mean the auto_orient: bool = False option in sdfstudio-dataparser? Why is it by default turned off? Am I supposed to turn it on already during training or just when I want to extract the camera path?

niujinshuchong commented 10 months ago

Hi, It is disabled by default so the camera coordinate is not changed. I think you could first test if you can render it to the training properly.