The big SDF thread

:date: Updated: December 27, 2024

:new: Recent changes…

:question: ‎SDF info

SDF stands for Signed Distance Fields, and is emerging as a flexible and powerful 3D modeling method. SDF floats in the realm of CSG 3D (Constructive Solid Geometry), and is sometimes also referred to as FRep. Traditionally, CSG is NURBS-based, which means you still need to take restrictive underlying surface structures into account, with the risk of failing Booleans, fillets, chamfers, et cetera. But SDF is based on mathematical distance functions, usually rendered as 3D volumes in shader space using ray-marching. The 3D paradigm closest to SDF is voxels, as SDF volumes are also grid-oriented.

SDF modeling workflow can be divided in two main categories:

  1. Live-primitive SDF modeling. This is a fully flexible, non-destructive workflow, allowing you to freely combine different primitive shapes (e.g. a cube, sphere, cylinder, capsule, et cetera). This SDF approach is comparable to NURBS / solids modeling, but all interactions between shapes are real-time and remain fully adjustable, such as Boolean operations, blending, coloring and shape adjustments. Also, Booleans, blends, fillets et cetera never fail, unlike some situations in NURBS / solids modeling.

  2. SDF sculpting. This approach doesn’t allow you to adjust primitives after combining them with a Boolean operation or blend, but it does allow you to freely sculpt (on) shapes, similar to 3D-Coat’s voxel sculpting, and comparable to polygonal sculpting with automatic voxel remeshing or dynamic topology generation.

SDF volumes can optionally be meshed (usually with embedded vertex colors, if paint is applied) using a volumetric grid projection algorithm such as OpenVDB, to make the result usable in mesh-based 3D editors like Blender.

Advantages of SDF compared to NURBS and polygons

  • No worries about topology / mesh structure.
  • Shape properties remain non-destructively adjustable, though only in the live-primitive approach.
  • Real-time blending of shapes and colors (remaining non-destructively adjustable in a live-primitive SDF workflow).
  • Real-time and never-failing Booleans, blends, fillets, chamfers, shells, insets and outsets (remaining non-destructively adjustable in a live-primitive SDF workflow).
  • Some techniques require relatively little extra computation, such as arrays and lots of instances.

Disadvantages of SDF compared to NURBS and polygons

  • Not very suitable for highly detailed single-part objects, because of the high grid resolution needed for that.
  • Not very suitable for objects featuring lots of thin, elongated parts with different angles, such as a radio tower, also because of the grid method limitations.

Here’s a nice explainer video about SDF tech:

:monkey_face:‎ SDF modeling in Blender

  • ConjureSDF add-on (Does not yet work in Blender 4.x or Blender for macOS)

  • Blob Fusion add-on (Works in Blender 4.x and in Blender for macOS)

  • SDF Prototyper add-on.

  • SD5 add-on (script-based, no GUI)

SDF Blender add-ons in development (not certain if there will be a public release)…

:butterfly:‎ MagicaCSG

MagicaCSG is a fast, versatile and user-friendly SDF-based 3D modeler and renderer for Windows, by the developer of MagicaVoxel…

This video showcases some SDF elements of a Teenage Mutant Ninja Turtle character model in MagicaCSG:

:arrow_right: More MagicaCSG demo videos by Metin

:hammer_and_wrench:‎ Other SDF modeling tools

:technologist: Procedural SDF graphics

  • Screamer (live-coding language for procedural SDF 3D art)
  • FUSE / VVVV (node-based visual programming that incorporates SDF)
  • SDFX (SDF-based CAD package written in Go, code-oriented)
  • Material Maker (Procedural SDF shape generation)…
    :arrow_right: EasySDF (gives you more control over Material Maker shapes)

:open_book: Technical reference

If you think something is missing or incorrect here, or if you discover a broken link, please let me know in a reply to this thread, and I’ll add or fix it. Thanks in advance.

37 Likes

It’d also be great if FK and IK could easily be assigned to a chain of elements.

1 Like

Very interesting! It looks like metaballs but it is much more precise in preserving the shapes. Some further refinement and it can be an excellent tool for modelling. :slightly_smiling_face:

4 Likes

This is interesting. What is this technique about? How does this compare to the sculpting we have now in Blender? Does it give better performance? What about sculpting small and medium or even micro details? Or is this in the conceptual stage like when using dynotopo, voxel remesher?

I also saw a vid of sdf used for texturing using very low res textures. Thats actually cool.

1 Like

Signed Distance Fields is a volumetric technique, similar to voxels and point clouds. Cinema 4D already includes it for a number of years, but their implementation starts to slow down as soon as a scene becomes a little complex.

This new editor looks very promising. Looking at the brilliance of the MagicaVoxel editor from the same developer, I’ve got high expectations of this new SDF editor. Love the speed and versatility of the implementation, including the automatic adoption of the material from an added or subtracted shape.

4 Likes

Good to know. Thanks for the explanation. Hoping to see sdf utilized in texturing as well.

2 Likes

Neat. Seem something like metaballs + booleans…

2 Likes

Looks like a nice toolset. Some of the work I’ve seen with his MagicaVoxel is quite brilliant. I’ve been having a lot of fun doing hard-surface in VR in Medium lately. I never really used voxels before in my workflow, but I would love to see SDF tech in Medium. Hard-Surface concepting/sketching in Medium(and voxels in general, with the right tools) has huge potential.

2 Likes

:+1:

I hope the new SDF editor (and a possible implementation in Medium and/or Blender) will also be useful for organic modeling. It should at least be useful for basemeshes, and cartoony / toy character models.

1 Like

Fast easy model creation without beeing a modeler, without using textures or UVs is getting more and more attention.

Already used in PS4 game Dreams and Unity Clayxel plugin.

Also possible to use Clayxels real time deformation in game, slower but lot better than PS4 Dreams characters without deformations rigging.

Easy modeling for anyone without needing to know modeling

Some shader modification and you can do many great effects

Two things this tool will need

  • model sub groups, be able to copy paste transform mirror those sub groups
  • convert to polygons and export to obj
    Otherwise the tool will be useless for games and real time related creations.
6 Likes

Nice, thanks! Going to check out Clayxels. I love such intuitive modeling methods.

ZBrush also recently added some brushes I really like, such as the Mesh Balloon brush:

Balloon people will use alot to very fast block out models very intuitively.
A must have.

Blender should get a similar tool.

1 Like

The old silhouette brush google summer of code project had a similar concept. The volumes it created weren’t as clean though. The student didn’t manage to complete it:

2 Likes

I guess Blender sculpt will have to get sort of ballon like quick bloc kout feature.

Let’s stay on track with signed distance field modeling :sweat_smile:

Modeling with primitive and signe distance fields matters if you can use that in 3D real time engine like PS4 game Dreams for example.

Otherwise for sculpting only why not using simple Voxels with sculpting tools instead ?
More powerfull and unlimited, no primitives constraint.

So voxels better than signed distance field, what advantage about using primitives only with signed distance field ?
When you can’t use that primitives modeling in a game engine like Clayxels or PS4 Dreams ?

I guess modeling with primitives and signed distance fields is perhaps faster block out, while allowing details, and lot more friendly for non modeler users and new comers to modeling.

3 Likes

twitter.com/MartinNebelong/status/1374474820134395909

PS4 realtime graphics no polygons.

Poly gone

:joy:

2 Likes

Interesting, but in the end it will still be internally converted to polygons, or not? Like NURBS: infinitely smooth surfaces, but they need to be meshed, and quad-polygons still exist of triangles underneath the surface.

2 Likes

Yes, all those Medium videos Ratchet linked are concept sketches. Medium is so good for this sort of work.

2 Likes

Thats not balloon brushes, thats a stolen teddy. :grin: :wink:

https://www-ui.is.s.u-tokyo.ac.jp/~takeo/teddy/teddy.htm

In this case rather not, and generally the answer may often be also no, there exist different rendering approaches for datastructures or surfacedescriptions, having the nurbs definition and deciding how you render them could be done in different ways. Dreams is utilizing pointclouds and point cloud rendering may again fall back to rendering polygons, but that is not the case here as far as I know. Its just a multistepped pure point cloud rendering. Including subclouds for parts near to the camera. Generally, there very well different rendering approaches possible, that don’t really rely on triangles for rendering, metaballs for example should not get confused with blenders metaball meshes, they can be completely rendered without utilizing triangles.

2 Likes

Haha, yeah, it was also already in MS-Paint 3D for years. I’ve always regretted that Teddy was never developed beyond the initial stages.

Interesting, thanks!

1 Like

Out of curiosity, would SDFs for Blender be useful for artists (and how)?

1 Like