Xpresso: access a Childs Parameter via hierachy and object-list?
Posted: 02 August 2022 10:07 AM   [ Ignore ]  
Total Posts:  22
Joined  2021-01-21

Hi All,

I have a very basic “problem” (i guess) but I can’t find the right solution (on the net) yet.

I have a joint-chain with several joints. I want to access each of the contained joints in this chain via xpresso and address the angle-port of each joint via an user-data input.

My approaches were via hierachy and object-nodes but I couldn’t figure out how to address the angle-port of the joint as I only get object indexes without any joint-properties.

The aim is to adjust the bending of the joint-chain via user-data. As the chain is up to 100 joints I want to automate things instead of manually dragging a ton of objects into xpresso and link them all by hand wink

Edit: at the end, the chain should bend to an archimedical spiral, so each joint angle needs to be slightly iterated.

I hope you understand my intention.

Thanks and sunny regards,

Tom

Profile
 
 
Posted: 02 August 2022 10:57 AM   [ Ignore ]   [ # 1 ]  
Moderator
Avatar
Total Posts:  11628
Joined  2011-03-03

Hi Tom,

One question: Would you like to have all joints operated like in a single Spline interface, or what is your target interface, given 100 Joints? That is an important question.

Cheers

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES member

Photography For C4D Artists: 200 Free Tutorials. Texture, Panorama, HDRI, Camera Projection, etc.
https://www.youtube.com/user/DrSassiLA/playlists

Profile
 
 
Posted: 02 August 2022 11:04 AM   [ Ignore ]   [ # 2 ]  
Total Posts:  22
Joined  2021-01-21

Hi Dr. Sassi,

the purpose is to wrap an object around a tube x-times ... just like toilet-paper. The sum of the joints may depend on the length of the “wrap”. That’s the reason I want to address the joint via xpresso. The joints chain will be controlled by one user data input (and via formel the angle for each joint will be calculated).

Here’s a link what I want to achive: https://de.planetcalc.com/9063/

Thanks and sunny regards,

Tom

Profile
 
 
Posted: 02 August 2022 01:10 PM   [ Ignore ]   [ # 3 ]  
Moderator
Avatar
Total Posts:  11628
Joined  2011-03-03

Hi Tom,

Here are two little examples with a Link List node and an iteration.
https://www.dropbox.com/s/xxavjikm812kk6o/CV3_S26_drs_22_XPja_01-02.zip?dl=0

I hope that gives the pointers you asked for to use the formula you have in mind.

To get 100 joints, I use a MoSpline and make it editable. Then use the Convert Spline to Joints.
After that, I select a Link List, click on it, and lock it in the Attribute Manager, so I have that field for the Objects available.
I select the top joint, followed by Select Children, which allows me to drag all joints into the Link List field.


Please keep in mind that joint hierarchies have some dependencies on the object above them.

Rolling this will have some complexity, which I would solve with animation, not math.
https://www.dropbox.com/s/3xtkq7t78fu6chq/CV3_S26_drs_22_ANrs_01.c4d.zip?dl=0

All the best

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES member

Photography For C4D Artists: 200 Free Tutorials. Texture, Panorama, HDRI, Camera Projection, etc.
https://www.youtube.com/user/DrSassiLA/playlists

Profile
 
 
Posted: 03 August 2022 01:33 AM   [ Ignore ]   [ # 4 ]  
Total Posts:  22
Joined  2021-01-21

Hi Dr. Sassi,

thanks a lot! Now I understand the iterating process etc. Basically it works fine ... BUT ... I struggle to find the right formula so that the “wrap” will not wrap inside itself but on the outside of itself. My first thought was kinda like inverting the order of the iterating process but that was not the correct approach. How ever.

The aim is to wrap a layer around a Pipe several times. I’ve included a sample file.

https://www.dropbox.com/s/o9w10opc7lsv4cv/pipe_with_wrap.zip?dl=0

Sorry to bother you again.

Edit: after a bit of try and error I found a solution for the formula to wrap to the outside. Now, I’m stuck on how to adjust the space between the joints (layers). Here’s the updated file: https://www.dropbox.com/s/bikw3enbincxkk1/pipe_with_wrap_0001.zip?dl=0

Edit2: I forgot to point out why I don’t wanna use MoGraph or Deformers: the final animation will be imported into unity3D for an AR-app and due to performance issues und file-size, sadly no PLA-Animations are possible. That’s the reason for this joint-rig-solution.

Sunny regards,

Tom

Profile
 
 
Posted: 03 August 2022 11:04 AM   [ Ignore ]   [ # 5 ]  
Moderator
Avatar
Total Posts:  11628
Joined  2011-03-03

Hi Tom,

As I wrote, I would do it without the formula.

The simple answer is, given an equal length of joints: With each joint, the coil increases in diameter based on assumed thickness. Wo, we can say that with increasing diameter, the angle one joint describes is less and less than a full circle.

You can get the position of the last joint, which allows you to determine the angle at which it will progress and how much growth in diameter (progress/360 times thickness). This will give you the next point on where to place a joint. That they need to stay in a hierarchy, so they rotate properly should be clear.

Then comes the problem of the feeding part of the coil, which is perhaps straight and moves smoothly into the final angle when it co-creates the coil.

Did I mention I often prefer the more practical approach to use what is given in Cinema 4D, as my last file showed? Combine that with Spline IK. Which then provides all the parts needed for 3rd party use.

All the best

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES member

Photography For C4D Artists: 200 Free Tutorials. Texture, Panorama, HDRI, Camera Projection, etc.
https://www.youtube.com/user/DrSassiLA/playlists

Profile