From 97c5d6a17423f5f446dde12aa2fc5e5b3f14187f Mon Sep 17 00:00:00 2001 From: Kevin Griffin Date: Mon, 24 Apr 2023 19:42:15 -0700 Subject: [PATCH 1/2] Resolves #69 add 2D transfer functions and update Volume object type --- chapters/object_types.txt | 9 +++++++++ chapters/object_types/volumes.txt | 30 ++++++++++++++++++------------ 2 files changed, 27 insertions(+), 12 deletions(-) diff --git a/chapters/object_types.txt b/chapters/object_types.txt index fd4c1be..6a07034 100644 --- a/chapters/object_types.txt +++ b/chapters/object_types.txt @@ -53,6 +53,15 @@ Feature support information can be queried as properties on the `ANARIRenderer` |=================================================================================================== +Feature: `KHR_RENDERER_VOLUME_METHOD` + +.Parameters understood by renderers with feature `KHR_RENDERER_VOLUME_METHOD`. +[cols="<,<,>,<3",options="header,unbreakable"] +|=================================================================================================== +| Name | Type | Default | Description +| method |`STRING`| raycast | the volume rendering technique, possible values: raycast, splatting, shear-warp, texture +|=================================================================================================== + Feature: `KHR_RENDERER_BACKGROUND_COLOR` .Parameters understood by renderers with feature `KHR_RENDERER_BACKGROUND_COLOR`. diff --git a/chapters/object_types/volumes.txt b/chapters/object_types/volumes.txt index 921d886..cd1a340 100644 --- a/chapters/object_types/volumes.txt +++ b/chapters/object_types/volumes.txt @@ -6,23 +6,17 @@ === Volume Volumes in ANARI represent volumetric objects (complementing <>), encapsulating spatial data as well as appearance information. To -create a new volume object of given subtype `subtype` use +surfaces>>) and take a <> which defines the +spatial representation. The <> defines the volume rendering method used for +the volume (e.g., ray casting/marching, splatting, shear warp, texture/image-based). +Volumes are created with [source,cpp] .... -ANARIVolume anariNewVolume(ANARIDevice, const char *subtype); +ANARIVolume anariNewVolume(ANARIDevice); .... -[[object_types_volume_scivis]] -==== Scivis - -Feature: `KHR_VOLUME_SCIVIS` - -The scivis volume is created by passing the subtype string `scivis` to -`anariNewVolume`. It supports the folowing parameter: - -.Parameters understood by the scivis volume. +.Parameters understood by Volume. [cols="<3,<3,>2,<9",options="header,unbreakable"] |=================================================================================================== | Name | Type | Default | Description @@ -34,6 +28,7 @@ The scivis volume is created by passing the subtype string `scivis` to | opacity.position |`ARRAY1D` of `FLOAT32`| | optional array to position the elements of `opacity` values in `valueRange` | densityScale |`FLOAT32` | 1 | makes volumes uniformly thinner or thicker | id |`UINT32` | -1u | optional user Id, for <> channel `objectId` +| material |`MATERIAL` | | optional <> to handle volumetric effects like scattering |=================================================================================================== The `color` and the `opacity` array map values sampled in `field` @@ -61,3 +56,14 @@ representing the color/opacity of the lowest value in `valueRange`, and the last element representing the color/opacity of the last element in `valueRange`. +Feature: `KHR_VOLUME_TF2D`: The 2D transfer function look-up table defined by `tf2d` uses field +values for the columns and gradient magnitude for the rows. + +.Additional parameters accepted by the volume with feature `KHR_VOLUME_TF2D`. +[cols="<3,<3,>2,<9",options="header,unbreakable"] +|=================================================================================================== +| Name | Type | Default | Description +| gradient |`ARRAY1D` of `FLOAT32` | | optional array to map gradient magnitude to an opacity multiplier +| tf2d |`Sampler` with subtype `image2D` | | optional 2D image sampler for defining the 2D transfer function look-up table +|=================================================================================================== + From 04404766da70da0747e1872542924ea213cdd05d Mon Sep 17 00:00:00 2001 From: Kevin Griffin Date: Mon, 24 Apr 2023 20:11:15 -0700 Subject: [PATCH 2/2] Fixed incorrect array type for gradient --- chapters/object_types/volumes.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chapters/object_types/volumes.txt b/chapters/object_types/volumes.txt index cd1a340..a7fb502 100644 --- a/chapters/object_types/volumes.txt +++ b/chapters/object_types/volumes.txt @@ -63,7 +63,7 @@ values for the columns and gradient magnitude for the rows. [cols="<3,<3,>2,<9",options="header,unbreakable"] |=================================================================================================== | Name | Type | Default | Description -| gradient |`ARRAY1D` of `FLOAT32` | | optional array to map gradient magnitude to an opacity multiplier +| gradient |`ARRAY1D` of `FLOAT32_VEC2` | | optional array to map gradient magnitude to an opacity multiplier | tf2d |`Sampler` with subtype `image2D` | | optional 2D image sampler for defining the 2D transfer function look-up table |===================================================================================================