Skip to content

Examples: Add Sculpt addon based on SculptGL#33164

Draft
mrdoob wants to merge 13 commits intodevfrom
sculpt
Draft

Examples: Add Sculpt addon based on SculptGL#33164
mrdoob wants to merge 13 commits intodevfrom
sculpt

Conversation

@mrdoob
Copy link
Owner

@mrdoob mrdoob commented Mar 13, 2026

Description

  • Adds a sculpting addon ported from SculptGL by Stéphane Ginier
  • Dynamic topology (subdivision + decimation) automatically adds/removes detail during brush strokes
  • 8 tools: Brush, Inflate, Smooth, Flatten, Pinch, Crease, Drag, Scale

Modules

  • examples/jsm/sculpt/Sculpt.js — main class, event handling, picking, geometry sync
  • examples/jsm/sculpt/SculptMesh.js — internal mesh data, octree, topology
  • examples/jsm/sculpt/SculptTools.js — tool implementations, subdivision, decimation
  • examples/jsm/sculpt/SculptUtils.js — math and array utilities

Examples

https://raw.githack.com/mrdoob/three.js/sculpt/examples/webgl_sculpt.html
https://raw.githack.com/mrdoob/three.js/sculpt/examples/webxr_xr_sculpt.html

Screen.Recording.2026-03-13.at.12.32.51.mov

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@mrdoob mrdoob added this to the r184 milestone Mar 13, 2026
mrdoob and others added 3 commits March 13, 2026 14:16
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@arodic
Copy link
Contributor

arodic commented Mar 13, 2026

When I try using the "decimation" feature it appears as triangles are getting merged incorrectly.

Edit. The surface actually looks ok only the wireframe gets corrupted. Perhaps this is related to #32903 wireframe caching @Mugen87

Screenshot 2026-03-13 at 9 40 18 AM

@mrdoob
Copy link
Owner Author

mrdoob commented Mar 13, 2026

Just removed the decimation code 😇

@mrdoob
Copy link
Owner Author

mrdoob commented Mar 13, 2026

Seems like the issue was wireframe caching indeed.

mrdoob and others added 8 commits March 13, 2026 20:39
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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