Skip to content
This repository has been archived by the owner on Sep 16, 2023. It is now read-only.

Adaptive sculpting #9

Open
flufy3d opened this issue Aug 6, 2013 · 2 comments
Open

Adaptive sculpting #9

flufy3d opened this issue Aug 6, 2013 · 2 comments

Comments

@flufy3d
Copy link
Contributor

flufy3d commented Aug 6, 2013

use it with a mesh that already contains self-intersection will lead a crash.

@flufy3d
Copy link
Contributor Author

flufy3d commented Aug 6, 2013

seem it enter Infinite loop in function connect1RingCommonVertices

here is the call stack

Topology.connect1RingCommonVertices (adaptive.js:316)
Topology.vertexJoin (adaptive.js:219)
Topology.checkCollisions (adaptive.js:127)
Topology.adaptTopology (adaptive.js:37)
Sculpt.sculptMesh (sculpt.js:231)
Sculpt.sculptStroke (sculpt.js:119)
SculptGL.onMouseMove (sculptgl.js:456)
(anonymous function) (sculptgl.js:96)
x.event.dispatch (jquery-1.10.1.min.js:5)
v.handle (jquery-1.10.1.min.js:5)

@stephomi
Copy link
Owner

stephomi commented Aug 6, 2013

The method itselft can't handle self-intersection.
Even when there're no self-intersection, some weird stuffs can happen (just put the detail slider to 1.0 and do a lot of holes...).

A quick summary for this method is :

  1. each edges length must be in a certain interval ( min < x < max )
  2. when you sculpt the vertices you can only move them to a limited distance dist on each frame (dependent from min and max )
  3. that way you can prevent every self-intersection by checking the distance between the vertices and if it is closer than a certain thickness (dependent of min, max and dist, you can merge them)

Currently, I am not even sure that the first point is respected (because I sometimes smooth stuffs in the subdivision and decimation process).
The second point is not difficult...
And the third point... well... I don't know if it's work perfectly.

So in short, adaptive sculpting is by far the most difficult part to improve :D.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants