POV-Ray Media Point Cloud
The Media Point Cloud Export feature is for the creation of df3 voxel desity maps for use with the POV-Ray media features. These density files are most often used with media statements, but can also be used as a pattern modifier for other types.
The df3 file type is a 3 dimensional voxel map, where each cell contains a value describing the density of the material at that position in 3 dimensional space. Typically, values of zero indicate low or no density, while higher values describe denser areas. These voxel maps are usually used to describe atmosphere effects such as fog or smoke, but are equally useful for creating other interesting features.
To convert DMesh files into the df3 format, the following steps are taken
Note that the vertex positions of the DMesh model are used, and not the intersecting positions of the resulting polygon surfaces. This allows the overall density of the voxel map to be changed by increasing or decreasing the resolution of the DMesh object. An object with a high polygon resolution will result in a fairly busy df3 voxel map, while a low polygon resolution will result in a fairly sparse map. The exact resolution required will generally have to be determined by test renderings, since results will depend on a combination of the export map size, the model's current resolution, skinned vs layered export, as well as the POV-Ray settings for intervals, sample rates, confidence etc. Several samples are included that should provide a starting point to determine the best settings for your particualr requirements.
This following information describes the options for use in exporting DMesh models as df3 density Point Clouds.
As mentioned above, the current vertex positions of the model are mapped to fit specific cells within the df3 voxel layout. If a cell is not referenced by a vertex, its density value will be zero. Where a vertex falls within a cell, the actual value (or density) is set using the Density section options.
The basic density formula is: Density * Scale + Base Value
The four radio buttons describe the source used to determine the original Density value, and this is then scaled and added to the Base Value
For the Base Value radio selection, all cells will be set to the value as entered in the Base Value edit box. This is the typical Point Cloud, where every cell either has a particle, or doesn't. If you want dim dust particles, enter low values such as 0.25, and for fully dense particles, enter larger values such as 1.00 or higher.
For the U, V and W options, the density will be set equal to the vertex's u, v or w (height) value respectively. For example, setting the Density type to V will result in very low density's at the bottom of the object, (where v = 0.00,) with increasing density values towards the top. The w option refers to the amount of 'bulginess' of the surface at that position, so the center's of muscles will produce denser cells, while the edges will produce less dense values.
The Use Item uvw check box determines whether the current items uvw values should be used, or whether to use the objects global uvw values. This is only significant if exporting using the layered options, since in the skinned option, both coordinate systems are identical. You will usually leave this box checked.
The Scale edit box provides for scaling of the density value prior to setting in the df3 voxel map.
So Why all these Density Options and Calculations?
In a nutshell, the DMesh uv values provide a simple continuous range from 0.00 to 1.00, and this is rarely exactly what is wanted. More often, a range such as 0.50 to 1.00 would be more suitable, and so the above scaling and base values provide for this possibility. The DMesh w component is much more varied, and is not constrained to this range. If there is very little variation in the DMesh surface, you may wish to double or triple the actual w value, and for highly variable models, it may be more appropriate to scale them down a bit.
The Voxel Map Size section simply defines how many cells to generate in the x, y and z directions. Note that this is a voxel map, and so the total amount of disk/memory space will be calculated as x*y*z. A 50X50X50 voxel map therefore requires 125,000 cells. The current df3 file format defines a cell as a single byte, so this is not overly large, but if you increase the size up to 100, be aware that the resulting file will contain 1 million cells, and be almost 1MB.