Jump to content

Magnetic chain, best approach?


caskal

Recommended Posts

Ask chat...

Quote

inside houdini, I have equal height cylinders sitting on a ground plane. They are arranged in a pattern spiraling inward. I'm trying to create a visual effect where the outer, first cylinder becomes magnetized and dynamically attracts each neighboring cylinder, physically connecting, eventually forming a straight line of cylinders at the end.

I didn't get an exact solution out of ChatGPT, but I did ask it to write Houdini python code to generate a scene. Perhaps there is something in here you could lift?

magnet.gif

ap_spiral_to_magnetic_line_051526.hiplc

  • Like 1
Link to comment
Share on other sites

Hi guys,

@Atom I've tried claude, some nice overall instructions but the python scene was pretty broken.

This is what I have so far, at least i got a better understanding on how to approach it.

 

 

 

That said, Louis Manjares on Facebook (which also gave me some hints) tackled the reference exactly, love his result:

 

Cheers!

 

Link to comment
Share on other sites

  • 2 weeks later...

Hey @fencer quick question, I've been trying to fix the intersections doing a bunch of stuff, adding substeps, switching convex to cilinder, and other 10 things I saw on forums, without any luck.

qgdx41PpN4.png.c33ebbaf72cd9b8be26b6204837ce15f.png

Best result so far I had having box as collision, but it changes the behavior.

Do you know what else can I try to avoid any intersections? I've also tried to rotate them to start like this:

X7f0pO5RHn.thumb.png.a52692ee2e3afd17945860a19d997d98.png

but I like the behavior that I had initially, so ended using a transform pieces post sim, with the rotation, but of course, that adds even more intersections.

Attaching the file if you had any time to check it, im getting crazy trying to solve it, no worries if not, already helped me with this magnific setup!

Thank you!

magnet_issue.hiplc

Link to comment
Share on other sites

8 hours ago, caskal said:

Hey @fencer quick question, I've been trying to fix the intersections doing a bunch of stuff, adding substeps, switching convex to cilinder, and other 10 things I saw on forums, without any luck.

qgdx41PpN4.png.c33ebbaf72cd9b8be26b6204837ce15f.png

Best result so far I had having box as collision, but it changes the behavior.

Do you know what else can I try to avoid any intersections? I've also tried to rotate them to start like this:

X7f0pO5RHn.thumb.png.a52692ee2e3afd17945860a19d997d98.png

but I like the behavior that I had initially, so ended using a transform pieces post sim, with the rotation, but of course, that adds even more intersections.

Attaching the file if you had any time to check it, im getting crazy trying to solve it, no worries if not, already helped me with this magnific setup!

Thank you!

magnet_issue.hiplc 1.14 MB · 2 downloads

Try to adjust closer to worldscale, based on this collision padding and amount of bullet substeps.
Check constraints, seems something messed up here. Also, PY position initially is under the ground what doesn't help.

  • Like 1
Link to comment
Share on other sites

2 hours ago, fencer said:

Try to adjust closer to worldscale, based on this collision padding and amount of bullet substeps.
Check constraints, seems something messed up here. Also, PY position initially is under the ground what doesn't help.

Thanks for the tips! gonna check that out, thanks again for taking time to help me!

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