Question Docking physics simulation.

Donamy

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Oct 16, 2007
Messages
6,958
Reaction score
278
Points
158
Location
Cape
Has anyone given any thought, to simulate the docking physics ?

Would it be possible to impart motion, to vessels immediately after docking, or glancing off, if the docking point wasn't quite lined up ?
 
Has anyone given any thought, to simulate the docking physics ?

Would it be possible to impart motion, to vessels immediately after docking, or glancing off, if the docking point wasn't quite lined up ?

It's essentially collision detection, in the first instance, which is possible but hard at the generic add-on level.
 
Would it be possible to impart motion, to vessels immediately after docking, or glancing off, if the docking point wasn't quite lined up ?

Can you elaborate?

I had the impression docking collars are made to dampen out any relative motion quickly, so I don't know how bad an approximation 'hard docking' is (I assume you don't mean momentum and angular momentum conservation in the process with 'impart motion')?

Assuming you have collision detection (which is kind of easy for a near miss, but much harder for one (potentially very complicated-shaped) object hitting another (potentially very complex-shaped object) anywhere), the physics of the 'bounce' is relatively easy - basically it's down to the elasticity coefficient how much velocity you get back and how much is dissipated in the collision - I guess my simulation of the Shuttle Flight manual floating in the cabin and bouncing off walls is a similar problem, it seems to give credible results.

(If there's something you're thinking of and I am not, I'd be interested in learning that and studying the problem, as I'll have it on my table soonish just as well).
 
I think a simple approach would be to consider two situations:
a) contact with angles up to ~5º from the docking axis and one 1 meter off axis
b) larger angles and off axis distances

For a) you can compute vectors and distances from the docking port positions.
For b) you can use generic vessel parameters such as touchdown points and size.

I see this as some plugin that checks all vessels for collisions.
 
Last edited:
I think a simple approach would be to consider two situations:
a) contact with angles up to ~5º from the docking axis and one 1 meter off axis
b) larger angles and off axis distances

For a) you can compute vectors and distances from the docking port positions.
For b) you can use generic vessel parameters such as touchdown points and size.

I see this as some plugin that checks all vessels for collisions.

The difficulty as I understand a plugin like that is doing that check for all vessels generically - the only bounds you could really use would be the visible geometry, which would be expensive to check on each timestep, especially with lots of vehicles in the system. Practically, you could define a "hitbox" style geometry for each vessel, and test that for collisions, though that is less accurate you could theoretically read in the visible geometry at vessel load time and determine its most extreme outer points; this approach falls apart for something shaped like the ISS, for instance, where the box would obstruct all the empty navigable space between the solar arrays (and probably the docking ports).
 
The difficulty as I understand a plugin like that is doing that check for all vessels generically - the only bounds you could really use would be the visible geometry, which would be expensive to check on each timestep, especially with lots of vehicles in the system. Practically, you could define a "hitbox" style geometry for each vessel, and test that for collisions, though that is less accurate you could theoretically read in the visible geometry at vessel load time and determine its most extreme outer points; this approach falls apart for something shaped like the ISS, for instance, where the box would obstruct all the empty navigable space between the solar arrays (and probably the docking ports).
I'm pretty sure Donamy just wants contact physics for the actual docking mechanims, not entire vessels. This request is pretty much for an "out-of-the-core" fix for this request I made back in 2015: https://www.orbiter-forum.com/project.php?issueid=1204
 
The difficulty as I understand a plugin like that is doing that check for all vessels generically - the only bounds you could really use would be the visible geometry, which would be expensive to check on each timestep, especially with lots of vehicles in the system.

You wouldn't need to do this for all vessels - there's something like a 'proximity cache' (forgot the technical name) which the renderer would use for all geometry closer than 50 m or so - so most of the time you would not have to do any checks.

Still ISS would be complicated, especially if you'd have a similarly complicated shape docking/navigating around it.
 
You wouldn't need to do this for all vessels - there's something like a 'proximity cache' (forgot the technical name) which the renderer would use for all geometry closer than 50 m or so - so most of the time you would not have to do any checks.
This.
It would probably prevent the Enterprise from approaching a station at Warp 7, dropping out of Warp at the last second and dock, but it would work for everything else. :shrug:
Still it would cost performance, especially if the ISS is made of several vessels.
 
Still it would cost performance, especially if the ISS is made of several vessels.

I have a hunch you could in principle make the graphics card render mesh proximity information relative to a number of contact points into a texture and query that texture to check for a collision. Compared to the gazillions of vertices e.g. a forest on the ground requires, Orbiter is very light on the GPU, so I doubt you'd notice the impact if this were done in a clever way.

In that case, it would be number of draws rather than number of vessels which determine the performance impact.

However, given how Orbiter is structured, I kind of doubt you can 'just' arrange a few extra rendering passes and look at the resulting textures... that's likely a rather invasive change. So it likely can't be done that way :shrug:
 
I was thinking, if there was a vessel attached to the station or vehicles, that would control the movement, something like the CMG.dll . Able to calculate the impact info, and thus move the vessels accordingly. I simulated it, by activating the CMG immediately after impact, and it looks good, but a hack.
 
I have a hunch you could in principle make the graphics card render mesh proximity information relative to a number of contact points into a texture and query that texture to check for a collision.

Oh, the Hax0rZ!! :rofl:
 
Back
Top