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

Retrieve visible vertices #32

Closed
vladsterz opened this issue May 21, 2019 · 3 comments
Closed

Retrieve visible vertices #32

vladsterz opened this issue May 21, 2019 · 3 comments

Comments

@vladsterz
Copy link

Not really an issue, more of a question. Is there a way to retrieve the visible from a given viewpoint vertices?

@krips89
Copy link

krips89 commented Jan 21, 2020

Solution?

@vladsterz
Copy link
Author

Hey. If I remember correctly I was only to find visible faces.

@welch
Copy link

welch commented Jul 11, 2020

late to the party, but here's how to get visible vertex indices from an opendr renderer
(any of the derived renderer classes should work for this):

def visible_vidxs(rn):
    """given renderer rn, return a list of visible vertex indices"""
    visible_fidxs = np.unique(rn.visibility_image[rn.visibility_image != 4294967295])
    visible_vidxs = np.unique(rn.f[visible_fidxs].ravel())
    return visible_vidxs

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

3 participants