-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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
Add SDFGeometryGenerator
addon.
#26837
Conversation
- Remove extends Buffergeometry - Replace logs by error - Added option for more res if device supports 32k texture - Remove unused properties
Just a couple thoughts while passing through -
Overall surface nets look cool, though - I hadn't heard of them before! |
@gkjohnson thanks for your input. ty! |
I didn't intend to suggest using MarchingCubes - just that the APIs between the two classes should (some day) be the same since they aim to solve the same problem. I think that can be skipped in this PR.
This one. Ideally the code is formatted the same as the original source so it's easy to diff and update if needed. It will also need to be adjusted to support js exports. |
@gkjohnson moved the surfaceNets script onto jsm/libs |
Improve code style.
Remove `maxTexSize` property.
Improve doc page.
@santi-grau I've went over the code to improve the code style and to simplify the example at a few places. The most important thing for me was to avoid custom material shaders in |
@santi-grau The PR looks in general good to me. The only thing that might be a problem is that the example relies on custom GLSL code. This dependency will make it harder to migrate the demo to Would you be okay to add just the Mandelbrot shader and remove the two others? The head and Suzanne shader are so large that rewriting the code to something else will be quite time-consuming. |
Sure, will update! |
Remove large glsl examples Take screenshot
Updated the example removing those two shaders. |
More clean up.
Clean up.
Use `dispose()` methods.
Avoid using textarea.
Improve code style.
Fix memory leak.
@santi-grau While improving the example, I have noticed |
I've realized the rendering performance of Would you be willing to give this implementation a try? |
Simplify usage of `setIndex()`.
Didn't know we had to manually dispose. Thanks for adding! |
The reason why I'm using 'tile rendering' is to prevent crashes in case the SDF function gets too complex ( e.g. fbm ). This way, no matter what, we are just computing a specific tile size. If you still think that instance rendering will still be safe and more efficient I can try to implement it. |
I see. In this case, I think it's okay to start with the current implemented approach. If users report performance issues, we can revisit this topic (and maybe think about different rendering modes). |
New Addon
Description
Creates a THREE.BufferGeometry from an SDF.
Added example and documentation