It seems that the bicycle gear chain can't be implemented in

   1211   15   4
User Avatar
Member
12 posts
Joined: 11月 2024
オフライン
Hi, guys, how are you?

I want to make a rig to rotate a bicycle chain,
but my brain doesn't seem very smart, and I've almost lost all my hair thinking about it! The curve's CU can't be greater than 1 either. Guys, give me some constructive advice.

Thanks, wish you all great wealth and promotions with salary increases.

Attachments:
1.jpg (82.7 KB)
2.jpg (42.9 KB)

User Avatar
Member
20 posts
Joined: 3月 2015
オフライン


Here's my quick attempt at a solution. I'll upload another version using a more practical example when I get around to it.

Attachments:
apex_chain_concept_v002.gif (3.0 MB)
apex_chain_v002.hiplc (442.9 KB)

User Avatar
Member
12 posts
Joined: 11月 2024
オフライン
AntonMoss
Image Not Found


Here's my quick attempt at a solution. I'll upload another version using a more practical example when I get around to it.


You’re literally a genius. This is amazing! Please take my knees. You blow me away.
User Avatar
Member
732 posts
Joined: 9月 2013
オフライン
Here is a version using SOPs.

Attachments:
chain_animation.hip (1.2 MB)

https://procegen.konstantinmagnus.de/ [procegen.konstantinmagnus.de]
User Avatar
Member
12 posts
Joined: 11月 2024
オフライン
Konstantin Magnus
Here is a version using SOPs.
Thanks, this method is also very good and creative. But it doesn't seem to be Apex, yet it's still impressive. Great rig, this technique is a light of humanity. You are the best.
User Avatar
Member
20 posts
Joined: 3月 2015
オフライン
Konstantin Magnus
Here is a version using SOPs.
This is cool! Fantastic use of copernicus sdf's and the trace sop. Time to study this wrangle.
Edited by AntonMoss - 2026年6月12日 18:18:34
User Avatar
Member
732 posts
Joined: 9月 2013
オフライン
AntonMoss
Konstantin Magnus
Here is a version using SOPs.
This is cool! Fantastic use of copernicus sdf's and the trace sop. Time to study this wrangle.

Glad you like it. Here is a breakdown of the wrangle:

// PARAMETER
float speed = chf('speed');
//A multiplier float parameter to adjust the speed of the movement.

// UVW
int num = nuniqueval(0, 'prim', 'copynum');
// The total number of individual integer values of the copynum-attribute.

float u = i@copynum / (num - 1.0);
// Division of the copy number by the total number of copies, effectively creating a float ranging from 0.0 to 1.0 across all copies so each copy gets offset along the curve later.

v@Cd = set(u, 1.0 - u, 0.0);
// Visualization of u ranging from green to red.

// OFFSET
u = (u + @Time * speed) % 1.0;
// offsets u by the current time multiplied by speed. the modulo operator sets values above 1.0 back to its remainder. eg. 1.05 turns into 0.05

// CURVE ATTRIBUTES
vector uvw = set(u, 0.0, 0.0);
vector pos = primuv(1, 'P', 0, uvw);
vector nml = primuv(1, 'N', 0, uvw);
vector up = primuv(1, 'up', 0, uvw);
//The u float value becomes part of the vector uvw to look up position, normals, and up vectors from the curve on the second input.

// TRANSFORMATION
matrix xform = maketransform(up, nml, pos);
setpackedtransform(0, i@primnum, xform);
// Converting these three vectors into a transformation matrix that gets applied to the packed chain elements.
Edited by Konstantin Magnus - 2026年6月13日 06:01:58
https://procegen.konstantinmagnus.de/ [procegen.konstantinmagnus.de]
User Avatar
Member
406 posts
Joined: 8月 2018
オフライン
It's not APEX, but couldn't this be done simply with the Chain SOP?
User Avatar
Member
12 posts
Joined: 11月 2024
オフライン
AntonMoss
Image Not Found


Here's my quick attempt at a solution. I'll upload another version using a more practical example when I get around to it.


Really looking forward to it when you have time to upload your other version.
User Avatar
Member
20 posts
Joined: 3月 2015
オフライン
guoli
AntonMoss
Image Not Found


Here's my quick attempt at a solution. I'll upload another version using a more practical example when I get around to it.


Really looking forward to it when you have time to upload your other version.

Here's a far better solution. I still have to clean up the file and upload it later today.

Attachments:
apex_chain_v002.gif (9.1 MB)

User Avatar
Member
12 posts
Joined: 11月 2024
オフライン
AntonMoss
guoli
AntonMoss
Image Not Found


Here's my quick attempt at a solution. I'll upload another version using a more practical example when I get around to it.


Really looking forward to it when you have time to upload your other version.

Here's a far better solution. I still have to clean up the file and upload it later today.
Image Not Found
Really looking forward to your masterpiece
User Avatar
Member
20 posts
Joined: 3月 2015
オフライン
As promised. I've attached the needed subgraph and component you'll need for this to work, along with the hip file.
Edited by AntonMoss - 2026年7月2日 03:27:28

Attachments:
apex_chain_v003.gif (3.6 MB)
apex_chain.zip (9.1 MB)

User Avatar
Member
819 posts
Joined: 8月 2013
オフライン
Hi. Im following this thread.

I have grabbed your zip file. If I view your am_chain node the chain vanishes. Does your am_chain.2.0.bgeo need to be copied somewhere (i'm guessing that is the issue).

Best. Mark

Attachments:
Screenshot 2026-07-02 083951.jpg (346.8 KB)

User Avatar
Member
20 posts
Joined: 3月 2015
オフライン
Mark Wallman
Hi. Im following this thread.

I have grabbed your zip file. If I view your am_chain node the chain vanishes. Does your am_chain.2.0.bgeo need to be copied somewhere (i'm guessing that is the issue).

Best. Mark

Yes, make sure you copy the folders, apexcomponent and apexgraph, and put those in your $HOME directory for houdini. Windows - C:\Users\Username\Documents\houdiniX.Y
Edited by AntonMoss - 2026年7月2日 05:19:54
User Avatar
Member
819 posts
Joined: 8月 2013
オフライン
thanks!
User Avatar
Member
12 posts
Joined: 11月 2024
オフライン
AntonMoss
As promised. I've attached the needed subgraph and component you'll need for this to work, along with the hip file.
AntonMoss
As promised. I've attached the needed subgraph and component you'll need for this to work, along with the hip file.
AntonMoss
As promised. I've attached the needed subgraph and component you'll need for this to work, along with the hip file.
Wow, you're amazing!!! I can't express my gratitude to you in words!

You’re really awesome, thank you!!!
  • Quick Links