Jump to content

  • “Great art picks up where nature ends.”  Marc Chagall 

Sign in to follow this  
ericperley

Xpresso / Mograph Help

Recommended Posts

Hello and thanks for taking a look!

 

I have a conveyor system that I've rigged with Xpresso. Essentially, labelled containers go along a conveyor path and are rotated by rubber belts so that all labels face forward.

 

I use a random effector with a short falloff to randomize the rotation of the containers before they enter the rubber belts, and to correct them (to face forward) once they do enter.

 

What I'd like to do (as I'm trying to automate this entire thing) is to use the same falloff range (affecting the container clones) to rotate the rubber belts as well. I imagine that the falloff would read the index of each approaching clone, calculate the angle change in rotation (for example, index 45: 40-degrees to 0-degrees; index 46: 27-degrees to 0-degrees; etc.) and then map that value to drive the rotation of the belt. 

 

But I don't know how to do this! Any help / insight / tips would be greatly appreciated. I'd love to wrap my head around this.

 

I've attached a screenshot of the assembly. The clones are traveling towards the bottom left and the rotation is being corrected inside the linear falloff. The black / white tiled belt is what I'd like to drive. 

Screen Shot 2018-08-23 at 4.54.03 PM.jpg

Share this post


Link to post
Share on other sites

Can you post a simplified version of the scene? There could be easier ways to approach this


Free C4D trainings from MAXON professional on our youtube channel

 

https://www.youtube.com/c4dcafe

Share this post


Link to post
Share on other sites
  • Topic Author
  • Hey Hrvoje,

     

    Thanks for taking a look! I've attached a simplified assembly and stripped out the un-related Xpresso.

     

    Cheers!

     

    Eric

    assembly_simple.c4d

    Share this post


    Link to post
    Share on other sites

    Ah, I see :)

     

    To get data from clones you need to use MoGraph data node. Then, by changing index value you access specific clone. Here is a quick example

     

    Assembly_0003.c4d

     

    Now, what you want to do and expand on this setup is to calculate the difference between initial clone rotation and end rotation, and use that value for you range which will drive offset in cloner during one interval (you have to accumulate this value, python node can do it easily). As a result, with each interval, offset will be added whcih corresponds in "amount" of rotation. Hope this helps

     

    Cheers

     

     

     


    Free C4D trainings from MAXON professional on our youtube channel

     

    https://www.youtube.com/c4dcafe

    Share this post


    Link to post
    Share on other sites

    In this file I used a copy of the initial random effector to reverse the random can rotation, dynamics proximity to get the clone index, and a bit of python ...

     

    cans rotate.c4d

     

    it's as close as I could get - some ideas for you anyway

    Share this post


    Link to post
    Share on other sites
  • Topic Author
  • Wow! Really amazing help. Thank you both so much! I think I've wrapped my head around it -- and am totally surprised by the dynamics proximity workaround. I've really got to delve into the power of python. 

     

    I wish I could buy you both a beer! Thanks again.

    Share this post


    Link to post
    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.

    Sign in to follow this  

    About Us

    C4D Cafe is the largest Cinema 4D community. We provide facilities for discussion, showcasing and learning our favourite software.
    Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, watch tutorials directly from our video gallery,  get your own private messenger, post and upload images, manage your profile and much more. If you need to find solution to your problem or otherwise ask for help, C4D Cafe is the right place to be for learning 3D.  :cowboypistol:

    ×
    ×
    • Create New...