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

Optix Bug. How to configure Optix correctly? #180

Open
fffffq99 opened this issue Nov 4, 2024 · 2 comments
Open

Optix Bug. How to configure Optix correctly? #180

fffffq99 opened this issue Nov 4, 2024 · 2 comments

Comments

@fffffq99
Copy link

fffffq99 commented Nov 4, 2024

System:

  • Python version : 3.8.13
  • SAPIEN version sapien==3.0.0b1
  • Environment: Docker (build by myself)
  • GPU: 550.127.05
  • CUDA: 12.4

Describe the bug
When I set sapien.render.set_ray_tracing_denoiser("optix"), an error is displayed :
[2024-11-04 11:00:15.108] [svulkan2] [error] OptiX Error: OPTIX_ERROR_INVALID_VALUE
[2024-11-04 11:00:15.108] [svulkan2] [error] OptiX Error: OPTIX_ERROR_INVALID_VALUE
[2024-11-04 11:00:15.110] [svulkan2] [error] Failed to denoise OptiX Error: OPTIX_ERROR_INVALID_VALUE

But if I set 'none' or 'oidn', it can work.
I suspect that I may not have installed the NVIDIA OptiX SDK correctly, but I don't know how to install it to make SAPIEN work properly. For example, should I install it on the host or inside Docker? How should I set up a dynamic link library?
I need some help, can you help me? Look forward to your reply.

@fbxiang
Copy link
Collaborator

fbxiang commented Nov 4, 2024

OptiX SDK does not need to be installed.

Since you are building from source, I would assume there is something special about your system that cannot support x86 manylinux? Otherwise maybe you can reproduce on the released version.

Another option is to try oidn instead of OptiX. My experience is that oidn is often both higher quality and faster than optix. OptiX just had more features that we do not use anyway.

@fffffq99
Copy link
Author

fffffq99 commented Nov 5, 2024

Thank you. Now my problem has been solved.
At first, I ran the rt_mat.py in the documentation.
It was specified to use optix there, but since I couldn't use optix, I manually changed it to oidn. But only this result can be produced:
image
So I thought it was because oidn was not good enough, so I tried to figure out how to use optix. After your reply, I rechecked the code and found that this is a problem with the code:
rgb = im.fromarray((rgb * 255).astype(np.uint8))
Due to the absence of clip, this issue occurred, revise to:
rgb = im.fromarray((rgb * 255).clip(0, 255).astype(np.uint8))
This way, I can reproduce pretty results.
image

So, I think you should modify the rt_mat.py in the documentation to prevent others from experiencing this problem as well.

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

2 participants