Jump to content

Rotate each copy for certain rotation value


Recommended Posts

Hi guys, probably a noob question but I here it is.

I'm creating a circular pipe shape in houdini ( hadron collider like ) and cross section of this pipe is specific 5 sided object. The idea is to have each of this pieces copied on points of this circle and then each copy should rotate for 5 degrees more then previous one, or whatever value I specify.

Rotation should not be random in this case and each piece should take into account previous position and add on top.

 

So far I managed with copy to points, to copy those ngons on a circlular shape and control their number with resample, so they form a nice circular pipe looking shape.

However I can only rotate them all together for certain value in Z direction, or randomly each one of them. But what I would like to do is to have ordered rotation, so if for example first piece is rotZ = 2, the next one will read his position and add the same value on top of it and be rotZ:4

Then piece 3 will be RotZ: 6 and so on.

 

Hope it makes sense.

Any help much appreciated.

Link to comment
Share on other sites

Hi Aleksandar,

 

For this you could try giving orientation attribute of some value to the points and multiply it with the point numbers suppose in your case if you give Zrotation 2 to all the points and then if you multiply it with the (ptnum+1) your first point will take the same rotation then the 2nd one will be 2x and the 3rd one will be 3x and so on.

I have used (ptnum+1)because you point numbers starts with 0 so if you multiply directly with the point number your first object will not take any rotation.

Hope this will help.

 

Thanks

Vineet

 

 

Link to comment
Share on other sites

Hi Vineet,

 

Thanks for your reply, I have tried something but I dont have much success, must be that I'm missing a step or I have  misunderstood .

 

What I did is, I have added Attribute Create node to the points on which I am copying geometry to, and set name:orient. Class: poingts, Type:vector and value of 0 0 1 ( z value is 1 )

Then I have created Attribute Wrangle with following expression: v@orient.z *= @ptnum+1;

This was then passed to Copy to Point node, but nothing much has happened, again maybe I'm not doing it correctly.

 

Aleksandar.

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...