neural-implicit-queries icon indicating copy to clipboard operation
neural-implicit-queries copied to clipboard

no implmentation of `ps.get_camera_world_position`

Open a1600012888 opened this issue 2 years ago • 3 comments

Hi, thanks for the wonderful project and also building tools like polyscope.

def save_render_current_view(
    args, implicit_func, params, cast_frustum, opts, matcaps, surf_color
):

    root = ps.get_camera_world_position()
    look, up, left = ps.get_camera_frame()
    fov_deg = ps.get_field_of_view()

In the main_spelunking.py, at line 41: https://github.com/nmwsharp/neural-implicit-queries/blob/main/src/main_spelunking.py#L41

Seems that current public version of polyscope does not contain implementation of get_camera_world_positions.

a1600012888 avatar Apr 15 '23 18:04 a1600012888

Whoops! You're totally right, thanks for pointing it out. I really need to get that Polycope update released.... I'll create an issue for myself there to try not to forget.

nmwsharp avatar Apr 20 '23 06:04 nmwsharp

as a temporary fix to view the render you can replace lines 41-43 with something like the following:

root = jnp.array([-3, 0, 0])
look, up, left = jnp.eye(3)
fov_deg = 80

as a side note I also had to replace line 58 with np.array((img_alpha * 255).astype(np.uint8)) to avoid a PIL error, then it works like a charm!

Linusnie avatar Jun 26 '23 04:06 Linusnie

@Linusnie Thank you very much, this helped me a lot!

IngmarLudwig avatar Nov 14 '23 08:11 IngmarLudwig