Rig edges of an object to a nurb circle?

roshanshilimkar3434
Advocate
Advocate

Rig edges of an object to a nurb circle?

roshanshilimkar3434
Advocate
Advocate

Hello there, In the attached image you can see  some edges of a pipe selected and a nurb circle selected one after another, my intention here is to somehow parent the edges to the curve so I can change the pipe size only with one nurb circle however when I use P parent I get this error- (// Error: line 0: Not enough objects or values. // ) and after using constraints i.e parent or scale any I get this error-(// Error: line 0: Target pCylinder22 not valid. Targets must be of type transform. // ) Now how can I rig the edges of the pipe to the nurb circle? I've tried using cluster but that doesn't serve the exact result I am after. Thank you in advance.  @mcw0 @dinofiguera 

0 Likes
Reply
721 Views
2 Replies
Replies (2)

mcw0
Advisor
Advisor

What you want is construction history.  You want to extrude a circle along a path that describes that shape.  And with construction history, any size change in the original circle will be reflected in the resulting extruded mesh.  Since it's a tubular shape, it's pretty straight forward to generate a path curve to extrude a circle.  How are your scripting skills?

The idea is to get the center of all the edge loops.  Create a variable to store the centers.

Start by selecting an edge loop at one of the boundary edges of the tubular mesh.  

Convert edges to verts and get the center.

Convert the verts to faces and back to verts...then remove the previous verts.  This gets you the next ring of verts to get the center.

Continue this process of getting centers until you run out of verts.

Now create a linear curve by placing a cv at each center location.

Now rebuild the linear curve as a cubic with the same number of spans...this is the path curve.

Next is create a circle and extrude it along the path curve...set the options to "Tube" and "Result position" should be "At path".  I can't remember the pivot or orientation settings at the moment.  But play with the options of the extrude node until you get what you want.  Then scaling the original circle will allow you to adjust the thickness of the tube.

This of course will give you uniform result along the tube.  Since you wanted to only have one circle control this, I'm assuming uniform is what you are after.  Let me know if any of that was unclear.

 

Forgot to add those steps only focused on the deformation/control aspect.  If you have uvs and textures on the original tube mesh, you'll have to make sure to match the uvs of the extruded mesh to the original.  Otherwise, your textures won't work.

dinofiguera
Collaborator
Collaborator

In addition to what @mcw0 said,

if you want to keep your modeled pipe:
create a curve path that follows the pipe direction like @mcw0 explained or in this case,

you could also select the edge loop on the perfect top of your pipe that goes along the pipe length,

convert it to a curve with >Modify > convert > Polygon edges to curve

and move it down by half the diameter of the section of your tube so it will sit at the center of the tube.
Create a Wire deformer with the pipe geometry and the curve.
Now in the wire deformer settings, there is a size attribute that controls the size of the pipe and you can connect this attribute with what you like.

0 Likes