44#define AI_VOLUME_INTERP_CLOSEST 0
45#define AI_VOLUME_INTERP_TRILINEAR 1
46#define AI_VOLUME_INTERP_TRICUBIC 2
59struct AtVolumeIntersectionInfo;
83 int requested_number_of_levels);
194 const AtVolumeIntersectionInfo* info,
213#define AI_VOLUME_NODE_EXPORT_METHODS(tag) \
214AI_INSTANCE_COMMON_SHAPE_METHODS \
221static AtVolumeNodeMethods ai_vol_mtds = { \
229static AtNodeMethods ai_node_mtds = { \
233const AtNodeMethods* tag = &ai_node_mtds;
235#define volume_create \
236static bool VolumeCreate(const AtNode* node, \
239#define volume_update \
240static bool VolumeUpdate(const AtNode* node, \
243#define volume_cleanup \
244static bool VolumeCleanup(const AtNode* node, \
247#define volume_ray_extents \
248static void VolumeRayExtents(const AtVolumeData* data, \
249 const AtVolumeIntersectionInfo* info, \
252 const AtVector* origin, \
253 const AtVector* direction, \
257#define volume_sample \
258static bool VolumeSample(const AtVolumeData* data, \
259 const AtString channel, \
260 const AtShaderGlobals* sg, \
262 AtParamValue *value, \
265#define volume_gradient \
266static bool VolumeGradient(const AtVolumeData* data, \
267 const AtString channel, \
268 const AtShaderGlobals* sg, \
Axis-aligned bounding box types and utilities.
Color types and utilities.
AtString class for fast comparisons.
Version number information and checking of backwards-compatibility.
Actual parameter value for each supported type.
Definition: ai_params.h:107
Arnold String allows for fast string comparisons.
Definition: ai_string.h:54
void * private_info
Volume plugin private data, used how the plugin likes.
Definition: ai_volume.h:54
AtVolumeCreate Create
This method is called to load/create a volume.
Definition: ai_volume.h:204
void(* AtVolumeRayExtents)(const AtVolumeData *data, const AtVolumeIntersectionInfo *info, uint16_t tid, float time, const AtVector *origin, const AtVector *direction, float t0, float t1)
Volume plugin method for submitting extents along a ray where there is data.
Definition: ai_volume.h:193
bool(* AtVolumeSample)(const AtVolumeData *data, const AtString channel, const AtShaderGlobals *sg, int interp, AtParamValue *value, uint8_t *type)
Volume plugin sample method.
Definition: ai_volume.h:138
AI_API AtArray * AiVolumeFileGetChannels(const char *filename)
Get list of channel names in a volume file.
Definition: ai_shader_volume.cpp:84
AtVolumeSample Sample
This method is called to sample a volume's named channel using a given point and interpolation.
Definition: ai_volume.h:208
AtVolumeCleanup Cleanup
This method is called to clean up a volume when it's no longer needed.
Definition: ai_volume.h:206
AI_API void AiVolumeAddIntersection(const AtVolumeIntersectionInfo *info, float t0, float t1)
Submit a ray interval/extent for volume integration.
Definition: ai_shader_volume.cpp:34
float auto_step_size
Recommended step size for ray marching through this data.
Definition: ai_volume.h:56
AtVolumeRayExtents RayExtents
This method is called to get all tightly-bounded extents along a ray where the volume exists.
Definition: ai_volume.h:207
AI_API void AiVolumeMergeIntersection(const AtVolumeIntersectionInfo *info, float t0, float t1, uint32_t prim_id)
Submit a ray interval/extent for volume integration.
Definition: ai_shader_volume.cpp:65
AI_API AtBBox AiVolumeFileGetBBox(const char *filename, const AtArray *channels)
Get bounding box for specified channels in a volume file.
Definition: ai_shader_volume.cpp:98
AtVolumeUpdate Update
This method is called to update a volume before render passes or on scene changes.
Definition: ai_volume.h:205
bool(* AtVolumeCreate)(const AtNode *node, AtVolumeData *data)
Volume plugin volume creation.
Definition: ai_volume.h:94
bool(* AtVolumeCleanup)(const AtNode *node, AtVolumeData *data)
Volume plugin volume cleanup method.
Definition: ai_volume.h:120
AI_API bool AiVolumeFileMakeLODs(const char *input_vdb, const char *output_vdb, int requested_number_of_levels)
Generate LOD (level of detail) OpenVDB grids into a new .vdb file.
Definition: ai_shader_volume.cpp:103
AtBBox bbox
Bounding box for this volume, plugin is responsible for also including volume_padding from the node.
Definition: ai_volume.h:55
bool(* AtVolumeUpdate)(const AtNode *node, AtVolumeData *data)
Volume plugin volume update.
Definition: ai_volume.h:108
AtVolumeGradient Gradient
This method is called to sample the gradient of a volume's named channel using a given point and inte...
Definition: ai_volume.h:209
bool(* AtVolumeGradient)(const AtVolumeData *data, const AtString channel, const AtShaderGlobals *sg, int interp, AtVector *gradient)
Volume plugin gradient method.
Definition: ai_volume.h:162
3D axis-aligned bounding box (uses single-precision)
Definition: ai_bbox.h:33
This represents a node in Arnold.
Shader globals data structure.
Definition: ai_shaderglobals.h:45
3D point (single precision)
Definition: ai_vector.h:30
Volume data, as returned by AtVolumeCreate.
Definition: ai_volume.h:53
Definition: ai_volume.h:203