9
$\begingroup$

I can easily make models by Modeling with Distance Functions but I need make mesh from It so I decide to use voxelizing and make triangles for my signed distance field torus like this video.but I haven't Idea that how can I do this. you can see this torus on my github.

torus


Update

Snail IQ

Snail SDF

I found a software as SDF Mesher.this is what I want but not released.

aiekick instagram, aiekick twitter

he converted shader to mesh?! how could be Implemented!?

aiekick sketchfab


In short I need a way to convert sdf to mesh.for example this:

Input : SDF Model

Output : Mesh

$\endgroup$
5
  • 3
    $\begingroup$ An easier to implement algorithm would be Marching Cubes. Though it would produce worse results than dual contouring for a torus. It would likely be easier to understand dual contouring after implementing marching cubes. Or use one of the thousand implementations of it in libraries like VTK or CGAL. Also marching cubes is easily understood in 2d (called marching squares). $\endgroup$ Commented Apr 15, 2018 at 22:53
  • $\begingroup$ @AndrewWilson yeah that's right marching cubes Is solution but I haven't Idea to Implement this algorithm In Raymarching $\endgroup$ Commented Apr 16, 2018 at 4:38
  • $\begingroup$ Oh, I think I get what you mean now. But ray marching is completely unrelated to the generation and usage of the polygon. Marching cubes produces a polygon from a 3d image (voxel grid/scalar field). You should create a 3d image of a resolution you want and evaluate the signed distance function at every point in the image to create a signed distance field. Then use 0 as your threshold (ie surface is at 0). $\endgroup$ Commented Apr 16, 2018 at 5:09
  • $\begingroup$ @AndrewWilson thanks can you tell me how Aiekick Implemented Sdf to mesh? $\endgroup$ Commented Apr 16, 2018 at 5:13
  • $\begingroup$ @AndrewWilson please see this video sdf generated by 2D plane?! $\endgroup$ Commented Apr 16, 2018 at 5:19

2 Answers 2

3
$\begingroup$

with CGAL you can generate mesh by implicit function. https://doc.cgal.org/latest/Mesh_3/index.html

Search for "implicit". There is an example of generating meshes from the funciton of a sphere.

$\endgroup$
1
  • $\begingroup$ I don't need this.what I want Is a scanner that scan my Raymarching objects then create the mesh from It. $\endgroup$ Commented Apr 16, 2018 at 5:28
2
$\begingroup$

After many research I figured out how it works:

he defined three buffer in glsl and i get 3 sampler2D for multipass, in each fbo attachments. the params are (buffer : file : id) file is the targeted shader, here we want the current so no file. id is the fbo attachment (0 to 7). Result

then he could make the mesh easily:

SDF Mesher

$\endgroup$
4
  • $\begingroup$ What software is this? Is it available right now? $\endgroup$ Commented Sep 12, 2018 at 2:35
  • $\begingroup$ @user2153553 this software is made by person in twitter I don't know Is it available right now but you can ask more about this software $\endgroup$ Commented Sep 12, 2018 at 7:28
  • $\begingroup$ Yes I actually have been following that guy also, he said it's coming soon. $\endgroup$ Commented Sep 13, 2018 at 0:10
  • $\begingroup$ really interesting software indeed, it seems the author will be selling it on steam $\endgroup$
    – user4801
    Commented Jun 19, 2019 at 8:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.