how do I get polygons to rotate/revolve around a tube

   362   9   0
User Avatar
Member
227 posts
Joined: 5月 2016
Offline
how do I get red polygon shape to rotate/revolve/copy around the tube? see attached pic.

Edited by bobc4d - 2020年5月25日 21:11:13

Attachments:
nozzel rotation.png (210.5 KB)

User Avatar
Member
196 posts
Joined: 6月 2017
Offline
The easiest way would be to change the pivot point to the center of the tube. Then you could just keyframe the rotation.
Edited by Island - 2020年5月25日 22:58:26
User Avatar
Member
428 posts
Joined: 2月 2017
Offline
to me, the secret sauce is the radius.

- assuming the tube is exactly at Origin, obtain Radius by whatever means (it may not be the exact tube radius since you might want to add a bit of thickness)

- once you have Radius, the red piece should be placed …you guessed it, at Radius from Origin

- then it's just a simple copy/transform…with whatever rotation offset you see fit.

further assumptions: your geo may still be perfectly aligned and at Origin, so the extruded bits are already perfectly placed so all you have to do is copy/transform it with rotation offset, in the right axis that is.
Edited by vusta - 2020年5月26日 00:02:58
User Avatar
Member
428 posts
Joined: 2月 2017
Offline
here you are…just model in place , didn't even bother getting the radius.

Attachments:
bits.jpg (69.8 KB)
red_bits.hiplc (94.4 KB)

User Avatar
Member
510 posts
Joined: 9月 2013
Offline
You could also slide along UV-based positions.

Attachments:
slide_uv.hipnc (388.3 KB)

User Avatar
Member
227 posts
Joined: 5月 2016
Offline
thanks for all input. It is not at world center so I guess the easiest way would be to model each one, there are only 5 so not too big a deal. I was just hoping for quick fix.
User Avatar
Member
4851 posts
Joined: 7月 2007
Offline
bobc4d
…I guess the easiest way would be to model each one…I was just hoping for quick fix.
judging by the replies you got I'm sure that if you have posted hipfile, you could have fixed file back 3 times by now with proper procedural solution, even if your tube isn't in the center of the scene or axis aligned
Edited by tamte - 2020年5月26日 21:39:50
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
196 posts
Joined: 6月 2017
Offline
Rotation around something other than (0,0,0) is quite different in Houdini compared with other software and can be confusing coming from C4D, Maya, etc. I have attached a file that shows a flattened cube rotating around a cylinder that is not placed at (0,0,0). As Vusta pointed out, the solution is fairly simple. In the attached file, you see a double transform with one to offset from the center of the tube and the other to rotate around the center of the tube if it is not centered at (0,0,0). You could do this without a double transform by just putting the box center not at the origin, but I personally don't like to do that. However if you start with a tube rather than a box and delete out all but a curved section, it will already start not at the origin and you might omit the transform node used to offset.

If you are doing this at a scene level rather than geometry level, it would be done either by parenting or by constraints.
Edited by Island - 2020年5月27日 06:25:32

Attachments:
OffsetRotation.hiplc (89.6 KB)

User Avatar
Member
196 posts
Joined: 6月 2017
Offline
You will save yourself a lot of headaches by just doing your modeling around either (0,0,0) or (0, 1/2 y height, 0). You can do offsets, but it is much easier to either add a transform after the final merge or move the origin in the object view (with pretransform if you are going the latter way, so that you can easily reset to 0,0,0 and keep the transform). See attachments for three ways of doing this (with origin marker not at tube. The reason it is masochistic to model off the origin is that if you decide later to add some more detail with rivets or sweeps or whatever, you will have to add those offset transforms each time you do that.
Edited by Island - 2020年5月27日 10:41:03

Attachments:
ShapeAroundTube.hiplc (266.0 KB)
AroundTube.jpg (154.9 KB)

User Avatar
Member
227 posts
Joined: 5月 2016
Offline
thank you island, that is very sound reasoning. I will endeavor to remember to model at 0,0,0 then transform. I really appreciate the effort you put in to give me examples. fortunately I am not too far along and can start afresh at origin without too much pain there will be additional things added to this model so it would make sense to begin at origin.

update: here is result of following your method and it works great. again many thanks
Edited by bobc4d - 2020年5月30日 18:41:02

Attachments:
rotate around tube.png (173.1 KB)

  • Quick Links