18 .supported_type(GeometryComponent::Type::Mesh)
19 .
description(
"Mesh whose inner volume is converted to a signed distance field grid");
29 .
description(
"Width of the active voxel surface, in voxels");
30 b.add_output<
decl::Float>(
"SDF Grid").structure_type(StructureType::Grid);
38 if (!mesh || mesh->faces_num == 0) {
39 params.set_default_remaining_outputs();
43 mesh->vert_positions(),
46 params.extract_input<
float>(
"Voxel Size"),
47 std::max(1,
params.extract_input<
int>(
"Band Width")));
49 params.set_default_remaining_outputs();
52 params.set_output(
"SDF Grid", std::move(grid));
63 ntype.
ui_name =
"Mesh to SDF Grid";
64 ntype.
ui_description =
"Create a signed distance volume grid from a mesh";
#define NODE_CLASS_GEOMETRY
#define GEO_NODE_MESH_TO_SDF_GRID
#define NOD_REGISTER_NODE(REGISTER_FUNC)
void node_register_type(bNodeType &ntype)
static void node_geo_exec(GeoNodeExecParams params)
static void node_declare(NodeDeclarationBuilder &b)
static void node_register()
void node_geo_exec_with_missing_openvdb(GeoNodeExecParams ¶ms)
void geo_node_type_base(blender::bke::bNodeType *ntype, std::string idname, const std::optional< int16_t > legacy_type)
const Mesh * get_mesh() const
std::string ui_description
NodeGeometryExecFunction geometry_node_execute
const char * enum_name_legacy
NodeDeclareFunction declare