Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2014-03-29 16:03:48 +0400
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2014-03-29 16:03:48 +0400
commit691c4c17ad2f4b4e043f0961211ac90ca1656a8f (patch)
tree1e0ab0f0a2987748b1838af18182539eba970656 /intern/cycles/render
parent27043b8e40f74c8b0917850d1aefbd6315fa46a5 (diff)
Cycles: add "density", "flame" and "color" attributes for smoke domains.
These can currently be accessed by adding an Attribute node and specifying one of those three names. A Smoke/Fire node should be added at some point to make this more convenient. These values might change still before the release, in particular for flame the meaning seems unclear, it's just values in the 0..1 range. This is useful for color ramps, but it might be good if this was also available as temperature in kelvin so it can be plugged into the blackbody node. But I couldn't figure out from the smoke code if or how this corresponds to a physical unit. Here's a (quite poor) example file for a fire + smoke setup: http://www.pasteall.org/blend/27990
Diffstat (limited to 'intern/cycles/render')
-rw-r--r--intern/cycles/render/attribute.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/intern/cycles/render/attribute.cpp b/intern/cycles/render/attribute.cpp
index cd81c33a28f..e5b1ee7b95e 100644
--- a/intern/cycles/render/attribute.cpp
+++ b/intern/cycles/render/attribute.cpp
@@ -202,6 +202,16 @@ const char *Attribute::standard_name(AttributeStandard std)
return "ptex_face_id";
case ATTR_STD_PTEX_UV:
return "ptex_uv";
+ case ATTR_STD_VOLUME_DENSITY:
+ return "density";
+ case ATTR_STD_VOLUME_COLOR:
+ return "color";
+ case ATTR_STD_VOLUME_FLAME:
+ return "flame";
+ case ATTR_STD_VOLUME_HEAT:
+ return "heat";
+ case ATTR_STD_VOLUME_VELOCITY:
+ return "velocity";
case ATTR_STD_NOT_FOUND:
case ATTR_STD_NONE:
case ATTR_STD_NUM:
@@ -328,6 +338,17 @@ Attribute *AttributeSet::add(AttributeStandard std, ustring name)
case ATTR_STD_GENERATED_TRANSFORM:
attr = add(name, TypeDesc::TypeMatrix, ATTR_ELEMENT_MESH);
break;
+ case ATTR_STD_VOLUME_DENSITY:
+ case ATTR_STD_VOLUME_FLAME:
+ case ATTR_STD_VOLUME_HEAT:
+ attr = add(name, TypeDesc::TypeFloat, ATTR_ELEMENT_VOXEL);
+ break;
+ case ATTR_STD_VOLUME_COLOR:
+ attr = add(name, TypeDesc::TypeColor, ATTR_ELEMENT_VOXEL);
+ break;
+ case ATTR_STD_VOLUME_VELOCITY:
+ attr = add(name, TypeDesc::TypeVector, ATTR_ELEMENT_VOXEL);
+ break;
default:
assert(0);
break;