Comments (10)
I've been reading this book.
from sdfx.
Like a LOD algo ? Level of detail.
It's been used in games for years based on distance.
Are you proposing to do it based on curve radius per object ?
It would be very useful to allow the LOD to be driven changed at runtime based off distance too as it would make a 3d viewer very efficient
from sdfx.
Not so much LoD. More like minimizing the number of triangles needed to represent the local detail of the object. Marching cubes samples the bounding box and generates triangles whose size matches the sampling resolution. As a result even planar surfaces end up with lots of little triangles. Those surfaces would be more efficiently represented with a few large triangles. The CGAL project has code that can deal with kind of thing. E.g. https://doc.cgal.org/latest/Surface_mesher/index.html#Chapter_3D_Surface_Mesh_Generation
from sdfx.
I have been again playing with this to use with a Milling machine.
Regarding the mesh generation and sharp edges, has there been any movements or thought on this.
The reason i ask is not just because of the tessellation problem on sharp edges.
The other reason is because i want to build in the ability to manually push and pull the mesh in a GUI.
This is basically where you want to do manual adjustments for more organic looking shapes.
from sdfx.
No code written - thinking about it on and off. It's a well recognized problem when it comes to representing objects with meshes. There are solutions out there that just remove triangles selectively from a given mesh. The difference here is that the triangle tuning can be done with on-going knowledge of the SDF, thereby leading to a more accurate mesh. BTW - when it comes to 3d printing the STL file I haven't had any problem with the corner aliasing - it's too small to make a difference- so it's mostly an annoyance in the mesh viewer. I'm sure the slicer would work faster if it wasn't dealing with so many triangles, but it hasn't been an insurmountable problem, and the output gcode will be roughly the same irrespective of the input mesh size. I assume the milling machine experience would be about the same.
from sdfx.
do manual adjustments for more organic looking shapes
That might be easier if you have lot's of triangles on a surface to start off with - which is what you have here.
from sdfx.
from sdfx.
found this !
https://github.com/g3n/engine
All golang 3D gui viewer. I think i can use this as a canvas and load up the STL's into it to do the pushing and pulling.
Its nice to see this type of 3D stuff in the golang world.
from sdfx.
https://github.com/danieltwagner/sdfx/tree/simplify has a WIP mesh simplification algorithm. The idea is to not lose any details, i.e. only reduce coplanar triangles. It's mostly working but I must be generating a few triangles with bogus normals (maybe zero-size triangles?). I'll try to sort out the issue and tidy it all up and then put it up as a PR but would appreciate another pair of eyes.
I attach an example below. You can see that a few wireframe lines are visible in the wrong orientation and as a result the interior cutout doesn't appear smooth.
from sdfx.
I haven't had a chance to review your code yet...
I saw this and thought it was of interest:
Based on: https://www.cs.cmu.edu/~garland/thesis/thesis.html
Also: There are (at least) two approaches to this:
- Use marching cubes to build a fine triangle mesh and then simplify the mesh.
- Use something other than marching cubes to perform adaptive sampling that does a better job of the features with high spatial frequencies. ie get rid of the aliasing that is present on corners/edges.
Approach 2 is possible, we have an SDF model that can be sampled wherever we like, it's just a bit beyond my sophisication at the moment. :-)
from sdfx.
Related Issues (20)
- md5sum regression HOT 10
- I've added sdfx to curated-code-cad HOT 7
- Support displacement HOT 1
- Rounded union results in a bump and a missing face HOT 4
- More exports in rendering code or better save functions HOT 6
- Zero length line segments ruin Polygon2D objects HOT 1
- obj/screw.go: NPT thread HOT 2
- Redesigning Vec family API HOT 8
- Removing returned errors from shape generation functions HOT 10
- Request to add pointer to `sdf` project HOT 2
- Hollow out 3D meshes by this tool? HOT 3
- Bolts smaller than expected HOT 3
- Threads on package import HOT 4
- Gyroid shape HOT 1
- Feature Request: Extract Vertex Data to an Array HOT 2
- Pack models together tightly HOT 3
- How to duplicate SDF? HOT 5
- How to check if intersection is empty or not HOT 7
- Time consumption of marching cubes algorithm HOT 1
- Initialize a 4x4 matrix i.e. `sdf.M44` HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sdfx.