Scale Scale Scale (Translating Floats To Real-World Units)

Post Reply
User avatar
KKlouzal
Posts: 44
Joined: Thu Mar 06, 2014 5:56 am
Location: USA - Arizona

Scale Scale Scale (Translating Floats To Real-World Units)

Post by KKlouzal »

I'm refining the scale for objects in my simulation and I thought a good place to start would be to look at the size of real world objects when I ran into an issue. What does 1.0F really mean to bullet? How can that be measured in meters for example?

It is to my understanding that bullet performs better using small scales so once I figure out what 1 meter equals in floats I could just scale my real world measurements down to use centimeters or even millimeters.

Thank you for your time.

EDIT:

Correct me if I'm wrong but, I've come to the realization that I'm free to set 1 float to be whatever I want it to be in real-life units, it's just picking what that should be I suppose is the real question here, after some digging around on google and in the forums it seems like 1.0F == 1M is a good choice? What about you guys, what have you chosen for unit sizes?
c6burns
Posts: 149
Joined: Fri May 24, 2013 6:08 am

Re: Scale Scale Scale (Translating Floats To Real-World Unit

Post by c6burns »

Yes 1 unit is whatever you want it to be. I am using 1 unit = 1 meter in rendering and physics and it has worked well. Obviously if you are simulating a microscopic environment, 1unit = 1meter will work out terribly. Likewise simulating a massive universe in that scale would probably not work out very well either.
Granyte
Posts: 77
Joined: Tue Dec 27, 2011 11:51 am

Re: Scale Scale Scale (Translating Floats To Real-World Unit

Post by Granyte »

if you are using bullet double precision you can technicaly fit a somewhat realistically sized solar system using 1 = 1 meter
but ya what ever float your boat as long as the floating point error does not get in your way

how ever irrlicht will really not like you at this scale
User avatar
KKlouzal
Posts: 44
Joined: Thu Mar 06, 2014 5:56 am
Location: USA - Arizona

Re: Scale Scale Scale (Translating Floats To Real-World Unit

Post by KKlouzal »

Well I'll never be dealing with objects smaller than 6x6x1 and that's in inches, and objects that small would be a rare occasion, more common small objects would be 3x3x3 in feet, so 1x1x1 meters.

I'm just trying to find a good real life value to use when I think of 1.0Float so I can get all my models and what-have-you to the correct scale, and like I said before, I'm pretty sure you want to use the smallest scale possible as constraints and such function better, not to mention you wont run into floating point precision issues as quickly.
Post Reply