To scale or not to scale

Post Reply
AAverin
Posts: 9
Joined: Tue Apr 15, 2014 4:49 am

To scale or not to scale

Post by AAverin »

Read a few topics and a wiki article about scaling, but still got a question.

Objects in my world a relatively small. In real world they would be about (1cm x 3cm x 0.5cm), and I plan to have at least 1.000 of such objects colliding and interacting.
So the question is, should I scale the world?
As I understood, by default Bullet uses 1unit=1m, so in my case every object becomes smth like (0.01 x 0.03 x 0.005) in units.
Is it too small? Should I scale it up, say, 10 times?
Or the latest improvements to bullet since 2012 make such sizes good enough to work with?
AAverin
Posts: 9
Joined: Tue Apr 15, 2014 4:49 am

Re: To scale or not to scale

Post by AAverin »

A little update for a better picture.
I plan a world to be 5x5 real meters with up to 5000 small objects of (1cm x 3cm x 0.5cm).

Considering Bullet 1u=1meter that makes
World of 5u x 5u with objects of (0.01 x 0.03 x 0.005)

Should I scale everything 10 times?
It will result in:
50u x 50u with objects of (0.1 x 0.3 x 0.05).
I see that it should be easier to operate with objects themselves, but wouldn't 50u be too much?
Basroil
Posts: 463
Joined: Fri Nov 30, 2012 4:50 am

Re: To scale or not to scale

Post by Basroil »

How much you scale depends on what your shapes are, but scaling them close to unity works best usually. So for your shapes, maybe multiplying by 100 will get you close to unity. If you watch your margins and have high enough framerate though, sizes as small as 0.05 can work fairly well.
AAverin
Posts: 9
Joined: Tue Apr 15, 2014 4:49 am

Re: To scale or not to scale

Post by AAverin »

Thanks.
I tried scaling x5, and physics now looks much more solid and accurate than before.
So I guess with objects that small it would be better to scale everything.
Luckily I didn't yet use anything complex, so I just scaled up the models - rigidBodies just use model dimensions.
Post Reply