I’m working on an experiment that creates simple simulations of a few elements and compounds. While my own physical properties like Freezing Point, Boiling Point, Hardness, Ductility etc. where pretty straightforward to implement, Roblox’s physical properties are harder to work with thanks to the weird units and lack of documentation
I found a post in the forum by Widgex where he converted a few units to follow the Roblox stud, where 3.57 studs is a meter, 1 Roblox mass is a kilogram, and most relevant 21.952 Roblox Density is 1 gram/cm^3 (Density of water)
While that may sound like the solution to the problem, Roblox caps Density at 100, which means the max density is 4.55 gram/cm^3 which is pretty low considering most metals are well above this density.
With that, if Roblox’s Density truly works like this and is not some kind of percent (what would it even be a percent of? Some arbitrary number?) how can I get around this 100 Density Cap. Is there some clever way to at least somewhat retain the functionality of the physics engine so I don’t have to make an inferior completely custom one (though considering what I’m doing this is probably a given)?
Density is simply how much weight is distributed, I don’t know the exact calculation but it’s just like in real life
That is true, and just like real life I want to use the density of real materials but the 100 Density cap makes it so that cannot happen which means I need to find a way to tweak the physics engine with scripting
“Density is defined as the amount of mass per unit volume. The more dense a part is, the more force it takes to accelerate it. Acceptable range is 0.01 to 100.0 and values outside this range will be clamped.”
You could change the mass of it, and change its density, you should get the same result I think
Alright I found a solution which is just use someone else’s interpretation of the units that was made 5 years ago with the physics interpretation I was going with made 1 year ago.
In this older interpretation that was allegedly confirmed by an even older Roblox Blog (that I can’t find) 1 stud is equal to 5 centimeters, which means 20 studs would be equal to a meter. Also in the forum post it was confirmed that 8 Roblox mass units was equal to 1 kg, as a 20x20x20 with a Density of 1 (they linked to a now dead Roblox wiki that said a Density of 1 equals the Density of water in grams/cm^3). I confirmed this myself when I made a 20x20x20 part and entered the density of gold 19.3gram/cm^3 and got 154400, which divided by 8 is 19300 kg. A cubic meter of gold has a 19300 kg in the real world so the calculations must be sound (or at least good enough for a Roblox game). Of course, I hope the roblox physics engine uses this 154400 Roblox masses instead of assuming that’s the true mass in kilograms, though if I discover this is not the case I can just lower the density to get the correct mass.
The newer interpretation was made after the Realistic game preset was created, where the interpreter assumed this would change units. His interpretation I was using is based on the idea that roblox gravity units are true units in studs/second^2 instead of an arbitrary number that equates to an actual unit (35 equals 9.8m/s^2, but that doesn’t exactly mean this 35 is in studs/s^2). That is where the 3.57 studs = 1 meter thing came from which extends further to 1 Roblox Mass being a kg, 1 Spring Stiffness equaling 1 newton meter, and of course the 21.952 Density units equaling 1gram/cm^3.
They could both be right in certain points or both wrong, but they both tried to understand Roblox’s obscure poorly documented units. I guess Roblox weren’t aiming at physical realism back then so they created a simple physics engine, but with this “Realistic” world preset I think they should clear up what these measurements mean in the documentation, more documentation than a summarized definition of the real world unit. Why even have these Gravity Units when directly under the input box tells you what that number would equate to?
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.