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: Updated external subdivision demo #24930

Merged
merged 5 commits into from
Nov 10, 2022
Merged

Conversation

stevinz
Copy link
Contributor

@stevinz stevinz commented Nov 10, 2022

Description

Updated demo to use latest version of three-subdivide (v1.1.2)

Updates to library include:

  • Use of params object to simplify calling
  • Improved position and normal processing
  • Support for morph targets (animation demo)
  • Support for geometry groups
  • preserveEdge parameter to enable preservation of mesh edges

Updates to three.js demo include:

  • Subdivided geometries benefit from new library version, see screenshot below.
  • Addition of lighting in scene and flatShading material property to help visualize normal processing.
  • Dynamic material generation to accommodate rebuilding of materials.
  • Fixed linting errors.

Live link:
https://raw.githack.com/stevinz/three.js/subdivide/examples/index.html?q=subdivision#webgl_modifier_subdivision

Screenshot: Position improvement
After (3) subdivisions, an icosahedron should resemble a sphere. Old version had noticeable, visible points.
subdivide

@Mugen87 Mugen87 added this to the r147 milestone Nov 10, 2022
@Mugen87 Mugen87 merged commit a392c8d into mrdoob:dev Nov 10, 2022
@stevinz stevinz deleted the subdivide branch November 10, 2022 18:36
@gpuido
Copy link

gpuido commented Oct 24, 2023

This is so underrated. Very cool. Any demo of preserveEdge and weights ?

@stevinz
Copy link
Contributor Author

stevinz commented Oct 24, 2023

@gpuido Thanks!

There is a more complete demo on the repo for this library. This demo includes additional geometries for visualizing the preserveEdge option, as well as a slider for adjusting the weight.

The preserveEdge option can be visualized best with:

  • Any 2D geometry (Circle, Plane, Ring, etc.)
  • The 3D TeapotGeometry, noticeably the openings of the handle and spout.

Also, feel free to post any subdivision specific questions or issues directly on the external library repo.

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.

5 participants