warp.volume_sample_i#

warp.volume_sample_i(id: uint64, uvw: vec3f) int#
  • Kernel

  • Python

Sample the warp.int32 volume given by id at the index-space point uvw.

Integer volumes only support nearest-voxel sampling, so there is no sampling_mode argument (warp.Volume.CLOSEST is always used) and the result is not differentiable. uvw is in index space (voxel coordinates) and may be fractional; it is rounded to the nearest voxel, with halfway cases rounded away from zero. Sampling uses the resolved NanoVDB value (see volume_sample()), and the result is 0 if id is not an int32 volume.

See volume_sample() for a usage example.