Swann_
If you look into details view, you will see that tangent is not writen as x,y,and z vector like P but as ,,.
Change X,Y,Z on the end of $TANGENT to 1,2,3 and it will work. Later you will see error in next node where $RADIAL will report error, do the same there (so change $RADIALX2 to $RADIAL12 etc).
What I'm curious is why this is no working as 0, 1, 2. Anybody ?
The above will give you correct access to this attribute, but… A tangent vector is really much more similar to a Normal, rather than a float attribute, so it really should be defined as a vector rather than a float. So what you actually want to modify is the vop network that creates the radial and tangent attributes.
Go into:
/obj/fence/chain_link_fence1/tangent1/build_tangent
and change the addattribute for tangent and radial to:
type modifier -> vector
Now the attributes will be treated as proper vector attributes rather than float.
This is why it is important:
For instance N (the normals of an object) or v (the velocity of an object) are both defined as vectors. Which means that in a transform node if you were to rotate your object (inside sops), the transformation matrix will also be applied to the normals, so the normals get updated (which is what you want for the tangents as well…).
So what a happens if it is a float:
For instance float can represent the color (Cd) of an object. Color is actually an exception because it is accessed with $CR, $CG $CB. But it is easier to visualize “the problem” with color. Imagine that color was also a vector. If you were to apply a rotation to the object with a transform (in sops), the transformation matrix will now be applied to the colors as well… this is bad. You want your colors to “stick” to your points. You do not want them to change as you rotate the object.
My
guess as to why the attribute needs to be accessed as $MYCOLOR1, $MYCOLOR2, $MYCOLOR3, rather than $MYCOLOR0, $MYCOLOR1, $MYCOLOR2
is that $MYCOLOR0 is internally reserved. Perhaps it is used for the float or int version of an attribute, or perhaps it has to do with the way the varmap maps it. I do not know exactly either

– perhaps somebody thought array arithmetic was a bad idea for an end user

but I doubt it

.
Cg Supervisor | Effects Supervisor | Expert Technical Artist at Infinity Ward
https://www.linkedin.com/in/peter-claes-10a4854/ [
www.linkedin.com]