...
The extension can load grids where the data is stored either as: scalars (floats or doubles) and vectors (vec2 and vec3). Simulation data such as temperatures are usually stored as floats while velocity or acceleration are stored as vectors.
The actual detail of the volumetric OpenVDB grid does not depend on any parameter in Maxwell, it is "built in" to the grid, depending on how finely the grid cells where set during the simulation in your 3D application.
Parameters
- Base Grid: set the name of the base grid inside the VDB file that defines the volumetric domain. Usually this field is called "density". If no name is supplied here, Maxwell uses the first grid present in the file.
- Base Grid multiplier: controls the density of the base grid. Higher values will make the volumetric appear more dense, letting less light through it.
...
Info |
---|
Min / Max rangesNormally, you would look in Maxwells console panel to determine what the min/max ranges are for a certain grid, and enter those in the corresponding VEC_MOD_x, or FLOAT_x parameters. |
Finding out which grids
...
exist in an OpenVDB file
In order to find out how many grids are actually present in a VDB file, what their names are, what type of values they hold (float or vectors) and what these values are, simply load the vdb file using the MaxwellVolumetric extension and hit render. Look in the Console panel for detailed info about the data in the vdb file.
Texturing OpenVDB volumetrics
Info |
---|
To experiment, you can use some of the VDB files found at the official download page of the OpenVDB website. In the following examples we have used the "explosion.vdb" file. |
...
By changing the corresponding min/max values, you can remap the gradient on the volumetric cloud, to make parts of it appear more prominently, or even make the gradient start to repeat. For example, if you set the max value to 0.2 instead of 0.884 in this case, the entire gradient will be mapped to parts of the grid that fall within the range 0.0 - 0.2. In areas of the grid that exceed that range, the grid will be repeated (if texture tiling is turned on), this time between the range 0.2-0.4, then repeated again between 0.4 -0.6, and again between 0.6 - 0.8. So we would have approximately 4 repeats in this case. On the other hand, if you set a max value double of what is stored in the grid, the actual max value of the grid will be "reached" much sooner and only the left half of the gradient will be visible on the volumetric. Finally, if you have texture tiling turned off and you use a smaller max value than the grid holds, when in areas in of the grid which have higher max values then than what you've specified, the texture won't be repeated and instead it's the materials Reflectance 0 color that which will show. The following four renders demonstrate using different max values and tiling set to on and off:
...
Upper left, the "true" max value of the grid was used and so the gradient was mapped in the most accurate, or predictable way. Upper right, the gradient is repeated several times. Lower left, since the max value used is double compared to what is actually stored in the grid, only half of the gradient is mapped to it. Lower right render, tiling was off, and the reflectance 0 color was white - the gradient is only mapped to parts of the grid whose range is 0.0 - 0.2, and in parts with higher ranges, the reflectance 0 color becomes visible.