-
Notifications
You must be signed in to change notification settings - Fork 10
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
Would generate outline normals differently works for non-manifold meshes? #46
Comments
I suppose, that:
Would work too (with the Should I continue experimenting with this? If I end up with a additional fn that does what |
Have you seen the alternative outline normal generation code described in this comment: #12 (comment) |
I saw it quite a long time ago. I do not understand all of it (yet) and it is not working for existing meshes (it only works while building a mesh fro scratch). And also only for mesh with indices for the faces and without any vertex attributes beside positions and normals. I also saw that for each vertex, it creates 8 new vertices and 12 new faces which is not acceptable for my use case. Anyway, when I have more time I will try this code with my use case and make it so that it works with existing mesh and other vertex attribute. But I have another code that add vertices and generate normals for non-manifold meshes that works much more economically (adding just a few vertex, creating just a few faces and working for meshes with other attributes). I will publish both of those code (mine and the one existing but modified to work with real use cases) on gist when this is done and the code cleaned-up and optimized a bit. Anyway. If adding a generic solution for this mesh modification and normal generation, for non-manifold meshes, is not acceptable for this plugin. I understand and this can easily be added with code in the project using this plugin. So it does not require to modify the code of this plugin. Although a including a generic solution easier to find for the people having this issue would be nice. However, for the non-manifold meshes (using a material with no backface culling) to have their outline visible when view from the backside, do require a modification to this plugin's code. |
I am using this plugin to outline the selected objects in an editor like application. One of the issue I have is with non-manifold meshes (meshes where all the edges are not part of exactly 2 faces). I saw a related issue regarding "flat" meshes for which I assume the issue is the same, and I am not concerned with the case where edges are part of more than 2 faces. The "solutions" I saw were to add "dummy/degenerate" triangles to force the calculation of "outline normals" to produce different normals. But this would not work for me (or at least I do not think so).
My question is the following:
If I implement a function that does more of less the same thing as
generate_outline_normals
(at a bigger performance cost) but that generate normals pointing "outwards" for vertices that are part of the non-manifold edges. By "outward", I mean perpendicular to the edge, but tangent to the face (instead of normal) but pointing in the opposite direction of the face. And averaging those normals, for vertices that are part of more than one edge. Would this work without having to modify the mesh?The text was updated successfully, but these errors were encountered: