Files
test2/source/blender/geometry/GEO_points_to_volume.hh
Hans Goudey bea33a6be9 Geometry Nodes: Add volume grid creation nodes
Add three nodes to the currently experimental volume grid nodes:
- **Mesh to Density Grid**
- **Mesh to SDF Grid**
- **Points to SDF Grid**

These nodes are just wrappers over basic OpenVDB utilities.
The difference from existing volume nodes is that they output
a grid directly instead of a geometry set.

See the design here: https://devtalk.blender.org/t/volumes-in-geometry-nodes-proposal/31917

Pull Request: https://projects.blender.org/blender/blender/pulls/118761
2024-02-28 22:15:10 +01:00

37 lines
1.0 KiB
C++

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