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

depth map #340

Closed
umyta opened this issue Mar 6, 2019 · 2 comments
Closed

depth map #340

umyta opened this issue Mar 6, 2019 · 2 comments

Comments

@umyta
Copy link

umyta commented Mar 6, 2019

Hi, this is more of an inquiry than an issue. Is there a way to save a depth map of the rendered object? Any help would be much appreciated!

@mikedh
Copy link
Owner

mikedh commented Mar 12, 2019

Hey, there's probably a way to do this via pyglet, although I might suggest checking out pyrender, it's a much more complete rendering endpoint than trimesh.viewer.windowed.

That being said, you can also do this using ray tests, and with pyembree installed it's not even that slow (600K+ rays per second). I added an example which produces images that look like this:

depth

@umyta
Copy link
Author

umyta commented Mar 12, 2019

Thank you so much for the answer. This is very helpful!

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