This repository has been archived on 2023-10-09. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
blender-archive/source/blender/geometry/GEO_points_to_volume.hh
Erik Abrahamsson 4b30b5c57f Nodes: SDF Volume nodes milestone 1
Geometry Nodes: SDF Volume nodes milestone 1

Adds initial support for SDF volume creation and manipulation.
`SDF volume` is Blender's name of an OpenVDB grid of type Level Set.
See the discussion about naming in #91668.

The new nodes are:
- Mesh to SDF Volume: Converts a mesh to an SDF Volume
- Points to SDF Volume: Converts points to an SDF Volume
- Mean Filter SDF Volume: Applies a Mean Filter to an SDF
- Offset SDF Volume: Applies an offset to an SDF
- SDF Volume Sphere: Creates an SDF Volume in the shape of a sphere

For now an experimental option `New Volume Nodes` needs to be
enabled in Blender preferences for the nodes to be visible.

See the current work plan for Volume Nodes in #103248.

Pull Request: blender/blender#105090
2023-03-19 11:21:08 +01:00

41 lines
1.2 KiB
C++

/* SPDX-License-Identifier: GPL-2.0-or-later */
#include "BLI_function_ref.hh"
#include "BLI_math_matrix_types.hh"
#include "BLI_string_ref.hh"
#include "DNA_modifier_types.h"
#pragma once
struct Volume;
struct VolumeGrid;
/** \file
* \ingroup geo
*/
namespace blender::geometry {
#ifdef WITH_OPENVDB
/**
* Add a new fog VolumeGrid to the Volume by converting the supplied points.
*/
VolumeGrid *fog_volume_grid_add_from_points(Volume *volume,
StringRefNull name,
Span<float3> positions,
Span<float> radii,
float voxel_size,
float density);
/**
* Add a new SDF VolumeGrid to the Volume by converting the supplied points.
*/
VolumeGrid *sdf_volume_grid_add_from_points(Volume *volume,
StringRefNull name,
Span<float3> positions,
Span<float> radii,
float voxel_size);
#endif
} // namespace blender::geometry