Scalar Volume From File
Reads the grids of an OpenVDB file as scalar volumes, with the voxel size and the position that the file holds. A remark names each grid that gives no volume, such as a grid of vectors.
How it works
The component reads every grid of the file. A grid of 32-bit or 64-bit floats gives a scalar
volume with the voxel size, the position and the band of the grid, in the order the file holds
the grids, and Names gives the name of each grid. A grid of any other type, such as a
velocity grid of vectors, gives no volume, and neither does a grid with a frustum transform,
which widens away from a camera. A remark names each grid that gives no volume.
Inputs
| Name | Nick | Type | Default | Description |
|---|---|---|---|---|
| File Path | F | Text | Full path of the .vdb file to read. | |
| Scale | SC | Number | 1 | Factor applied to every length read from the file: voxel positions and sizes, and the distance values of level sets. 1000 reads a file in metres into a model drawn in millimetres. |
| Watch | W | Boolean | False | Reads the file again after each change on disk while true: a save, a replacement or a deletion. The component reads once the file has stayed unchanged for a second. |
Outputs
| Name | Nick | Type | Description |
|---|---|---|---|
| Scalar Volume | S | Scalar Volumelist | The scalar volumes that the grids of the file give, in the order the file holds the grids. |
| Names | N | Textlist | The name of the grid of each scalar volume. |
Watching the file
Set Watch to true to read the file again each time it changes on disk, for example while a
simulation writes it. The component reads once the file has stayed unchanged for a second, so
a save in several writes gives one read. A simulation that writes numbered frames writes a new
file for each frame, and the component reads none of the later frames.
Tips
- Set
Scaleto 1000 to read a file in metres into a model drawn in millimetres. - Morphé treats every scalar volume as a level set, including the density grid of a fog volume. Distance operations such as
Offset give no meaningful result on such a volume. - Pick one volume with List Item, or find the position of a grid name with Member Index on the
Namesoutput.
Messages
What the component may report, shown as a balloon on the canvas.
| Level | Message |
|---|---|
| Error | Scale must be a positive number. |
| Warning | No grid of the file gives a scalar volume. |
