Jump to content

Sign in to follow this  
Boomba

Have balls fall into a bell curve

Recommended Posts

Hey all,

So I want to have a bunch of ping pong balls fall down randomly but end up falling into a bell curve shape. (attached)

Right now I just have a ball with collision thrown in a cloner, and I drop the balls down into some invisible tubes. In order to get the Bell Curve shape I am doing a LOT of cheating and fakes with wind, invisible planes deflecting, I have an attractor object in the middle trying to pull some balls there... it's a mess. The problem is I need to make 2 or 3 different ones, with a bit more control over how they land.

 

Is there some sort of effector(s) I can use to change how the balls land, like more in the center and less on the sides, etc?

I'll eventually need to change the color of the balls on the edges, which I can do in After Effects but it would be cool if whatever I could use to direct the falling could also change the color if possible.

 

Any suggestions welcome. Thanks!

Screen Shot 2019-11-12 at 8.54.57 AM.png

Share this post


Link to post
Share on other sites

If I remember correctly you can create your shape you want them to form and then hide it from camera/render, but can put a dynamic tag on it so the balls fall into it.

 

https://greyscalegorilla.com/tutorials/how-to-use-dynamics-particle-emitters-and-different-camera-angles-in-cinema-4d/  This tutorial might help in some way, was one of the first ones I tried out 4.5 years ago when I took up cinema 4d. 

Share this post


Link to post
Share on other sites

Yes! As daddycoull mentioned there are dynamic forces called "follow position" and "follow rotation." These forces will work to bring your object back to the position it held BEFORE dynamics. This position could be determined by animation keys, mograph, or by it's initial position.

 

You could set up the balls like you like around the bell curve, and then offset them via mograph. Then allow the dynamics to play, while animating the follow position force. As it increases, the balls will fight to reach their position on the bell curve, while smacking into each other with dynamics.

 

The follow rotation position wouldn't be needed in this case, because they are spheres. But if you had say, a bunch of letters flying along the curve, and you wanted all the letters to sit in their right spot AND upright and perfect, you could you the follow position combined with follow rotation to achieve that.

Share this post


Link to post
Share on other sites
  • Topic Author
  • Thanks guys.

     

    I did I version of @daddycoull 's suggestion, and I think I can sell it.

     

    @Asd your method sounds interesting, but I would need to find a tutorial that was pretty close to what I want to do I think for me to figure it out in time.

     

    I can't quite imagine how the balls would all fall into their slots in order so that one that needs to get lower in a slot won't be stuck on top of another once they are all jumbled up. Also I'd like it to look fairly natural, not like they all decide to sort themselves at the end. 

    As always, you guys rock, thanks for taking the time to help those less knowledgeable than yourselves!

     

    Share this post


    Link to post
    Share on other sites

    (from a noob)  Often when I see these kind of things, depending on the effect, I think it would be easiest to render it backwards:  START with all the balls in place, and then apply effectors, gravity, etc to move them way from their final positions.

    It'll look different, dynamics-wise, just like all reverse footage does, but it might be ok.

    Share this post


    Link to post
    Share on other sites

    A bit off topic, but related to balls and bell curves -

     

    There's a gadget called Galton's board (also Quincunx) where balls fall through a honeycomb of collider rods, and into some collection channels. The math says the distribution in the collectors should be a bell curve. It's related to Pascal's triangle.

     

    I made one a few years ago -

    it's just a glorified egg-timer...

     

    https://www.mathsisfun.com/data/quincunx.html

    https://en.wikipedia.org/wiki/Bean_machine

    Share this post


    Link to post
    Share on other sites
  • Topic Author
  • not off topic at all, that's what I made originally!

    unfortunately it doesn't really seem to work that way. The balls tend to pile up on the edges too, although I guess maybe if you make the thing crazy wide it could work.

     

    But I also need to be able to somewhat control which slits the balls fall into.

     

    Share this post


    Link to post
    Share on other sites

    Did you have a honeycomb array of colliders ? If you look at the math, each collider is a left or right decision and the number of possible paths to the channels is a bell curve.

     

    My model is a fair approximation, but I think maybe the balls colliding with each other affects the result - I should have had the balls more spaced out time-wise. Stats being what they are, you get the best results with a large number of objects.

     

    I made that scene in R14 - before honeycomb cloners 😠

    Share this post


    Link to post
    Share on other sites
  • Topic Author
  • no, I made a grid of pegs then added a random effector, so they were not spaced mathematically. You also have more slots for them to fall into than I did, which likely helped keep them from bunching up at the sides when they hit the invisible side walls I put to keep them from rolling everywhere.

    Share this post


    Link to post
    Share on other sites
    8 minutes ago, Boomba said:

    then added a random effector, so they were not spaced mathematically

    I think it has to be an even honeycomb, the same pitch as the channel spacing, to get a nice bell shape.

    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.

    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  

    • Recently Browsing   0 members

      No registered users viewing this page.

    ×
    ×
    • Create New...