Itoo Software Forum

Author Topic: Animated boxes on a conveyor belt  (Read 2105 times)

antmarch

  • Newbie
  • *
  • Posts: 34
    • portfolio
Animated boxes on a conveyor belt
« on: September 23, 2016, 12:02:58 PM »
I have to animate a distribution sorting system, (boxes along conveyor belts).  This needs to be looping.  It's taking the principle of the Path Constraint Controller but applying it to Railclone.

First off, I've used a linear array and evenly distributed an instanced object along a path.  This path is a closed spline, and I've used a clipping spline to hide a portion of the path, hence creating a start and end of the path.  Not that important really as it's all off camera.


So then, the theory goes is to animate the X position of the object.  But, obviously the boxes deform at the corners, I don;t want this, so I turn bend off.  Now the objects don't 'turn' at the corners and it no longer follows the spline.


Is there any way around this to create the effect I want?  I really don't want to be working with the Path Constraint controller if I can help it.

I looked at the Tree Editor in Forest Pack briefly but this won;t do what I want.

Michal Karmazín

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2447
Re: Animated boxes on a conveyor belt
« Reply #1 on: September 23, 2016, 01:52:13 PM »
Hi,

I would suggest you a slightly different way - to use a Sequence Operator (with your Segment followed by an empty Segment), linked to the Default slot and "animate" Generator's Padding value (like the Start one, as in attached sample scene). Hope you'll find it useful.

Best regards,
« Last Edit: September 23, 2016, 02:01:10 PM by Michal Karmazín »

antmarch

  • Newbie
  • *
  • Posts: 34
    • portfolio
Re: Animated boxes on a conveyor belt
« Reply #2 on: September 23, 2016, 02:14:10 PM »
Thanks Michal.  I did think of the padding start as a solution, but unfortunately it doesn't loop.  I can set the number in the sequence to occupy the length of the spline, and adjust the padding value, but it runs like a train with a start and an end, I'm looking to make a loop.

Michal Karmazín

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2447
Re: Animated boxes on a conveyor belt
« Reply #3 on: September 23, 2016, 03:18:56 PM »
Hi,

What about starting again from 0, when the end of spline is reached? Attaching an example of such set-up. Hope it'll help.

Best regards,

antmarch

  • Newbie
  • *
  • Posts: 34
    • portfolio
Re: Animated boxes on a conveyor belt
« Reply #4 on: September 23, 2016, 04:29:16 PM »
OK Michal, you've got me thinking when you referred to the out of range controllers.

I've figured something out, that may not be very elegant but could work. 
In my test scene I've created a large rectangle and measured this.  On one linear array, I've followed your suggestion to animate the padding start, so over lets say 2000 frames this value is equal to the length of the spline.  In the sequence operator, I've set the value of 'box' to occupy the distance of the spline, with a suitable padding value.   As you know, the boxes travel along the spline, but as we're animating the 'start' of the array, there is no boxes behind it.   And I want a continuous, looping array, no gaps in the train.

So I copied the RC array into a new one, set it to reverse, and inverted the keys for the padding values, so 0 is at the end, and the length of the spline value is now at the start.  Beginning to look promising.




There are two issues doing this, the most obvious is in the first image, the reversed generator (in white) is offset and overlapping the non-reversed.  I tried adjusting the keys in the curve editor, bumping it along to snuggle up behind, but this then means that the reversed one is out of synch, and pauses before a few frames before the final keyframe.  I could live with a gap in the train, and I could clip the overlap or keep it all off camera, not ideal though.


Either way, I run into another problem and it's because I've added random rotation, which it will need.  At the end of the loop, the boxes between loop 1 and the next, are out.


I may be able to work with this with some careful clipping, and some careful camera pointing and not rendering anything over the loop change, but it's not ideal, and if you are able to elaborate on this any further I'd appreciate it.

Ultimately I have to populate this with zillions of boxes on various splines.  As with most of my models, Railclone has been used extensively to build this. :)

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2991
Re: Animated boxes on a conveyor belt
« Reply #5 on: September 23, 2016, 06:24:18 PM »
Hi,

I'm not sure if this will help or if it's a technique you're after. How about deforming a straight spline around your conveyor belt shape using a Path Deform modifier. You can then animate this spline using the Percent property and add it to RailClone to distribute the objects.

Just for fun you could also add a scripted controller to automatically find the length of the conveyor belt and use this to edit a spline so that it's the correct length to stretch along the path. I've tried this in the attached file using this script:



Obviously this isn't necessary but it could save you time creating splines of the correct length.  :)

I've attached a file in case it's any help, here's a link to a little clip of it working: http://d.pr/v/10BaI

Many thanks!

Paul
Paul Roberts
iToo Software

antmarch

  • Newbie
  • *
  • Posts: 34
    • portfolio
Re: Animated boxes on a conveyor belt
« Reply #6 on: September 26, 2016, 11:34:09 AM »
Paul,

I'll have  a glance through this later, good thinking.