Default Box2D units

I'm using Box2D in my game and I'm having a little problem.

I know Box2D has some issues with very small objects (I think I read it in the manual). Besides, when the pixel to meter ratio used to render the objects in my "physics world" becomes very large (for example 1000 pixels = 1 meter) then the values I get from the vertex array of Box2D shapes start becoming less and less exact.

For example, at 100 pixels = 1 meter things are rendered ok, collide between them nicely and everything looks good. At 1500 pixels = 1 meter, things start to look weird, The shapes are rendered with some kind of offset (when they collide they don't touch each other visually, but collide a few pixels from being completely next to each other).

I think the problem lies in the default units in Box2D. My game can't use a pixel ratio of 100 because the things I'm trying to model are small objects that are at most 1 centimeter long in the real world. If I make them any longer they fall slowly (they have to travel a big distance in meters to reach a certain point).
If the ratio is bigger, each pixel represents a smaller distance, and traveling 100 pixels in less time would require less speed, hence the objects would fall faster.

What I need to know is if there's a way to use centimeters as the default length value so that I can have a lower pixel ratio (like 100) and still use "more precise" values to render my objects. I tried to look the b2Settings.h file but had no luck figuring out which constants to change.

Thanks in advance.
There are no constants about that... Didn't you read manual/faq/wtf?
Becouse of flaoting point precision you should not make objects smaller than 0.1 and larger than 10
How can I go about increasing the acceleration due to gravity to make objects fall faster and at the same time using the same forces I use with normal gravity to move them upwards? If I increase the gravity objects are "harder" to move upwards. Scaling the force is not an option. I tried to decrease the objects' mass with SetMassData but they don't seem to be "lighter". I have very limited knowledge in physics 😳 , so please if I'm making something wrong I'd appreciate some advice...
jdoo130 wrote:
For example, at 100 pixels = 1 meter things are rendered ok, collide between them nicely and everything looks good. At 1500 pixels = 1 meter, things start to look weird, The shapes are rendered with some kind of offset (when they collide they don't touch each other visually, but collide a few pixels from being completely next to each other).


I think you are mixing up your rendering process with your physics process. Your rendering process can scale the data it receives from Box2D.

An example of what I'm doing is that my smallest object 0.1f appears as 1 pixel on screen and my largest object 10.0f appears as 100 pixels on screen. My scale factor is 10.
So when my game decides to render the graphics it scales everything by 10.

scaleFactor = 10
x = x * scaleFactor;
y = y * scaleFactor;
w = w * scaleFactor;
h = h * scaleFactor;

Original thread: https://box2d.org/forum/viewtopic.php?t=6714