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

Examples: Add EdgeSplitModifier #20535

Merged
merged 6 commits into from
Oct 27, 2020
Merged

Examples: Add EdgeSplitModifier #20535

merged 6 commits into from
Oct 27, 2020

Conversation

Mcgode
Copy link
Contributor

@Mcgode Mcgode commented Oct 20, 2020

About this feature

This geometry modifier allows the user to build an indexed BufferGeometry, where are split on sharp edges. This allows you to compute normals without smoothing the edges :

Without applying the modifier:
smoothShading

After applying the modifier:
edgeSplitSmooth

Very useful if you're importing a STL file.

How it's implemented

The feature was implemented as an example, using the same structure as the other modifiers.
It also features an example page, which includes a new binary STL model

Additional notes

The feature is also available as a standalone package:
https://github.com/Mcgode/three-js-edge-split-modifier

This contribution is funded by Dioxygen Software for Dualbox.com

@Mcgode Mcgode marked this pull request as ready for review October 20, 2020 12:22
@Mugen87
Copy link
Collaborator

Mugen87 commented Oct 20, 2020

Thanks for this but I think it's better to not add more modifiers to this repository. It is already large and hard to maintain. I vote to leave such specialized logic in separate repositories and npm packages. Unless there is really high demand for it.

@DefinitelyMaybe
Copy link
Contributor

I might save this one for later. if we ever open up a 'community-made-features' repo or something similar this would be a cool addition

@mrdoob
Copy link
Owner

mrdoob commented Oct 26, 2020

I actually like this!

@mrdoob
Copy link
Owner

mrdoob commented Oct 26, 2020

Where's roman_soldier.stl from though?

@mrdoob mrdoob added this to the r123 milestone Oct 26, 2020
@Mcgode
Copy link
Contributor Author

Mcgode commented Oct 27, 2020

roman_soldier.stl was a model I got from HeroForge some time ago. Thanks for asking since it's actually copyrighted and I shouldn't publish it here.

As a consequence I've removed the model from my git repo and switched to using the cerberus.obj model instead, giving this result :

Falt shaded:
flatShaded

Smooth shaded (no split):
image

Smooth shaded (with 20° split)
image

@mrdoob mrdoob changed the title Add EdgeSplitModifier Examples: Add EdgeSplitModifier Oct 27, 2020
@mrdoob mrdoob modified the milestones: r123, r122 Oct 27, 2020
@mrdoob mrdoob merged commit a62e7f1 into mrdoob:dev Oct 27, 2020
@mrdoob
Copy link
Owner

mrdoob commented Oct 27, 2020

Thanks!

@mrdoob
Copy link
Owner

mrdoob commented Oct 31, 2020

@Mcgode Do you think it would be possible to build a bevel modifier out of this modifier's code?

@Mcgode
Copy link
Contributor Author

Mcgode commented Nov 2, 2020

@Mcgode Do you think it would be possible to build a bevel modifier out of this modifier's code?

I think there's still a long way to go from my code to implement a bevel modifier.

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.

None yet

4 participants