I’m working on a little unit conversions module, and was looking for help regarding unit conversions for real world units to roblox units and vice versa.
I think it’s safe to sayThis blog post confirms that 1 stud converts to 5 centimeters given workspace.Gravity’s default value of 196.200 (196.200 / 20 = 9.81, and 20 * 5cm = 1 meter).
I was told that representation then allows you to find the relation of 1 kg = 8000 “roblox masses”, but I’m unsure how they came to that conclusion to validate it.
If someone could prove that or find the correct relation, then it’s easy enough to find the conversion from irl newtons to “roblox newtons” regarding force.
I’m not well versed in physics, but I don’t think there’s going to be a real unit in regards to part elasticity, as that’s the coefficient of restitution if I’m not mistaken.
That thread’s only asking for a unit conversion regarding length, to which I’ve proposed above is 1 stud = 5 cm. I’m aware everything is relative to workspace.Gravity, but this thread is specific to unit conversions in relation to the default value of 196.200.
I’ve scoured google and the devforum extensively and I’ve found no concrete answers in any of the limited discussions on the topic extending past the conversion of length units to studs.
I understand that you’re looking for answers based on the gravity level, but I figured it’s worth mentioning that a place built to your proposed scale would look like this:
We can of course base our measurements off of other Roblox features. Personally I like to set one stud equal to a foot, if we then assume that 50kg is an acceptable weight for a Roblox character (since they’re 5ft) we can conclude that each cubic stud is equal to roughly 3.57kg.
That’s exactly what validated the 1 stud to 5cm relationship for me. Roblox was kinda based on that toy that shall not be named. Roblox rigs are 25cm/9.8in tall and made of plastic so it makes perfect sense at that scale.
I’m not quite interested in coming up with an arbitrary scale representation, (when I do I use 1.2 studs to 1 foot. Tried a 1:1 ratio but the cars just looked better a bit larger) but rather the actual conversions from real world to the default values used in roblox.
It was actually that very blog post that kind of sparked this problem. I had already suspected that the physics were accurately represented, but it confirmed that. You’ll get correct results from formulas within the same “unit scheme”, but unfortunately all that blog post does is confirm that “In ROBLOX, one real-world meter is 20 studs.” I’ll edit op accordingly, thanks.
This is valid assuming roblox went with 1g for 1cm^3 for water density not the real maximum of 0.999973 g cm-3. I don’t think a temperature variable model was employed because why would they.
Is that as far as the visual aspect goes? The physics still uses the 5cm/stud scale mentioned above, so I’m really curious as to how the 28cm/stud ratio was found or selected.
Roblox Characters are 5 studs tall.
28 cm is about .9 feet
That puts Roblox characters around 4.5 feet tall.
Which is kinda correct when thinking children can average around 4-4.5 feet tall.
if we assume 1 stud is a foot (i personally do this) and assume 1 density is the density of real water and we create a part that has the size of (3.281,3.281,3.281), set its density to 1 and use :GetMass() on the part it returns: 35.315
and we divide 1000kg/35.315 we get 28.316kg, so 1 Roblox mass is 28.316 kg (or 62.426 lbs).
you will also notice if you make a part with the density of 1 it stays put in terrain water proving 1 density is the density of water
My method is as follows:
To reach realistic physics, I wanted to increase the gravity so that the scale of 1 stud = 0.05 m will be something more reasonable. I saw on a reddit where they accepted 1 stud as 0.28 m because of the Rthro avatar, and that is realistic in my opinion. The problem is that when you divide 0.28 by 0.05 you get 5.6, and 196.2 x 5.6 is 1098.72, and that’s above 1000 (which is the current Roblox gravity limit). So instead I’m assuming that in Roblox, water has a density of 5.6.
I am currently working on a showcase game that involves drag, lift and buoyancy. This post contains a lot of useful information about unit conversion, but I have a different solution for finding how much a kilogram in ROBLOX actually is.
First of all, I just want to clarify that I set the ‘World’ option in ‘Game Settings’ to ‘Realistic’. This option sets Workspace.Gravity to a value that gives you a realistic stud scale that is based on the height of a character. It essentially provides you with a constant that I named ‘STUDS_PER_METER’ that is equal to 1 / 0.28 (this number is also discussed earlier in the replies).
Something that I have not seen in the replies of this post is the following way to calculate the ROBLOX kilogram. I defined the kilogram based on the scale of the stud. This is because in the Realistic setting of the World option, a part that has a size of 1x1x1 with a density of 1 has a mass of 1. A mass of 1 kg would not apply in real life, since we know that 1 stud != 1 meter. So to go from real kgs to ROBLOX kgs and vica versa, we need a constant to convert with. This constant can be calculated by representing the amount of studs in a meter as 1 meter. As a result, we get mass = volume * density (density of water in ROBLOX is 1 instead of ~1000 so divide by 1000), and thus the following code:
Additionally, you could write a function for converting real numbers to roblox numbers and vice versa:
local function convert(value, meters, kilograms)
-- Requires dimensions
return value * (STUDS_PER_METER ^ meters) * (ROBLOX_KG ^ kilograms)
end
-- An example of how to convert a real world density of 997 kg * m^-3
-- to a roblox value
local WATER_DENSITY = convert(997, -3, 1)
Anybody know how to convert horsepower into Roblox horsepower for torque on hinge constraint motors, I’ve stayed up all night tryna figure it out and I’m just about to delete my car over it .-.
They should have just made their measurement system based off real world ones because everything is so unclean
this is what I got so far
local EQPoint = Stats.EQPoint.Value * Stats.NitroBooster.Value * Stats.SpeedMultiplier.Value * math.max(1,TiltCompensation) * 3.7-- * 0.275625
local IdleRPM = Stats.IdleRPM.Value
local Velocity = math.floor(VehicleSeat.AssemblyLinearVelocity.Magnitude)/Stats.SpeedMultiplier.Value
local RPM = ((Velocity*RearGearRatio*CurrentGear*336)/(TireDiameter)) + IdleRPM
function ExtraHorsepower()
if Stats.TurboPSI.Value > 0 and Stats.TurboBoosters.Value > 0 then
return (Stats.TurboPSI.Value*(Stats.TurboBoosters.Value/14.7)+1)
else
return 1
end
end
--//Engine Tuning\\
local FactoredHorsepower = (EQPoint*RPM/5252)*ExtraHorsepower()
local FactoredTorque = (EQPoint*5252/RPM)
I cant figure out how to convert horsepower properly, if I use newton meters it makes the car blast at insane speeds even after tryna convert it to Roblox meters also the eq point is where the torque and hp meets on the dyno chart, meaning at 5252 rpm if the eq point is 128 then thats what the torque and horse are at that point the eq is the peak horsepower im tryna convert from horse to newton meters to apply to a hinge constraint’s torque and accelleration
Torque (in ft-lb) = (horsepower * 33000) / (2Pi * RPM)
Torque (in newton meters) = torque (in ft-lb) / 0.73756
local tau = math.pi * 2
local function hpToTq(hp: number, rpm: number): number
return (hp * 33000) / (tau * rpm)
end
local function toMetricTorque(imperialTq: number): number
return imperialTq / 0.73756
end
I used a constant scaling factor to shrink the car’s configuration values down, but that shouldn’t matter. It wont change the simulation as long as the values are within the proper ratios of each other.
If you’ve ever played BeamNG while being used to Roblox, you’d know that throwing a car off a ramp is nothing like what we’re used to. Proof: 35 studs/second^2 = 9.8 m/s^2 (Earth’s gravity) while the classic that’s used in every game since it’s the default setting is 196.2 studs/second^2 = 54.936 m/s^2 (2 x Jupiter’s gravity + 5).
To get the Roblox gravity from m/s^2 you need the formula: gravity = metersPerSecond * 3.57142857143. This constant shows the amount of studs that you can fit in a meter.
They also say that for walk speed: 16 studs/second = 4.48 m/s. Divide the bigger one with the smaller one and would you believe, the same constant pops up!
That applies to max jump distance as well: 12.599 studs = 3.528 meters. This time the constant is a little different, but that’s because of rounding up the numbers.
If you divide one by the constant you get 0.28. Looks familiar doesn’t it? That’s because @Brickman808, me and @InfinityDesign have already found this number. This is a constant that shows the amount of meters that you can fit in a stud. Multiplying both constants gives you 1 which proves that if you divide by one you’ll get the same result multiplying by the other.
As for density (the main claim of the solution post that I disagree with): density = mass / volume. Say we have a cubic meter of water, it’ll weight 1 tonne in an ideal setting (optimal temperature, 100% water): 1 t/m^3 = 1 tonne / 1 m^3. If we make a cube with the size of 3.57142857143 studs^3 this will be equivalent to one cubic meter of volume. 3.57142857143 roblox masses/stud^3 is equivalent to the density of 1 ton/meter^3. You can say that mass = density * volume => 162.69262807185 roblox masses = 3.57142857143 roblox masses/stud^3 * 45.5539358601 studs^3. This weight is equal to the constant to the power of 4. The only solution to 3.57142857143^4 roblox masses is the one equivalent to 1^4 tonnes => 162,6926280718971 roblox masses = 1 t and 1 roblox mass = 6.146559999990166 kg.
Addition for speed: 1 stud/second = 1.008 km/h or 0.28 m/s