Skip to content

Conversation

@Mcgode
Copy link
Contributor

@Mcgode Mcgode commented Dec 18, 2020

Description

As of right now, when using this modifier, you lose all the normals of the geometry you used as input. This is due to the fact that splitting invalidates the previous normals. Right now, you need to recompute the normals using computeVertexNormals().
However, not all normals should be invalidated, and you might want to try and keep their previous values as much as possible, especially if they don't correspond to their computed counterparts.

This PR adds a new parameter to EdgeSplitModifier.modify named tryKeepNormals. When it is set to true, and you provided an indexed geometry with normals, it will keep the normals values for vertices that weren't split by the modifier.

First image is with computed vertices (tryKeepNormals = false), second one has tryKeepNormals set to true:
image
image

Note
This PR is a branch of #20855

This contribution is funded by Dualbox.

@mrdoob mrdoob added this to the r124 milestone Dec 21, 2020
@mrdoob mrdoob merged commit ecf862c into mrdoob:dev Dec 21, 2020
@mrdoob
Copy link
Owner

mrdoob commented Dec 21, 2020

Thanks!

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

Successfully merging this pull request may close these issues.

2 participants