Board index FlightGear Development New features

Rope dynamics

Discussion and requests for new features. Please note that FlightGear developers are volunteers and may or may not be able to consider these requests.

Rope dynamics

Postby Thorsten » Sat Dec 02, 2017 12:59 pm

I wonder whether people realize what a messy and complicated bit of hardware a rope is... After much blood, sweat and tears, I have now a rope code which performs at least plausible in the air and on the ground. The rope can take a load as well as just dangle and it can be reeled in - and one of the most complicated things, it interacts with the ground based on your history (it does ground motion and reeling on a segment by segment basis, so it doesn't move very smoothly but in 20 cm increments - can't have everything I guess...):

Rope lowered from the Alouette hovering still - the rope coils on the ground:

Image

Hovering to the left partially uncoils the rope and straightens it along the flightpath:

Image

Stopping the left hover and hovering forward instead changes the path along which the rope uncoils (also note how the hanging piece of rope feels the ground drag force and is no longer straight):

Image

Continuing to hover forward aligns the fully uncoiled rope with the flightpath (reversing the hover would coil it up again on the endpoint - while this isn't actually the correct dynamics, it's better than just sliding it back...):

Image

Hovering right changes the direction of the alignment after a transition period:

Image

Reeling the rope in makes it dangle...

Image

... and lowering erases all dragging history and coils it again on the ground, hanging straight and without tension:

Image

I'll soon have some documentation written - anyone who needs ropes dangling from his aircraft/helicopter/airplane is advised to get in touch now and see whether the code is suitable for his use case.
Thorsten
 
Posts: 10966
Joined: Mon Nov 02, 2009 8:33 am

Re: Rope dynamics

Postby Hooray » Sat Dec 02, 2017 2:10 pm

That's pretty neat - and it would make for a terrific addition to the "helicopter/x-mas tree challenge" originally discussed here on the forum a few years ago.

PS: Realizing fully well that I am probably preaching to the choir (as in, the guy holding a PhD in physics), the underlying problem is a common one solved by many game engines which have a need for simualting rope physics - thus, if you haven't already, you may want to look at some of the game engine related articles covering the idea, even if just for inspiration (even though I do realize that your own way of simulating weather dynamics ended up being superior to the predominant "industry standard" :lol: ): http://nehe.gamedev.net/tutorial/rope_physics/17006/
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11329
Joined: Tue Mar 25, 2008 8:40 am

Re: Rope dynamics

Postby Thorsten » Sat Dec 02, 2017 3:20 pm

the underlying problem is a common one solved by many game engines which have a need for simualting rope physics


We have a few peculiar constraints (unless we want to dive deep into the renderer) - for instance, 90 terrain elevation queries per frame are not feasible performance-wise. Dynamic air pressure is a sizable contribution. We can't readily solve at fixed rate but have to live with framerate.

It's not how I'd set up a true physics simulation of a rope...
Thorsten
 
Posts: 10966
Joined: Mon Nov 02, 2009 8:33 am

Re: Rope dynamics

Postby Hooray » Sat Dec 02, 2017 3:50 pm

Yeah, the constraints are as usual very real - but it is a rather interesting problem I admit, I once read a scientific paper about "3d knot simulation" and it almost made my head explode :mrgreen:
I think when describing AW/ALS physics, you once used the terms "and admirably, nature is all solving it in real time", to which I can kinda relate meanwhile.

Depending on how fancy you want to get with this, it might be possible to use a multi-dimensional Nasal vector to compute a lookup table with pre-calculated values for the most commonly encountered dynamics that you'd expect (space/time trade-off) - basically treating each input variable of the function computing the dynamics as a lookup key into the vector (or hash), ( called memoization).
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11329
Joined: Tue Mar 25, 2008 8:40 am

Re: Rope dynamics

Postby AndersG » Sat Dec 02, 2017 4:47 pm

This looks nice and makes me want to add a drag rope to the gas balloon. (Or several should one want to make the Eagle and disappear over the polar wastes... it'd be an interesting modelling problem, though)
Callsign: SE-AG
Aircraft (uhm...): Submarine Scout, Zeppelin NT, ZF Navy free balloon, Nordstern, Hindenburg, Short Empire flying-boat, ZNP-K, North Sea class, MTB T21 class, U.S.S. Monitor, MFI-9B, Type UB I submarine, Gokstad ship, Renault FT.
AndersG
 
Posts: 2441
Joined: Wed Nov 29, 2006 9:20 am
Location: Göteborg, Sweden
Callsign: SE-AG
OS: Debian GNU Linux

Re: Rope dynamics

Postby D-ECHO » Sat Dec 02, 2017 5:02 pm

Great job Thorsten! Looks incredibly realistic.
As a glider guy, I wonder whether it might be possible to improve the winch rope dynamics using your method?
Regards D-ECHO
User avatar
D-ECHO
 
Posts: 1508
Joined: Sat May 09, 2015 12:31 pm

Re: Rope dynamics

Postby Hooray » Sat Dec 02, 2017 5:02 pm

FWIW, naively speaking, I would probably expect the downwash/turbulence caused by the main rotor to interfere with a conventional rope, unless it is made of steel (steel cable) and features a corresponding hook with ballast

http://www.breeze-eastern.com/products/model-hs-29700/
Image

Typical specs seem to be this: http://www.aiut-alpin-dolomites.com/eng ... winch.html
  • 200-300 ft/60-90 m rope length
  • 270 kg capacity


http://sssg1.whoi.edu/sssg/winch_wire/U ... inches.pdf
Live Load is the simple subtraction of the accumulated wire weight from the
available drum line pull at each layer. Considering the wire’s weight as
parasitic leaves a non-linear summation of forces which is much more useful to
the winch operator than the basic drum pull value.
10-15
Live Load is also definable as the sum of the
payload’s in-water weight, it’s
drag, and the drag of the cable.
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11329
Joined: Tue Mar 25, 2008 8:40 am

Re: Rope dynamics

Postby Thorsten » Sat Dec 02, 2017 5:40 pm

naively speaking, I would probably expect the downwash/turbulence caused by the main rotor to interfere with a conventional rope


FWIW, I already ran some tests to add some noise to the motion excitation function.
Thorsten
 
Posts: 10966
Joined: Mon Nov 02, 2009 8:33 am

Re: Rope dynamics

Postby Thorsten » Sat Dec 02, 2017 7:02 pm

As a glider guy, I wonder whether it might be possible to improve the winch rope dynamics using your method?


That's likely a far simpler problem (you don't have to deal with wave excitation or ground interaction) - so yeah, the technique should do that.

(You might have to use an unholy amount of segments though, so I wonder whether a shader solution would not be superior here).
Thorsten
 
Posts: 10966
Joined: Mon Nov 02, 2009 8:33 am

Re: Rope dynamics

Postby wlbragg » Sat Dec 02, 2017 7:49 pm

(You might have to use an unholy amount of segments though, so I wonder whether a shader solution would not be superior here).

Yeah, that parts no fun. I wanted even a longer "long-line" as I think they can be quite long for some types of work. But I quickly realized there was going to be a limit not only technically but also what I was willing to create in blender and grab coordinates for. I am to dense to search for an automated solution to spit out the coords from blender, I would be surprised if there isn't an add-on for that though.
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
User avatar
wlbragg
 
Posts: 4885
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Debain/nVGT640

Re: Rope dynamics

Postby Hooray » Sun Dec 03, 2017 11:42 am

that's interesting actually - it might make sense to look at other use-cases in FlightGear where having better "rope dynamics" may come in handy (aero-towing, banner-towing, crane operations, bungee jumping :lol: )

Would it even be possible to use this code anywhere in the scenery, or is it using aircraft specific integration mechanisms that cannot be dynamically instantiated (think property rules and/or JSBSim systems) =

And would it technically be feasible to "configure" the rope dynamics using a handful of parameters (fabric/material, length, diameter, strength), i.e. so that people would be able to affect the rope's tendency to twist, stretch/flex and break ?

Besides, would it be possible to teach the current implementation/algo to be able to deal with different weights attached to different points of the rope (regardless of the visualization, which I understand is a completely different beast) ?
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11329
Joined: Tue Mar 25, 2008 8:40 am

Re: Rope dynamics

Postby Johan G » Sun Dec 03, 2017 1:40 pm

This with some additional drag and coupling connect and break force approximations could also be relevant to aerial refueling (perm).*

* See also Aerial refueling improvement ideas and resources (perm).
Low-level flying — It's all fun and games till someone looses an engine. (Paraphrased from a YouTube video)
Improving the Dassault Mirage F1 (Wiki, Forum, GitLab. Work in slow progress)
Johan G
Moderator
 
Posts: 5513
Joined: Fri Aug 06, 2010 5:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 3.0.0
OS: Windows 7, 32 bit

Re: Rope dynamics

Postby Hooray » Sun Dec 03, 2017 1:48 pm

Yeah, there are probably more potential application areas for something like this than we can imagine.
For instance, if the code could be generalized to support multiple load attachment points, including changing load position/weights, one could implement all sorts of fancy ideas using this framework - including even "fast roping" (e.g. DFaber's walker).

Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11329
Joined: Tue Mar 25, 2008 8:40 am

Re: Rope dynamics

Postby Thorsten » Sun Dec 03, 2017 2:40 pm

Besides, would it be possible to teach the current implementation/algo to be able to deal with different weights attached to different points of the rope (regardless of the visualization, which I understand is a completely different beast) ?


Possible - yes.

But I can already predict the questions if I would actually do it - could it be made in a way that the rope in the scene isn't the single most framerate-draining thing? And the answer to that one is probably 'no'.

We can solve real physics for ropes with forces attached to any point along the rope and real point by point ground interactions for a few hundred segments which would make it all nice and real - we just can't do it in real time while trying to run a flightsim in the background of our rope simulation.
Thorsten
 
Posts: 10966
Joined: Mon Nov 02, 2009 8:33 am

Re: Rope dynamics

Postby Hooray » Sun Dec 03, 2017 4:08 pm

Actually, I wasn't meaning to post a feature request, but mainly interested in the details of the implementation (like, for the layman) - I mean, without much of a background in physics, I can imagine that someone would model a simplistic rope by segmenting it into a number of "cylinders" that can change their relative attachment points/orientation (within a certain range/3D space) as well as their diameter/length to account for different loads (tension/flexing), and model a rope by positioning each cylinder in relation to the perviously positioned cylinders - but other than that, I don't have the slightest clue how you are coming up with the visuals to "map" a bunch of cylinders onto the 3D representation to come up with those screenshots - is that using a 3D model or shaders only, or is it a 1:1 mapping where the rope is also a bunch of segments to create the illusion of having a proper rope?

And concerning the simplifications that you are undoubtedly having to make, are these algorithmic or in the form of hard-coded constants that could actually be exposed to people wanting a more detailed "rope simulation", i.e. via properties (things like the length, diameter, material of the rope) ?

I am really just asking out of curiosity, not trying to add to your todo list :D
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11329
Joined: Tue Mar 25, 2008 8:40 am

Next

Return to New features

Who is online

Users browsing this forum: No registered users and 8 guests