How to use transform by attribute?

   5311   4   1
User Avatar
Member
11 posts
Joined: March 2016
Offline
Hi,

I'm modifying some scenes I found online to better learn nodes, I selected using a group expression 6 points of 12, the result I want to obtain is to translate these points on the x axis but symmetrically by a defined delta from the original position.

Model is symmetric so points 2/6/10 are on the right area with a x position of eg 0.2 while 1/5/9 -0.2, so result should be abs(0.2+deltaX) for x>0 points and -abs(0.2+deltaX) for x<0 points.

I found transform by attribute but I did't find a clue on the documentation on how to use the transform attribute and which expression put to do this operation and if this node is enough to do the operation or I have to concatenate to another node.

thank you in advance.
Edited by Neogene79 - May 10, 2018 03:27:33

Attachments:
Schermata 2018-05-10 alle 08.05.46.png (205.8 KB)
ShiftPoints.hip (81.0 KB)

User Avatar
Member
323 posts
Joined: Jan. 2015
Offline
Hi Neogene,
it is recommended that you post .hip (scene files) here so its easier to answer and understand questions.

Now to this question:
not sure if transform by attribute is what you need here. It is a “special” node that needs a quaternion attribute.

I think this here is something where you need a “point wrangle” or a “point vop”… Have a look at those nodes they are very powerful and universal…


greetings

Olaf
User Avatar
Member
11 posts
Joined: March 2016
Offline
Olaf Finkbeiner
Hi Neogene,
it is recommended that you post .hip (scene files) here so its easier to answer and understand questions.

Now to this question:
not sure if transform by attribute is what you need here. It is a “special” node that needs a quaternion attribute.

I think this here is something where you need a “point wrangle” or a “point vop”… Have a look at those nodes they are very powerful and universal…


greetings

Olaf

Sample project attached.

Documentation (Docs… [www.sidefx.com]) says:

Transform Attribute

A point attribute to use as the transform at each point.

This should be a float attribute. The size of the attribute determines the type of transformation.

NUMBER 3: Translation by a delta. Only affects Point and HPoint attributes.
User Avatar
Member
7850 posts
Joined: Sept. 2011
Offline
Neogene79
This should be a float attribute. The size of the attribute determines the type of transformation.

NUMBER 3: Translation by a delta. Only affects Point and HPoint attributes.

You are misinterpreting the table. The numbers here refer to the behavior depending on the size of the specified attribute. The key here being that the ‘Transform Attribute’ field takes a name of an attribute. Note that the default value is ‘xform’ since the typical use case is to have a float 16 size attribute named ‘xform’ that defines a transformation matrix per-point.
Edited by jsmack - May 10, 2018 05:36:10
User Avatar
Member
11 posts
Joined: March 2016
Offline
Setting the field to P works (doing nothing but don't throwing a warning/error) so I thought i could simply add to P a vector…

Ok, Transform by attribute was the wrong choice, better to forget it exists

jsmack
Neogene79
This should be a float attribute. The size of the attribute determines the type of transformation.

NUMBER 3: Translation by a delta. Only affects Point and HPoint attributes.

You are misinterpreting the table. The numbers here refer to the behavior depending on the size of the specified attribute. The key here being that the ‘Transform Attribute’ field takes a name of an attribute. Note that the default value is ‘xform’ since the typical use case is to have a float 16 size attribute named ‘xform’ that defines a transformation matrix per-point.
Edited by Neogene79 - May 10, 2018 09:55:22
  • Quick Links