diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-07-18 23:36:09 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-07-18 23:49:10 +0300 |
commit | 9b406162490d9ee93e9786350432cdc1563b7bf6 (patch) | |
tree | cf573ef92132c45c7daac221296bfc76bf327628 /source/blender/makesdna/DNA_node_types.h | |
parent | 7d10798af22f683a8f55a8c361ad5676bd4160d2 (diff) |
Cycles: Point density texture support
This commit implements point density texture for Cycles shading nodes.
It's done via creating voxel texture at shader compilation time, Not
totally memory efficient, but avoids adding sampling code to kernel
(which keeps render time as low as possible), In the future this will
be compensated by using OpenVDB for more efficient storage of sparse
volume data.
Sampling of the voxel texture is happening at blender side and the
same code is used as for Blender Internal's renderer.
This texture is controlled by only object, particle system and radius.
Linear falloff is used and there's no turbulence. This is because
falloff is expected to happen using Curve Mapping node. Turbulence
will be done as a distortion on the input coordinate. It's already
possible to fake it using nose textures and in the future we can add
more proper turbulence distortion node, which then could also be used
for 2D texture mapping.
Particle color support is done by Lukas, thanks!
Diffstat (limited to 'source/blender/makesdna/DNA_node_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_node_types.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h index f17bf5af434..727c7b2117a 100644 --- a/source/blender/makesdna/DNA_node_types.h +++ b/source/blender/makesdna/DNA_node_types.h @@ -790,6 +790,17 @@ typedef struct NodeShaderVectTransform { int pad; } NodeShaderVectTransform; +typedef struct NodeShaderTexPointDensity { + short point_source, pad; + int particle_system; + float radius; + int resolution; + short space; + short interpolation; + short color_source; + short pad2; +} NodeShaderTexPointDensity; + /* TEX_output */ typedef struct TexNodeOutput { char name[64]; @@ -1090,4 +1101,22 @@ enum { #define CMP_NODE_PLANETRACKDEFORM_MBLUR_SAMPLES_MAX 64 +/* Point Density shader node */ + +enum { + SHD_POINTDENSITY_SOURCE_PSYS = 0, + SHD_POINTDENSITY_SOURCE_OBJECT = 1, +}; + +enum { + SHD_POINTDENSITY_SPACE_OBJECT = 0, + SHD_POINTDENSITY_SPACE_WORLD = 1, +}; + +enum { + SHD_POINTDENSITY_COLOR_PARTAGE = 1, + SHD_POINTDENSITY_COLOR_PARTSPEED = 2, + SHD_POINTDENSITY_COLOR_PARTVEL = 3, +}; + #endif |