I have this grid which was originally flat in the xz plane and I added normals to it such that the normal was parallel with the y axis. I then used a primitive wrangle to add a vector attribute to the primitive called "other_vector" which is also parallel to the y axis. Then, I drop down a transform node to rotate the grid. The normal vector was rotated with the transform node, but the other vector which I created wasn't. Is there a way that I can lock my vector attributes to the geometry just like the normals are locked to it?
(This is a simplification of what I need to do; in my real application the transformations on the geo will be more complex than a transform node, it will include rotating and translating geometry by copying it to points and things like that
A simple way to do it is to first create your attribute using an attribute create sop. You can specify that your attribute is indeed a vector (transformed) and not a float of size 3 (not transformed).
My method (might not be the best), is to activate the "Output Attribute" in your tranform sop. It will output a matrix named "xform". In a prim wrangle below, put this code:
Tanto A simple way to do it is to first create your attribute using an attribute create sop. You can specify that your attribute is indeed a vector (transformed) and not a float of size 3 (not transformed).
Wow, that worked! So, there's a difference between using a wrangle and setting an attribute with v@ and creating a vector attribute with the attribcreate sop. Why is that? Does using v@ just create a float of size 3, like you hint at?
Look at the attribute info link for more info, Houdini attaches metadata to attributes to specify which transforms will affect them. The default, which is used when creating a new attribute in a wrangle, is "none", no transforms.