Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no implmentation of ps.get_camera_world_position #2

Open
a1600012888 opened this issue Apr 15, 2023 · 3 comments
Open

no implmentation of ps.get_camera_world_position #2

a1600012888 opened this issue Apr 15, 2023 · 3 comments

Comments

@a1600012888
Copy link

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.

@nmwsharp
Copy link
Owner

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.

@Linusnie
Copy link

Linusnie commented Jun 26, 2023

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!

@IngmarLudwig
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants