pytorch3d
pytorch3d copied to clipboard
sphere_tracing doesn't support batched?
❓ Questions on how to use PyTorch3D
I want to use SignedDistanceFunctionRenderer to render sdf things. When it runs in sphere_tracing(), curr_start_points' dim is [B*N, 3]. But for my SDF fun, points' dim should be [B, N, 3]. Am I doing something wrong? The following is how I used it: sdf_warpper = ImplicitFunctionWrapper(self.dec) sdf_warpper.bound_args = extra_args ray_tracer = RayTracing() sdfrender = SignedDistanceFunctionRenderer() sdfrender.ray_tracer = ray_tracer raysampler_training = MonteCarloRaysampler( min_x = -1.0, max_x = 1.0, min_y = -1.0, max_y = 1.0, n_rays_per_image=750, n_pts_per_ray=128, min_depth=0.1, max_depth=volume_extent_world, ) ray_bundle = raysampler_training(cameras) render_output = sdfrender(ray_bundle=ray_bundle, implicit_functions=[sdf_warpper], evaluation_mode=EvaluationMode.TRAINING, object_mask=batch['obj_mask'])
Hi @WeedsInML! Have you managed to render a SDF? I have been trying a lot but with no success, I can't find any documentation on it and I'm really confused. Could you maybe share some more of your code? Thank you
I figured it out!
I think it doesn't support batching and this is unlikely to be changed by us soon.
@cajoek Hi, do you maybe have a working example of the script for rendering SDF?