Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

system variables in cm scale, (also bug case)

Discussion in 'Physics for ECS' started by Sab_Rango, Mar 2, 2021.

  1. Sab_Rango

    Sab_Rango

    Joined:
    Aug 30, 2019
    Posts:
    121
    Hey!
    I noticed that Dots physics has a artifact when objects are too small, e.g. below than 0.5 meter.
    here the video


    bug case : _1318627_


    I am pretty sure that these 20cm object will not give such artifacts when the system in centimeter scale not meter one.

    Also, this case is crucial to me! Since, while I am making joint system to my physics based AI characters, they(pets, mice, cats) all need to be in small scale like 20cm.
    More, their fingers must be about 1 cm.

    Typically, I solve this issue by scaling up characters in the legacy physics engine. Yet this limits to stuck at that large scale.

    Is there any way to scale down DOTS physics system variables into cm resolution?
    So then , any 2 meter characters can interact with 10 cm characters.
     
    Last edited: Mar 5, 2021
  2. milos85miki

    milos85miki

    Joined:
    Nov 29, 2019
    Posts:
    197
    Hi @Sab_Rango , the problem is in the bevel radius setting in the physics shape component. Bevel radius makes edges of box colliders curved, avoiding problems with sharp objects. It doesn't change with scale.

    For smallest boxes, bevel radius of 5 cm is too big. Although it doesn't look problematic in the scene view before playing, when you play the scene and turn on "draw collider edges" in physics debug display component you'll see that the actual collider is too "thin".

    Setting it to 1mm for smallest objects and 1cm for middle ones seems to solve all problems. Please let me know if this helps.
     
  3. Sab_Rango

    Sab_Rango

    Joined:
    Aug 30, 2019
    Posts:
    121
    Thx! Yep, It works!!! After visualizing, it became clear!

    Can you help me to figure it out how "force variables" works in the engine! ?:)
    As I mentioned, I am going to interact small 10cm sized joint system characters with large environment and characters joint system.

    And, here every milli-Newton force variable is important to achieve 1mm to 1mm objects interactions ! For instance, I create usual scale( 2m) humanoid-joint-system , and then scale down into say 5 mm. And, this tiny scale world should run like usual scaled world interactions.:eek:

    I think I am going to lose some of big precision when I implement these tiny physics system to the engine.

    How can I safely transit my normal scale (2m) objects to tiny dimension (1mm) to achieve 100% precision force response and collision detection in the any tiny scale?:)
     
  4. milos85miki

    milos85miki

    Joined:
    Nov 29, 2019
    Posts:
    197
    Is it possible to scale everything up by ~10x and let humans be 20m and smallest objects 1-5 cm?
    That way I think you'd be in a safer zone, since floating point imprecision will have less influence.
     
    Sab_Rango likes this.
  5. milos85miki

    milos85miki

    Joined:
    Nov 29, 2019
    Posts:
    197
    Our recommendation would be the range 10cm - 10m, so would definitely recommend scaling up those 1-5mm objects.