-
Notifications
You must be signed in to change notification settings - Fork 247
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
[FEATURE] - Generate proper Normals and Tangents from the original mesh #4
Comments
This would be very useful. Currently when you slice a mesh it loses all the vertex normal data which gives it a faceted look. It makes it pretty jarring when you slice a mesh with carefully crafted smooth groups and it becomes faceted. |
Greetings, Latest changes to commit 1b5ff49 has added Normal and Tangent interpolation via Barycentric coordinates. Slicing Meshes will now look at all UV, Normal and Tangent spaces for the Mesh. Please let me know if any bugs arise. I will close this feature. |
I found a small problem. If you try and cut the mesh and only a lower hull is generated due to the mesh being completely on the backside of the plane, it throws an out of range error due to SlicedSubmesh.hasUV trying to access upperHull[0].hasUV on an empty list. Other than that it seems to work very well! |
Greetings, Thank you for the bug report. I've fixed the problem in commit a00983b. I really need to setup some more testing scripts to catch all these cases! |
I believe I've found another small problem. If you apply a material with a normal map to a cut face it goes completely black. I think the tangents on the cut face are not set. |
Thank you for letting me know, I'll take a look shortly. |
Greetings, Thank you for your patience. This should be fixed as of commit 45c8363. |
A recent feature request to generate normals and tangents from the original mesh which is being sliced. From observation it seems the final cut meshes do not render properly, this is due to using Mesh.RegenerateNormals() which is too generic.
The text was updated successfully, but these errors were encountered: