RigsOfRods / rigs-of-rods

Main development repository for Rigs of Rods soft-body physics simulator
https://www.rigsofrods.org
GNU General Public License v3.0
991 stars 175 forks source link

Planes being transported within planes are affected by wind / particle based aerodynamics #1315

Open LNFWebsite opened 7 years ago

LNFWebsite commented 7 years ago

This is probably a wontfix, but thought I'd mention that when I place a plane inside another plane for transport (ie. J3Cub inside Antonov), the J3 is affected by the wind in the same way it would be flying on it's own.

Likewise, I'd like to know whether the actual plane characteristics affect its handling, or are planes just affected by their statistics (weight, lift capacity, etc...)? I sort of assume that the actual surface of the plane does not affect flight performance, because some faculties of the plane (ie. opening cockpit door on SU-27, payload bay of Antonov, etc...) do not affect flight performance, but this is probably the obligation of the person who creates the plane...

I know that planes are sort of an afterthought in Rigs Of Rods, but I enjoy them just the same! ;-)

ohlidalp commented 7 years ago

🤣 Makes absolute sense in context of RoR's mechanics - the plane recognizes movement, but doesn't take it's surroundings into account. Thoughts: I'm assuming the transported plane is somehow secured in place (using ties/ropes/hooks ?) which I could use to recognize this situation and disable aerodynamics. Some extra parameter in truckfile would probably be needed, as the presence of tie/rope/hook is not enough of an indication - when a glider is towed up, it definitely should keep it's aerodynamics :smile:

All aerodynamics in RoR must be explicitly defined in the truckfile. The bare soft-body structure or the collision body shape have no effect on their own. We have 2 elements which contribute to aerodynamics: "wings" and "fusedrag". Both are defined as some basic shape (wing=box, fusedrag=line) and their aerodynam. properties are defined by "airfoil". We use airfoils from http://www.x-plane.com/

Yes, RoR started as heavy-truck simulator and got extended later, but I view that as visionary. All those vehicles are affected by the same environment phenomena like aero/hydro-dynamics and friction, so it makes perfect sense. In the future, I'd like to make RoR's dynamics based exclusively on vehicle's actual shapes + environment particles (air/water/solid ground=all particles). It's not as crazy as it may sound, the trick is to dynamically group the particles in large bulks when idle and fragment them into tiny elements when there's a vehicle -> and back to bulky when it leaves, preserving the disturbances (with some tolerance...).

LNFWebsite commented 7 years ago

Okay thanks!

If I remember correctly, I wasn't even able to secure the plane within the plane (using the 'L' or 'O' keys)... I probably should have mentioned that in the bug report.

Regardless, I'm looking forward to your prospective of having the physics affect the vehicle shapes directly!

Thanks for your response and your explanation of the aerodynamics in Rigs of Rods!

PS: You can probably just ignore this issue for the moment as I know you've got a lot of other things to do with RoR...

ohlidalp commented 7 years ago

I'm happy whenever somebody brings up these more subtle flaws.

I'll keep this ticket around, although yes, I won't be able to implement my ideas anytime soon.

LNFWebsite commented 7 years ago

@only-a-ptr It should probably also be noted that when planes are in sleep mode (or whatever you call that when you exit the parked plane, deactivated? idk), other vehicles can travel straight through them as if they weren't there.

screenshot_2017-04-28_12-36-45_1

This may just be intended behavior in order to save some RAM or computations or whatever...

I checked to see if the same would happen with other land vehicles, but they seem to crash just fine ;-)

screenshot_2017-04-28_12-40-47_1

ohlidalp commented 7 years ago

@LNFWebsite Interesting, thanks for pointing it out.

ghost commented 7 years ago

Actually, The plane doesn't have the required sections (submesh, contacters) for collision. If you click Simulation from the top menu bar -> Activated vehicles never sleep, you still can't collide with the plane: screenshot_2017-04-29_11-02-20_1 (You can clearly see the plane is active since i'm using mouse drag [blue line])

LNFWebsite commented 7 years ago

@Michael10055 I'm finding that this affects some vehicles as well... I guess they're not going to sleep even though they are parked...

L-Tec commented 6 years ago

Regarding to the initial issue...

It would be really good if encapsuled airplane cargo would not have aerodynamical efffects. We might think about adding a collision-box style container which disables aerodynmaics for stuff inside ?

Would be an easy to do physics improvment. Just skip aero-calc of wings and drag if the related node is in that box.

ohlidalp commented 6 years ago

@L-Tec Sure, airplane cargo shouldn't be affected by the wind outside.

Ideally, this should be automatic - the hull of the carrier vehicle should create a capsule where aerodynamics are isolated from outside (just disabling them will do for the moment). We already have a thing called "prop-wash calculation", which deals with props blocking air flow to wings (if I understand well). We could add something similar to determine the "vacuum box" within a plane.

However, both the existing "propwash" and your suggested "vacuum box" are workarounds of sorts - they do the job, but it's not an universal solution. I'm not opposed to add more workarounds, but what I really want is the ultimate thing - a particle based aerodynamics. It's not as crazy as it sounds, we basically just need to:

TL;DR: The "vacuum box" simple improvement is OK, but I won't code it, I want nothing less than the particles. Feel free to code it yourself if you want.

L-Tec commented 6 years ago

@only-a-ptr: i agree with that, even though it might kill the helicopters in RoR, we will see. There is no actual need for the box, just dropped my idea how to solve this q&d.

Btw..as far as i understand "propwash" it makes wings more efficent in the airstream of propellers ? I might be wrong though.

ohlidalp commented 6 years ago

@L-Tec You're very likely right about "propwash", I never paid attention to the feature.

Why do you think it might kill helicopters?

L-Tec commented 6 years ago

@only-a-ptr : the helicopters i made took more then 3 years of research before the first one was flying with a collective and cyclic wingpositioning rotorhead like the real ones. They still need extreme rpm to function correctly and very very low positioning input, i forced the aerodynamic plugin to the max that days. I think the pure time effort invested in that kept other modders from developing good working helicopters too. Replacing the aerodynamics plugin with a "high viscosity fluid like particle model" will make this things fail. But i am still looking forward to that development, its just a new challenge to build a working helicopter then. So keep digging.

LNFWebsite commented 6 years ago

@L-Tec I'm not a modder or anything of that sort here on ror, just an enthusiast... But I believe that an accurate particle model will make the process of working with aerodynamics in the simulator easier, since it should directly correspond to the reality of the profession.

Getting there might be incredibly hard, but the improvement will most definitely be worth it. Hopefully creating a compatibility engine that converts the intended aerodynamic models of today's mods to the actual design of the model and thus the way it operates in the new particle system won't be so hard.