# Attribute

## Overview

The Attribute node is used to create or promote attributes in the flow. New attributes can be used to control parameters via expressions or to pass information to the renderer via mapping.

## Inputs

Input | Description
--- | ---
0 Data Flow | Particles, Fibres and Meshes
1 Strands | Groom/Guide Curves which may have an attribute painted to be sampled

## Attribute

Parameter | Description
--- | ---
Attribute | The name of the attribute, if it already exists then it will be modified - otherwise it will be created.
Default | the default value for the attribute.
Attribute Type | Type either create a float or vector attribute.
Detail Type | Controls if the Attribute is created per fibre or per vertex.
Sample Groom | if Input 1 is connected the specified Groom Attribute will be sampled to create the new attribute.
Groom Attribute | this is the attribute stored in Input 1 that will be sampled if Sample Groom is toggled on.

## Mapping

Attribute mapping is a way of telling Yeti that the desired attribute needs to be passed to the rendering engine, possibly to be used for shading or to control renderer specific parameters.

Parameter | Description
--- | ---
Map As Renderable Attribute | This will map a named attribute to a renderable attribute. If on Yeti will output either the new attribute or an attribute specified below to the renderer.
Attribute | The name of the attribute to map.
Mapping | The name of the attribute as it should be passed to the renderer, if left blank it will use it’s current name.

## Geometric

Helper parameters to create geometry based attributes that rely on the topology of the incoming data.

Parameter | Description
--- | ---
Add Root Position ( surf_P ) | Will create a Yeti attribute called `root` which will be passed to the render engine as `surf_P`. This is a vector that represents the base of the fibre.
Add Tangent ( tangent ) | Will create a Yeti attribute called tangent, this represents the tangent of the fibre at the vertex being evaluated.
Add Face Index ( faceindex ) | Will create a Yeti attribute called faceindex, this represents the index of the face the fibre/particle was create
RiCurve Basis ( renderman ) | Can be used to control what basis function is used when exporting the curves to a Renderman compliant renderer.

## Example

Maya File: `examples/yeti_attributeExample.ma`