How To Convert Studs To Real World Units

How To Convert Studs To Real-World Units

#1 How Can This Be Useful?

There are many ways that converting studs to actual real-world units can be helpful. To not make this tutorial too long I am going to go over a few ways that converting studs to real-world units can be helpful.

#1: Vehicle System

If you are making a vehicle system converting studs to real-world units can be one of the most important things. This is due to the fact that if you want the player to have a good understanding of how fast they are going you must display the speed through real world units that the player actually understands and not the exclusive Roblox unit “Studs”.

#2: Distance Calculation

When displaying distance calculation it is important the player has an actual understanding of the unit that is being displayed. If the player may not have this understanding they may not have a proper sense of distance which can hinder the player’s overall game experience. This is the reason why converting studs to real-world units can be useful inside of a distance calculation situation.

#3: Size Calculation

In a Size calculation situation converting studs to real-world units can be very helpful. This is because it can provide insight into the real-world sizes of various objects that are present inside of your Roblox experience. And heck I bet everyone has wondered how tall a Roblox humanoid is.

#2 Where Did I Get My Math From?

The way I got my math is actually simple I went over to the world screen and I found out that 1 stud of jump height is equal to 0.28 meters. You can count on this being accurate as this is as close as we can get to Roblox officially stating that 1 stud is equal to 0.28 meters and I do not expect this to change in the future but it may.

#3 How Can I Do This?

Converting studs to real-world units is simple. Under this text, there will be functions you can use to convert studs to various real-world units. Furthermore, I will explain on how you can add even more unit conversion capability.

Code Below:

function ConvertToMeters(Studs)
	
	return 0.28 * Studs
	
end

function ConvertToFeet(Studs)
	
	return 0.91863517 * Studs
	
end

function ConvertToMiles(Studs)
	
	return 0.00017398 * Studs
	
end

#4 How To Add More Unit Conversion Capability?

It is very simple how you can add more unit conversion capability. So for example I will be converting Roblox studs to a very precise measurement known as centimeters. The way we can do this is very easy because of the fact that we know that one stud is equal to 0.28 meters currently so all we have to do is convert 0.28 meters to centimeters. After the conversion, we know that 0.28 meters are equal to 28 centimeters. So all we have to do is multiply 28 by the number of studs.

Example Code Below:

function ConvertToCentimeters(Studs)
	
	return 28 * Studs
	
end

#5 Video Example

35 Likes

If you ever want to convert velocity I gotcha

function CovertToMS(Velocity) -- Roblox Velocity is Studs Per Second so
	return Velocity/3.57 -- there are 3.57 studs in 1 meter
end

function CovertTokMH(Velocity) -- Roblox Velocity is Studs Per Second so
	return Velocity/(3.57*1000)/3600 -- there are 3.57 studs in 1 meter
end
9 Likes

Also tell me how I can convert roblox mass into Kg : / yea idk how 2 do dat : /

4 Likes

Density is in a unit where 1 = water, and that value is flatly multiplied with volume to derive the part mass (with Part:GetMass()). So you can figure out the mass in kilograms based on the real-life rule that 1 cm^3 of water ≈ 1 gram.

So the rule you use can look something like this:

local convertToKG(mass: number)
    return mass * 21.952
end

If you make a part with a density of 1 (the default for plastic is 0.7) and make it 1m^3 (3.571 studs in each direction), that function will return 1000 kg.

Some parts of the engine might not interpret these units the same way though, so take them with a grain of salt.

16 Likes

Thank you for helping @Qinrir with converting Roblox mass.

1 Like

Damn thats cool. But 1 thing. What unit does BasePart:GetMass() use?

2 Likes

It’s a function that returns the mass of the base part as a value.

1 Like

I said unit like SI unit not magnitude. Like KG G MG. I think its Stud^3

2 Likes

I don’t believe it has a name, but you could define it as “the mass of 1 stud^3 of water”. Sort of like how the kilogram was originally defined this way. (It was later changed to be defined a different way so it could be measured more precisely.)

2 Likes

Yea then i was correct anyways thanks mate.

2 Likes

Hey I also calculated the 21.952 number! The only difference is my density is 21.952 times smaller than real life density versus my mass is 21.952 times smaller. I used the equation Force = Mass * acceleration to find mass.

A force of 9.8 newtons (or opposite to gravity) is required to hold a mass of 1kg in place. So I used a vector force with the same units as my gravity and a block with a mass of 1 held perfectly in place till I altered one of the values. Thus 1kg is 1 roblox mass. I also made a different conversion that is much more complicated but provides the same results on my dev forum post just in case the vector force and gravity acceleration arent the same units.

As for you saying the engine might not interpret those parts the same is a little concerning especially considering my properly weighted car flywheel wasnt making a realistic amount of angular momentum. I hope that my posts can help clear up a the conversions behind the scenes in time for the physics inertia and volume fix full release.

2 Likes

Using this conversion method, a standard R6 character weighs 277 kilograms. More or less the same for R15.

This definitely does not feel right

1 Like

A Robloxian is just your average American, so it just makes sense.

Hopefully we can get a 100% correct equation to use for conversion though.

1 Like

This is what I meant by the engine not treating everything consistently. But it’s important to note just how unrealistic/stylized the proportions of R6 characters are. Try this with an Rthro bundle and you’ll get a much different result.

Like think about what an R6 character would look like in real life. They would be 6 feet tall, shoulder span of 4 feet, have arms that are a foot thick, and be made of completely solid plastic. That would weigh a lot compared to a normal human.

1 Like

What about materials? Are they scaled using the number you provided earlier?

1 Like