Jump to content

Color Won't Move Object?


Atom

Recommended Posts

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?

post-12295-0-63698800-1435524227_thumb.j

ap_map_moves_object.hipnc

Edited by Atom
Link to comment
Share on other sites

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 by Atom
Link to comment
Share on other sites

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?

Link to comment
Share on other sites

...

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 by rtep
Link to comment
Share on other sites

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 by anim
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...