Constraining Ends of Wire

   2886   7   2
User Avatar
Member
183 posts
Joined: 12月 2011
Offline
I have been struggling to figure out how I can constrain the rotation and position of both ends of a wire to two animated objects. To get an idea of what I am going for, imagine two balls with a wire's ends attached vertically to each. When the balls rotate and move the ends of the wire need to remain sticking straight out of the balls while the middle deforms in a normal manner.

Any ideas how to pull this off?
User Avatar
Member
38 posts
Joined: 2月 2014
Offline
Hi, try the attached file.

I'm a beginner so it might not be the best solution, but it works.
Struggled with it before and your post actually inspired me to try again, so thanks

I haven't figured out how to sample rotation in this one yet. Position works.

Attachments:
dynamic_wire_with_anim4.hiplc (134.7 KB)

User Avatar
Member
38 posts
Joined: 2月 2014
Offline
What I would love to know is how to set the constrained points from a SOP Attribute.

Attachments:
Constrained points.PNG (15.9 KB)

User Avatar
Member
483 posts
Joined: 12月 2006
Offline
Create a Point Group from the Attribute, then use:

`pointlist(“../../yourobj”, “yourgroup”)`

I've attached a file to show how to add this.
Please have a closer look athe the 2 geo objects.

Maybe you can grab your points directly with this little trick ;-)

Hope that's helpy.

Attachments:
curtain.hip (131.0 KB)

English is not my native language, sorry in advance for any misunderstanding :-)
User Avatar
Member
38 posts
Joined: 2月 2014
Offline
Thank you Matthias, I haven't checked your file yet, but I've tried the expression and it works like a charm! It's been bugging me for ages

Is this the preferred method for driving stuff in DOPs with SOPs? Reference SOP groups rather than inherrited attributes?
User Avatar
Member
483 posts
Joined: 12月 2006
Offline
Is this the preferred method for driving stuff in DOPs with SOPs? Reference SOP groups rather than inherrited attributes?
I don't know, was more a guess :-)

If I'm right the “BreakWire” example is using attribute directly via Rest Geometry.
English is not my native language, sorry in advance for any misunderstanding :-)
User Avatar
Member
483 posts
Joined: 12月 2006
Offline
@90ender
to come back to the task….

Attachments:
wire_with_spheres.hip (263.8 KB)

English is not my native language, sorry in advance for any misunderstanding :-)
User Avatar
Member
38 posts
Joined: 2月 2014
Offline
Thanks! Pointlist also works in the second case which is great.
  • Quick Links