Is your feature request related to a problem? Please describe.
There's undoubtedly many different ways to implement in-game modeling, however I'm not sure if Signed Distance Functions (SDFs) have been discussed as a way of doing intuitive modeling.
Here are some example applications which utilize the technique:
Metaballs are somewhat related, however I would consider generalized SDFs to be a better alternative due to their flexibility.
Describe the solution you'd like
I am mainly basing my approach to this by what I've used so far.
What would be nice is if there were a sort of "SDF domain" component which is a procedural mesh that defines the area where SDFs are generated into mesh. You specify the resolution (x,y,z steps) and dimensions of the domain (bounds) and any other SDF primitives you place within those boundaries are computed and turned into a final mesh.
Some basic SDF primitives:
Sphere
Cube (rounded/sharp)
Capsule
Cylinder (rounded/sharp)
Torus (capped/uncapped)
Cone (rounded/sharp)
Pyramid (rounded/sharp)
Tetrahedron (rounded/sharp)
Dodecahedron (rounded/sharp)
Icosahedron (rounded/sharp)
Plane (infinite for slicing)
Some basic SDF operations:
Union
Difference
Intersection
Additional SDF operations:
Elongation
Extrusion
Revolution
Bend deformation
Twist deformation
Modulus (infinite repetition)
Shell
Mesh to SDF
Image to SDF
With each of the combine operations (Union/Difference/Intersection), you can also specify the "softness" of that operation, effectively allowing for smooth transitions. Some implementation details: https://iquilezles.org/articles/distfunctions/
The individual primitives could be additionally colored and the colors blended via the smoothing functions, applying those colors per vertex in the final mesh.
What might be difficult is determining the grouping of operations which would require some sort of hierarchical data structure exposed to the user (or alternatively, possibly a lot of stacked slots). In Blender's geometry nodes for example, the SDF operations only operate on 2 SDFs at a time, and are chained linearly in a graph. In other editing software, SDFs are organized into groups or layers which operate on other layers.
Describe alternatives you've considered
There are no in-game solutions to this at the moment. Current in-game modeling is limited to primitives which do not smoothly transition between each other, limiting modeling to fairly blocky shapes that are additive only in nature. SDFs would alleviate this, allowing for Union, Difference, and Intersection, smoothing or creasing of edges to go from organic shapes to sharp hard surface models.
Is your feature request related to a problem? Please describe.
There's undoubtedly many different ways to implement in-game modeling, however I'm not sure if Signed Distance Functions (SDFs) have been discussed as a way of doing intuitive modeling.
Here are some example applications which utilize the technique:
https://www.womp.com/ https://github.com/fogleman/sdf https://blenderartists.org/t/geometry-nodes-in-3-3-sdf-presets/1387929 http://ephtracy.github.io/index.html?page=magicacsg
Relevant issues
Related:
2234
Metaballs are somewhat related, however I would consider generalized SDFs to be a better alternative due to their flexibility.
Describe the solution you'd like
I am mainly basing my approach to this by what I've used so far.
What would be nice is if there were a sort of "SDF domain" component which is a procedural mesh that defines the area where SDFs are generated into mesh. You specify the resolution (x,y,z steps) and dimensions of the domain (bounds) and any other SDF primitives you place within those boundaries are computed and turned into a final mesh.
Some basic SDF primitives:
Some basic SDF operations:
Additional SDF operations:
With each of the combine operations (Union/Difference/Intersection), you can also specify the "softness" of that operation, effectively allowing for smooth transitions. Some implementation details: https://iquilezles.org/articles/distfunctions/
The individual primitives could be additionally colored and the colors blended via the smoothing functions, applying those colors per vertex in the final mesh.
What might be difficult is determining the grouping of operations which would require some sort of hierarchical data structure exposed to the user (or alternatively, possibly a lot of stacked slots). In Blender's geometry nodes for example, the SDF operations only operate on 2 SDFs at a time, and are chained linearly in a graph. In other editing software, SDFs are organized into groups or layers which operate on other layers.
Describe alternatives you've considered
There are no in-game solutions to this at the moment. Current in-game modeling is limited to primitives which do not smoothly transition between each other, limiting modeling to fairly blocky shapes that are additive only in nature. SDFs would alleviate this, allowing for Union, Difference, and Intersection, smoothing or creasing of edges to go from organic shapes to sharp hard surface models.
Additional context
No response