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

How to not display the xyz axis of the world frame in the rendered picture. #130

Open
hermosaaurora opened this issue Aug 19, 2023 · 1 comment

Comments

@hermosaaurora
Copy link

System:

  • OS version: Ubuntu 20.04
  • Python version (if applicable): Python 3.7.16
  • SAPIEN version (pip freeze | grep sapien): 2.1.0
  • Environment: Server with xvfb

Describe the bug
Why are there always x/y/z axis of the world frame in the rendered picture? How can I exclude them or resize their thickness in my rendered pictures?

To Reproduce
Steps to reproduce the behavior (use pastebin for code):

def get_rgb(self):
        self.camera.take_picture()
        rgba = self.camera.get_float_texture('Color')
        rgba = (rgba * 255).clip(0, 255).astype(np.float32) / 255
        white = np.ones((rgba.shape[0], rgba.shape[1], 3), dtype=np.float32)
        mask = np.tile(rgba[:, :, 3:4], [1, 1, 3])
        rgb = rgba[:, :, :3] * mask + white * (1 - mask)
        return rgb

Expected behavior
I expect the axis can be excluded from the pictures

@hermosaaurora
Copy link
Author

I know where the bug is. To show the gui, I follow the example code in your documentation and set the Viewer. I add the two lines of code in my project:

self.viewer = Viewer(self.renderer)
self.viewer.set_scene(scene=self.scene)

if I comment out the codes, then the rendered images will be with no axes. So I take a skim at the set_scene's implementation:

self.scene = scene
self.window.set_scene(scene)
self.fps_camera_controller = FPSCameraController(self.window)
self.arc_camera_controller = ArcRotateCameraController(self.window)
self.create_visual_objects()
self.toggle_axes(True)
self.set_fovy(np.pi / 2)

as you can see in line 1982, the argument of self.toggle_axes is always True. I think there can be an option for the user to decide whether they want the axes to be shown.

hermosaaurora added a commit to hermosaaurora/SAPIEN that referenced this issue Aug 19, 2023
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

1 participant