# Understanding Roblox Physics and Their Conversions to Real Units

Introduction

Hello Developers and Modelers, do you ever find the stud to be a confusing unit? And to all you using constraints, what units is spring stiffness and dampening in? What about mass, it means nothing because there is no provided conversion.

Well I also wondered those questions and found that this 16 year old game still has unconverted units.

Today I will make modeling and physics-tuning easier than ever by providing the conversions and proofs for every Roblox unit.

Conversions for those that donâ€™t like reading and/or donâ€™t need proof.

3.571428571 studs = 1 meter
1 Roblox mass = 1 kg
21.952kg/studs^3 = 1 gram/cm^3
1 spring stiffness = 1 newton/meter
1 spring dampening = 1 newton/meter/second
3.571428571 motor torque = 1 newton/meter

Also check out my kit which converts studs to Imperial and Metric units, provides a physical mass and stiffness proof, and restates basically everything I said here.

Length

Studs to real units are going to be easy to prove but lets discuss other commonly used conversions first.

Note that you can use any unit you like for measurement but all the other conversions I will discuss later you will have to calculate differently.

1. 1 stud = 1/20 of a meter, or 5 cm. Robloxâ€™s default gravity is 196.2, using this conversion it works out to 9.81 meters/second^2. A character is 5 studs high which means its only 25cm high (.25 meters or almost 10 inches). The developers confirmed this one in an old blog post.

2. 1 stud = 1 foot. Gravity in this scenario is set to 32 feet/second^2, like real gravity.
A Roblox character is 5 feet tall in this scenario. Great choice because the units are easy to work with.

Well that blog post was published in 2012 and Roblox now has a realistic gravity mode. The change is that Roblox characters are now really close to a regular persons height in meters.

Lets provide the conversion.

Open studio and load up any place.
Click â€śFILEâ€ť in the top left corner.
Then click â€śGame Settingsâ€ť.
Lastly click â€śWorldâ€ť.

When finish the steps the page should look like this:

On this page it provides a conversion from studs to meters. Lets use the gravity settings specifically to make an equation to find the conversion.

35 studs/second^2 = 9.8 meters/second^2
35/9.8 studs/meters = 0
3.571428571 studs / 1 meter or
3.571428571 studs is in 1 meter.

Type that in the gravity to see if you get 1 meter/second^2

Then remove the decimal place and type a bunch of zeros after it to test the accuracy.

Okay thatâ€™s pretty accurate. Re-entering those numbers back into the equation again does not give different results due to my calculator not having enough decimal places.

I like to use these settings because it makes Roblox characters taller than the 1stud = 1 foot conversion.
You can use any unit you like for measurement but some of the other conversions I will discuss later you will have to plug in your own stud to meter into the formula.

Mass

On this dev forum post there are many answers for what Roblox mass is each of them different from the other.
All of the answers seemed to have mistakes so I made my own proof.

I used the â€śmass = volume * densityâ€ť equation to originally prove my point but it was way too complicated to be understandable. I also made an assumption in there so I tried proofing it with another equation.
Another equation for finding the mass of an object is â€śMass = Force * Accelerationâ€ť.
I needed some way to apply a force to a part. Roblox provides vector forces which apply an acceleration based on how heavy the object it is pushing is. Perfect.

A typical unit for force is a newton, it defines how fast it can accelerate a mass. 1 newton can accelerate 1 kg at 1 meter/second^2. 9.8 newtons can move 1kg at 9.8 meters/second^2 and counteract gravity.
Therefore we need a force the exact opposite as the game gravity to determine mass.

We convert 9.8 newtons, aka kg/meters/s^2 to kg/studs/second^2 by multiplying by 3.571428571 to get 35 kg/studs/second^2 or 35 Newton-studs as I like to call it. This proves out units will be in Kg too.

Force = Mass * Acceleration
F = MA
35 = M35
35/35 = M
M = 1
Roblox mass is equivalent to real life Kg.

1 Kg = 1 Roblox mass.

Here is the overly-complicated proof for those interested:

Alright time to prove mass, a one stud block in Roblox with a density of 1 has a mass of 1. Also blocks with a density of 1 float on Roblox water. Cool, water has a density of 1 gram/cm^3, so Roblox must measure density in grams/cm^3 so now we can calculate mass. Unfortunately Roblox acts like density is measured in g/cm^3, but actually 1 stud cubed has a density of 1, not 1 cm cubed. This must mean that the unit mass/studs^3 is Roblox density and mass is unknown. Lets assume its kg and use kg/m^3 and convert it to kg/studs^3. Water has a density of 1000kg/m^3. We divide 1000 by (3.571428571)^3 or 45.55393586. Our new density for water is 21.952 kg/m^3. If we make a block in Roblox that is 3.571 studs long and has a density of 21.952, we get 999.64 mass, really close to 1000kg. Those small imperfections come from Roblox rounding the size of the cube to 3 decimal places.

Roblox mass will always stay the same no mater what 1 stud stands for, because of the way density/force is converted to real units.

Density

First of all density is a pretty useless measurement when it comes to making your game realistic. The density of a part only makes it float on terrain water and contributes to the mass of a part (which is important).
Secondly density is complicated to calculate, it might be hard to follow along

Before I calculated it however I made an educated guess. A part with a density of 1 floated on roblox water.
Water in grams/centimers^3 has a density of 1 too.
This sounds really logical, but now that we have our conversions we find that a part that weighs 1 gram and is a centimeter does not float on Roblox water (note that the mass is higher than 1 gram becuase we only got 2 decimal places to size the block).
Lets use the mass = volume * density formula to find out our density but first convert our volume units.

.01 meters^3, needs converted to studs^3

``````--conversion
.01 meter^3     (3.571428571 studs)^3
------------ * -----------------
1		  		1 meter^3

--crossed out and simplified
.01 	  	  45.55393586 studs^3
-------- * ----------------------
1		  		   1

--removed denominator
.01 * 45.55393586 studs^3

--multiplied
.4555393586 studs^3 = volume

--Plug volume we just calculated into formula to get density
mass = volume * density

--substitute
.001kg = .4555393586 studs^3 * d

--simplify
21.952 kg/studs^3 = d
``````

21.952 Roblox density is equal to 1gram/cm^3

We switched our grams to KGs to keep the units in line with our mass.

To calculate the density of any material look up its density in gram/cm^3 and multiply it by 21.952.

Also if you want your part to float on Roblox terrain water while maintaining the correct mass make an invisible weight brick with the density in g/cm^3 and the volume 21.952 times bigger than the original part.

This is only useful in situations where the part is the exact volume as the real thing, if not just get the mass right.

Spring Stiffness/Dampening

Ok lets calculate spring stiffness. There is a periodic motion formula for springs that bounce up and down. If we know the max extension or compression of the spring and the force constantly pushing it down we can calculate spring stiffness.

The formula goes like this: Force = Stiffness * Extension. Lets put the stiffness on one side by rearranging. Force/Extension = Stiffness. We already know our conversions lets calculate.

(This is segments from a script I made that determines spring stiffness included in the model listed above. Iâ€™ll also provide the results in screenshot form.)

``````local spring = script.Parent.Top:WaitForChild("SpringConstraint")
local studtoMeter = 3.571428571 --How many studs are in a meter.
local Force = (((workspace.Gravity)/studtoMeter)*script.Parent.Top.Mass) --[[
This is the constant downwards force on the spring in Newton meters.
Newton meters are mass multiplied by gravity.
We convert in game gravity to meters and multiply it by the mass that we are
pushing.
Assuming our mass is still 1kg and the gravity 35 studs/second^2, we should
get 9.8.]]
print(Force)

length = {} --makes a table for us to store all our numbers
while true do
wait(.0667)
local sLength = spring.CurrentLength --Gets the length of the spring in studs
table.insert(length, sLength) --Inserts all spring lengths into table
table.sort(length,function(a,b) --Sorts by lowest and highest
if a > b then
return a
end
end)

local lLength = length[table.getn(length)] -- lowest number
local hLength = length[1] -- highest number
local amplitude = ((hLength-lLength)/studtoMeter) --[[We want the amplitude now.
We subtract the highest and lowest value to get the amplitude and convert to
meters to keep similar units with our force.]]

local stiffnessNm = Force/(amplitude/2) --[[The formula just calls for the
extension/compression length so dividng by 2 will give us that]]

print("Calculated spring stiffness is",stiffnessNm,"Newton/Meters. Original stifness is", spring.Stiffness)

end
``````

I find it weird that spring stiffness wasnt in Newton/Studs. Slacking off there Roblox lol. The calculated stiffness was really close to the real one.

The only reason we didnt get a solid 100 for stiffness is not enough decimal places for the stud to meter conversion.

Roblox spring stiffness is in Newton/Meters.

Its a logical assumption to say that spring dampening is in Newton/Meter/Second, aka Ns/M, plus I have not made a proof yet because I have no clue how to.

Thanks for reading my first dev forum post! I really hope this helps lots of developers to take their games to the next level and clears up confusion about any Roblox units. Hopefully the next games that want to be realistic now will no longer feel like typical Roblox and will wow their players on how their game mechanics feel like real life.
If any Roblox staff reads this I would like to hear if they know the conversions to these units, or if they can correct/provide more precise conversions than I can.

34 Likes

Give this guy a hand, he probably took a day to type this

I really liked the thorough explanation and that it doesnt spare any details, good job

8 Likes