By now you should have recognized that this is a problem in integral calculus so you can use calculus instead of actually dividing your rocket into an infinite number of infinitely small objects.There's a lot more, as googling "calculate moment of inertia" will show

You're going to face the added issue that "Space Engineers" will be using a physics model that does not necessarily match actual real-world physics, and that alternate physics is what you need to be using in your model for control loop tuning. No good tuning your control loop for the real world for an application that is not in the real world.

The game has relatively good physics by default, but I also have mods that add wind and atmospheric effects (allowing for lift, etc), so although those mods and the base game won't be as good as a billion dollar simulator, or the real world for that matter, it's at least based on the real world. So yes, in a way Space Engineers limits me, but my vehicle still has dimensions, mass and inertia, which all plays a part in figuring out how to control it. Pretty much everything used in the real world should at least provide decent information and clues towards making something in Space Engineers, I reckon at least.

Game physics engines can be incredibly far from actual physics without being immediately obvious, and lack many fundamental features like friction (to make an analogy, game physics engines today are to real physics what the N64's graphics were to modern path tracing engines). e.g. the engine could decide any rigidly joined objects are perfectly rigid and homogenous, and instead of calculating moment of inertia just sum the total masses and consider the object a point mass at the assemblage's geometric centre and use a fixed term for MoI. You'll find lots of shortcuts taken with linear terms used in place of non-linear ones, variables replaced with fixed values, etc. Physics models are far harder than they first appear, and are why programs like Orbiter can model orbital mechanics well enough to match actual missions, but placing an object onto the surface of a planet will occasionally have it spontaneously bounce up into the air of their own accord due to rigid body contact issues. As I understand it, the physics engine used is exceptionally basic and the stock game does not even support off-axis thrust (all thrust regardless of engine location is assumed to be applied through the centre of mass and torque is always 0), so thrust vectoring as you desire to implement is not possible without modding.

IIUC Space Engineers uses a voxel based model. Summing over all the voxels in your model should be roughly the same as integrating to calculate the total moment of inertia of your model. This could be considered a variety of finite element analysis.You may also be able to "experiment" in the virtual world. Put your model in free fall (orbit) and apply a known angular impulse and then watch and measure how fast it spins. This is the analog of measuring the mass of your model by applying a known impulse and seeing how fast it goes. The easiest way to apply a known angular impulse is to add a small pair of thrusters with known thrust and duration.

Since a mod is being used to allow for off-axis thrust, and the system only needs to work within the game engine and not outside of it: contact the mod author and ask what physics model they are using to calculate applied torque. It may be that MoI is not even involved in their physics model so calculating it can be skipped.

Quote from: edzieba on 08/12/2022 10:19 amSince a mod is being used to allow for off-axis thrust, and the system only needs to work within the game engine and not outside of it: contact the mod author and ask what physics model they are using to calculate applied torque. It may be that MoI is not even involved in their physics model so calculating it can be skipped. I just left a comment on Steam asking how the mod calculates the applied torque. Though, I'm a bit stuck at why that information would help? Wouldn't I still need to calculate the MoI and torque so my own program can predict where I need to move the thrusters to stop where I want to be? I currently just get the torque from a calculation based on gimbal angle, moment arm, etc, using trigonometry; but I don't know how else I'd be able to predict how fast I could stop (given x torque) without knowing the MoI?