-
Notifications
You must be signed in to change notification settings - Fork 54
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
Vertex normal for triangle strip #64
Labels
Comments
You could reconstruct a |
Thanks! Can you please check #66 if the solution is efficient? Is there a better way to do this using numpy? |
I think this should work: zipped = np.array([indices[:-2], indices[1:-1], indices[2:]])
modified_index = zipped[:, ~np.any(zipped == -1, axis=0)].T |
Thanks! The primitive restart index will be a parameter. But the default will be |
The numpy version should be faster, particularly for very large indices. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I was wondering if I could generate vertex normals for triangle strips.
Currently
generate_vertex_normals
works fine for indexed triangles but I would like to use this feature on triangle strips.Generating normals for triangle strips may require support for Primitive Restart Index
Here is an example of a surface using triangle strips and primitive restart index.
I could make a PR to implement this feature.
Do we need support for this in Pyrr?
The text was updated successfully, but these errors were encountered: