I know you can call density or flame for example from the attribute node. I was wondering what else you can write in the name slot. And maybe a bit of explanation of the attribute node.
thanks in advance guys! :)
Blender Stack Exchange is a question and answer site for people who use Blender to create 3D graphics, animations, or games. It only takes a minute to sign up.
Sign up to join this communityI know you can call density or flame for example from the attribute node. I was wondering what else you can write in the name slot. And maybe a bit of explanation of the attribute node.
thanks in advance guys! :)
Currently you can get:
density
When used on a domain object, this is gives a scalar defining the density of any smoke inside the domain. All three outputs are the same.
flame
When used on a domain object, this is gives a scalar defining the density of any fire inside the domain. All three outputs are the same.
color
When used on a domain object, this is gives the color of the smoke. The color and vector outputs are the same. The fac output is an average of the channels.
N
This gives the normals of the object. You can also get this info from the normal output of a geometry node.
Ng
This gives the true normals of the object. You can also get this info from the true normal output of a geometry node.
pointiness
This gives a scalar representing the amount of curvature of the object's surface based on it's normals. You can also get this info from the pointiness output of the a geometry node.
uv
This gives the UV coordinates of the active UV map (the map with the camera icon active). Same as the UV output of the texture coordinate node.
generated
This gives the generated coordinates of the object. Same as the Generated output of the texture coordinate node.
tangent
This gives the tangent coordinates using the object's active UV map. Same as the Tangent output of a tangent node with direction set to UV map.
name of uv map
This allows you to get the UV coordinates stored in a specific UV map belonging to the object with the material. You usually want to use the vector output, though the color output is the same. The Fac output gives an average of the channels.
Note that as of 2.71 there is a dedicated UV map node which makes this obsolete.
In the case of a vertex color datablock and a UV map with the same name, the UV map will be used by the attribute node.
There are actually quite a few more in the code, the ones listed above are just the ones which appear to work as of 2.74 930bf58
(latest master at the time of writing).
For a complete list, see line 192
of /intern/cycles/render/attribute.cpp
:
I put //no output
next to the ones which appeared to do nothing.
switch(std) {
case ATTR_STD_VERTEX_NORMAL:
return "N";
case ATTR_STD_FACE_NORMAL:
return "Ng";
case ATTR_STD_UV:
return "uv";
case ATTR_STD_GENERATED:
return "generated";
case ATTR_STD_GENERATED_TRANSFORM:
return "generated_transform"; //no output
case ATTR_STD_UV_TANGENT:
return "tangent";
case ATTR_STD_UV_TANGENT_SIGN:
return "tangent_sign"; //no output
case ATTR_STD_VERTEX_COLOR:
return "vertex_color";
case ATTR_STD_POSITION_UNDEFORMED:
return "undeformed"; //no output
case ATTR_STD_POSITION_UNDISPLACED:
return "undisplaced"; //no output
case ATTR_STD_MOTION_VERTEX_POSITION:
return "motion_P"; //no output
case ATTR_STD_MOTION_VERTEX_NORMAL:
return "motion_N"; //no output
case ATTR_STD_PARTICLE:
return "particle"; //no output
case ATTR_STD_CURVE_INTERCEPT:
return "curve_intercept"; //no output
case ATTR_STD_CURVE_RANDOM:
return "curve_random";
case ATTR_STD_PTEX_FACE_ID:
return "ptex_face_id"; //no output
case ATTR_STD_PTEX_UV:
return "ptex_uv"; //no output
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"; //no output
case ATTR_STD_VOLUME_TEMPERATURE:
return "temperature";
case ATTR_STD_VOLUME_VELOCITY:
return "velocity"; //no output
case ATTR_STD_POINTINESS:
return "pointiness";
case ATTR_STD_RANDOM_PER_ISLAND:
return "random_per_island";
case ATTR_STD_NOT_FOUND:
case ATTR_STD_NONE:
case ATTR_STD_NUM:
return "";
}
Note that for the most part the attribute node seems to be used as a sort of "testing node" for inputs which aren't yet available in other nodes[citation needed]. I suspect old attribute names are not removed when they do get added to another node (e.g. pointiness) as this would break backwards compatibility.
At any rate, this would at least begin to explain why there is little to no documentation about this node.