Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Need help getting realistic billiard break simulation

Discussion in 'Physics' started by EliJNemer, Sep 2, 2019.

  1. EliJNemer

    EliJNemer

    Joined:
    Aug 3, 2019
    Posts:
    38
    Hi,

    I have been using Unity for 2 months now, in the past 10 days i have been working on a project to simulate a realistic billiard game in 3D. The part that i am having trouble with is the break at the start of the game when the balls are racked up.

    The scenario is such: i have the cue ball and the other balls racked up. i give the cue ball an initial angular velocity to strike the rack with a good amount of energy. what happens next is that the balls all move in the same direction instead of splitting apart in different directions.

    They are closely packed so i would imaging that they would kind of act as a single body breaking apart. not many small bodies. this is where i think the problem is. i have tried many different combinations of friction bounciness and all of the sort. i have used PhysX and the new Unity Physics which did give me better results but i am still not able to produce the desired outcome. i have tried to play with the tensor settings of each ball in the triangluar position. making the center ones heavier than the outside ones to try to get the same effect. but i didnt want to go that way because it still didnt allow for the best realism. it seems to me that it is a question of conservation of energy or a question of clustered bodies or both. if someone could help shed some light, it would be of much help.

    i have attached the pictures of the simulation and properties i have used in my dropbox: https://www.dropbox.com/s/7178hstk3iolsgc/Properties And Simulation Pics.zip?dl=0
     
  2. knobblez

    knobblez

    Joined:
    Nov 26, 2017
    Posts:
    134
    I would research the mass of a billiard ball and the max velocity of a billiard players shot. I was having trouble with a bowling game but when I researched the mass of the bowling ball and pins, it made it very realistic. Have you tried using a Rigidbody on the ball? Doesn't look like you have one.

    Also, not sure if your Floor object is the felt on the table but that doesn't seem to have a Physical Material on it. I doubt that would keep them from moving the same direction but I'd imagine it will be necessary.
     
  3. EliJNemer

    EliJNemer

    Joined:
    Aug 3, 2019
    Posts:
    38
    I've been using the new preview of Unity Physics so it uses physics body instead of rigid bodies. But I may go back to the physX engine of rigidbodies because I saw a billiard template on the asset store which has realistic enough physics but costs at least 250 dollars. I think this template was using physX I'm not sure so it made me believe that it is possible. In my model I have the mass of billiard balls exact to realism.

    Also the floor is just the floor. Not the slate of the table. Sorry for the confusion.
     
  4. EliJNemer

    EliJNemer

    Joined:
    Aug 3, 2019
    Posts:
    38
  5. EliJNemer

    EliJNemer

    Joined:
    Aug 3, 2019
    Posts:
    38
    I found The Solution to this. it was simply a fix of the physics properties changing the minimal detection amount to a very small number. since the balls themselves have a radius of 0.028575 the distance between each one of them in when they are racked up is much smaller, thus the collision detection minimum is actually larger than this and the balls end up bouncing all in one direction. i was actually able to create a very realistic break, through allot of trial and error, very similar to the article above, using physic materials.
     
    knobblez likes this.