Atom Posted June 28, 2015 Share Posted June 28, 2015 (edited) Hi All, I have a torus that I want to move via color so I put $CR in the X Translate of a transform node. I also have an animated noise texture in a COP network that I have brought into the SOP network. When I scrub I can see the color change in the viewport and in the geometry spreadsheet. However, the object never moves. I guess I am assuming the when I bring in Cd from an attribute from map that it overwrites $CR, $CG, $CB. Is this correct? Is Cd the same as $CR, $CG, $CB? ap_map_moves_object.hipnc Edited June 28, 2015 by Atom Quote Link to comment Share on other sites More sharing options...
rafaelfs Posted June 29, 2015 Share Posted June 29, 2015 Are you trying to move the points of your torus with a point attribute Cd? Use a point wrangle and set @P + Cd; Cheers Quote Link to comment Share on other sites More sharing options...
Atom Posted June 29, 2015 Author Share Posted June 29, 2015 (edited) No, not just points, I want the entire object to move. I also may want to route color to scale and rotation as well. Kind of like using COPs instead of CHOPs. Edited June 29, 2015 by Atom Quote Link to comment Share on other sites More sharing options...
Skybar Posted June 29, 2015 Share Posted June 29, 2015 Promote the attribute to Detail: ap_map_moves_object_dv.hipnc Quote Link to comment Share on other sites More sharing options...
Atom Posted June 29, 2015 Author Share Posted June 29, 2015 Thanks for the solution but I guess I don't understand why it works. Why does Cd have to be promoted? Is Cd.r the same as $CR? These dollar sign variables, like $CR, aren't they global? Shouldn't they span all attribute types? Quote Link to comment Share on other sites More sharing options...
anim Posted June 30, 2015 Share Posted June 30, 2015 ... These dollar sign variables, like $CR, aren't they global? Shouldn't they span all attribute types? no, they are local variables and supported only by notes that, ehm, support them so $CR in Point SOP binds to point Cd, in Primitive SOP to primitive Cd, apparently in Transform SOP to detail Cd even though it's not documented I personally avoid using local variables at all cost as they are slow and can be quite confusing, however that's just a personal preference Quote Link to comment Share on other sites More sharing options...
Atom Posted June 30, 2015 Author Share Posted June 30, 2015 Thanks for the explanation Tomas. That certainly adds a level of confusion for new users. So is using Cd.r faster than using $CR? Also it seems that you are saying that each node exists within it's own context. Even though the node itself may exist in a larger context such as a Transform in SOPs. Is there a way to visualize what context you are actually in or am I reading too much into this. Quote Link to comment Share on other sites More sharing options...
rtep Posted June 30, 2015 Share Posted June 30, 2015 (edited) hi, You have to promote CD to a detail in this instance because a transform node doesn't work per point, it is per object. A single transform node can't move half of the points one direction and the other half another direction, it's all or nothing. So you have to call a single value attribute, like a detail attr. You could also use the point expression in the transform to call a single points color value, or centroid expression for pivot. If you want individual points to move in different ways you need to use a different approach like a wrangle or a vop. Edited June 30, 2015 by rtep Quote Link to comment Share on other sites More sharing options...
anim Posted June 30, 2015 Share Posted June 30, 2015 (edited) Thanks for the explanation Tomas. That certainly adds a level of confusion for new users. So is using Cd.r faster than using $CR? Also it seems that you are saying that each node exists within it's own context. Even though the node itself may exist in a larger context such as a Transform in SOPs. Is there a way to visualize what context you are actually in or am I reading too much into this. all I'm saying is if you avoid using local variables your life will be easier it's not as simple as Cd.r being faster than $CR as you can't use them interchangeably simply binding attributes through local variables is old concept that has it's limitations, however there are still nodes using it, so while you can use Point SOP, Primitive SOP, Vertex SOP to manipulate per component data using local variables, you will get much faster results using newer tools like Point/Primitive/Attrib wrangle/VOP (basically Attrib Wrangle/VOP), this is as well consistent when you use POP Wrangle or Geometry Wrangle so try to have a look at those and you'll find out that there is no need for local variables similarly in Transform, while you can use $CR to use red channel of Cd detail attribute, it's value will not be reflected in parm so depending on what you are doing it may cause you just more problems as referencing will return 0, so even in that case using detail() expression to get that value is much safer Edited June 30, 2015 by anim Quote Link to comment Share on other sites More sharing options...
Atom Posted June 30, 2015 Author Share Posted June 30, 2015 Thanks for the explanation, I am starting to get it. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.