project reality header
Go Back   Project Reality Forums > PR:BF2 Mod Forums > PR:BF2 Community Modding
16 Sep 2024, 00:00:00 (PRT)
Register Developer Blogs Members List Search Quick Links
PR:BF2 Community Modding Making or wanting help making your own asset? Check in here

Reply
 
Thread Tools Display Modes
Old 2016-04-23, 23:30   #1
Piipu
Default Chopper flight models

The chopper flight models in PR seem to be quite unrealistic and, as a result, unintuitive. I'm having a lot more problems doing small scale maneuvers in PR than I do with the study simulation-grade flight models in DCS: World. I've flown helicopters quite a bit in them, and I can tell that flying in PR feels very weird compared to that. I've heard others mention the low cruise speeds of all choppers, and I think that also comes from the same issue.

I'm not entirely 100% on this but it seems to me that choppers have too little upwards thrust on the main rotor. The climb rates achievable with most choppers seem really low compared to those I've seen in DCS. It also seems that there's some sort of weird horizontal force boost system that makes the horizontal movement feel really slippery compared to the better models. This line (found in gb_ahe_apache.tweak) seems to point that way as well:
Code:
ObjectTemplate.horizontalSpeedMagnifier 5.2
With the 'real' models, you have to tilt the chopper quite a lot to achieve maximum cruise speed, whereas in PR you're only talking about a few degrees of tilt. In PR, tilting the chopper even a little makes you lose altitude even at full thrust, which seems really odd to me. Let me show a simplified force model of the situation:



Hopefully you can tell from the image that in order to stay in level flight, a chopper must provide enough vertical thrust (labeled t_y in the image) to cancel out the gravitational force affecting the chopper. Any additional thrust (labeled t) that isn't needed for level flight, can then be converted into horizontal acceleration by tilting the chopper forward.

Now, if you don't have enough overall thrust in the first place, you have to compensate for the lack of forward thrust by adding in a horizontal velocity multiplier. This approach however has the negative qualities mentioned earlier: even tiny changes in the angle of the chopper cause huge accelerations, and the climb rate of the chopper will suffer greatly.

I think getting rid of the horizontal velocity multiplier and readjusting rotor thrust rates would fix both the handling issues, as well as making it possible to have higher cruise speeds for choppers without breaking anything in the flight physics. I don't know enough about the BF2 editor to give you any solid examples yet, but I'll try fiddling around with the variables and see if I can make any sense out of it. I'd also appreciate any advice you can give to me with regards to chopper flight models in PR.
Piipu is offline Reply With Quote
Old 2016-04-24, 02:37   #2
[R-DEV]​rPoXoTauJIo
PR:BF2 Developer
Supporting Member

rPoXoTauJIo's Avatar
Default Re: Chopper flight models

Forget about real world and DCS, this is bf2 shit
Instead of theory make minimal valuable product(le ingame\in bfeditor)by playing with values that will make choppers great again.

Problem with bf2 engine is that you have no air, only thing that make you fall is gravity. Rest of helicoter behavior is rotor rotate(that's how it control chopper, instead of swashplate its simply turning rotor itself) and engine torque.

PR helicopters has additional "wings" through. In bf2 world wings are nothing but to prevent moving against air, that's why jets flying(cuz "wings" prevent plane to change direction a lot). On a PR helicopters they're used to disallow turning on high speed, and to "try" fix diving tactic(althogh caswhores still good in it despite all the efforts made by noob devs )

Parameters in .tweak file you should be interested in:
That's "air resistance" against helicopter mesh in air
Code:
ObjectTemplate.drag float
Modifiers of inertia for diffirent directions, x for yaw, y for height, z for roll
Code:
ObjectTemplate.dragModifier float/float/float
Speaks for itself but doesn't represent actual mass ingame
Code:
ObjectTemplate.mass 16000
That's what you have to consider for adding "weight" to physics model
Code:
ObjectTemplate.gravityModifier 2.0
And modifiers for inertia
Code:
ObjectTemplate.inertiaModifier 0.4/0.4/0.2
For next examples i'll take us_the_uh1n huey.
That's your rotors(RotorHead), you have to look at its params
Code:
ObjectTemplate.create RotationalBundle us_the_uh1n_RotorHead1
Your max rotations for pitch and roll of parent rotor.
Code:
ObjectTemplate.setMinRotation 0/-5/-2 
ObjectTemplate.setMaxRotation 0/5/2
Rotor will turn to it's max&min rotations with this speed.
Code:
ObjectTemplate.setMaxSpeed 0/50/50
And it's acceleration to max speed.
Code:
ObjectTemplate.setAcceleration 0/-1000/1000
Inputs that will affect parent rotor rotation.
Code:
ObjectTemplate.setInputToPitch PIPitch
ObjectTemplate.setInputToRoll PIRoll
Reset rotation if no input.
Code:
ObjectTemplate.setAutomaticReset 1
Additionally, our parent rotor has child rotor.
It's 20 bf meters high than our parent rotor through
Code:
ObjectTemplate.addTemplate us_the_uh1n_RotorHead2
ObjectTemplate.setPosition 0/20/0
And it's 2nd rotor has our engine
Whish is 86m under child rotor, which give us true engine position of -66m under heli
Code:
ObjectTemplate.addTemplate us_the_uh1n_Rotor
ObjectTemplate.setRotation 0/-86/0
Note those values. They're displaying not rotation, but rather "power" values from 0% to 100%.
Code:
ObjectTemplate.setMinRotation 0/0/-20
ObjectTemplate.setMaxRotation 0/0/900
Speed with which "power" will increase.
Code:
ObjectTemplate.setMaxSpeed 0/0/1
Acceleration to "max speed".
Code:
ObjectTemplate.setAcceleration 0/0/13
Which input affect engine, PItrolle is W and S by default f.e.
Code:
ObjectTemplate.setInputToRoll PIThrottle
That's your "power" of engine.
Code:
ObjectTemplate.setTorque 240
Have low idea what those means for heli, when played barely got any effect.
Code:
ObjectTemplate.setDifferential 180
ObjectTemplate.setGearUp 0.99
ObjectTemplate.setGearDown 0.01
ObjectTemplate.setGearChangeTime 0.1
ObjectTemplate.setGearRatios 3.5 2.2 1.5 1.1 0.94
That's indeed gives some boost for horizontal speed, but it's barely relevant to altitude drop when flying fast.
Code:
ObjectTemplate.horizontalSpeedMagnifier 3.1
Some values for hover stabilization.
Code:
ObjectTemplate.horizontalDampAngle 0.1
ObjectTemplate.horizontalDampAngleFactor 0.001
ObjectTemplate.defaultAngleOfAttack 2
ObjectTemplate.decreaseAngleToZeroVerticalVel 0.5
ObjectTemplate.dampHorizontalVel 5
ObjectTemplate.dampHorizontalVelFactor -0.5
That's values you're looking for probably.
Code:
ObjectTemplate.maxAngleOfAttack 12
ObjectTemplate.attackSpeed 10
When max angle of attack exceeded, helicopter will not increase speed anymore.
Attack speed is something you have to play with, i have not understood effect of this fully.


Code:
ObjectTemplate.create Wing us_the_uh1n_Rudder
ObjectTemplate.modifiedByUser K4on
ObjectTemplate.createdInEditor 1
ObjectTemplate.floaterMod 0
ObjectTemplate.hasMobilePhysics 0
rem -------------------------------------
ObjectTemplate.addTemplate S_us_the_uh1n_Rudder_RotationRpm
rem -------------------------------------
ObjectTemplate.setPositionOffset 0/0/0
ObjectTemplate.setWingLift 4
ObjectTemplate.setFlapLift 0
Additionally huey use wings for some stabs effects of whatsoever, but they give less impact on helicopter on low speed, for understanding what they're affect you have to take a look on wings postion, rotation, and lift values.

assetruler69: I've seen things you smurfs wouldn't believe. Apaches on the Kashan. I watched burned down tank hulls after the launch of the single TOW. All those moments will be lost in time, like tears in rain.
Time to give up and respawn.
rPoXoTauJIo is offline
Last edited by [R-DEV]rPoXoTauJIo; 2016-04-24 at 02:43..
Reply With Quote
Old 2016-04-24, 06:51   #3
solidfire93

solidfire93's Avatar
Default Re: Chopper flight models

rPoXo PRO MLG CODER..

Trans Choppers are great, attack chopper's need a bump in their speed a bit....
solidfire93 is offline Reply With Quote
Old 2016-04-24, 09:24   #4
Piipu
Default Re: Chopper flight models

Thanks, those should be helpful. One thing though, I did some testing in the editor and the horizontalSpeedMagnifier certainly has something to do with how the helicopter moves vertically. It looks like the factor just forces a certain amount of vertical thrust into horizontal. If you set it to 0, you can stay level with an angle of attack of about 85 degrees (and you won't move horizontally at all of course) while at 5 you'll start sinking at around 5 degrees. I'll try playing around with the wings and the angle of attack values as well and see what they do.

On another note, do you know of some easy way to quickly reload changes you've made to the .tweaks file? It seems that reloading the object in the editor doesn't reload the changes you've made. Also, it'd be nice to be able to quickly test these changes while having an actual map loaded, the grid floating in empty space is not that great when you want to fly around for longer distances.

Edit: nevermind, I figured it out. I just had terrain rendering disabled :/
Piipu is offline
Last edited by Piipu; 2016-04-24 at 09:47..
Reply With Quote
Old 2016-04-24, 10:41   #5
[R-DEV]Mats391
PR:BF2 Lead Developer
Supporting Member
PR Server License Administrator

Mats391's Avatar
Default Re: Chopper flight models

Tools -> Options -> ReloadFileSettings, Check everything. Should reload files when you edit them

Mineral: TIL that Wire-guided missiles actually use wire
Mats391 is offline Reply With Quote
Old 2016-04-24, 11:22   #6
Piipu
Default Re: Chopper flight models

Here's what I've found so far based on some quick testing.

Min and Max rotation speed don't seem to have much effect on rotor lift, aka thrust. Maybe they're scaled away and it only affects startup time? I don't know.

Torque (ObjectTemplate.setTorque) controls the lift directly. Increasing it increases climb rate and max speed, but also increases the amount of chopper tilt you can have before you start losing altitude.

Angle of attack has nothing to do with chopper tilt, it's the angle of attack of the rotor blades. Your thrust (aka pressing W) increases the angle of attack of rotor blades, increasing lift as well. Basically it seems to be a multiplier to torque.

attackSpeed tells how fast the angle of attack of rotor blades can change, so basically how quickly you can change the amount of lift generated by the rotor. Doesn't have much to do with max speed of the chopper, and seems to be at reasonable levels for most choppers.

horizontalSpeedMagnifier is some magic value that governs how much of your upwards thrust is converted to horizontal acceleration. Setting it to 1 seems to produce the most realistic behaviour for choppers. After setting it to 1 for the British Apache, it behaves otherwise pretty nicely but the max level flight speed is capped at around 360 km/h. I tried removing drag from the chopper and lift from all wings and it still doesn't change, which seems very odd to me. There must be some other drag variable somewhere that I haven't found yet.
Piipu is offline Reply With Quote
Old 2016-04-24, 11:59   #7
[R-DEV]​rPoXoTauJIo
PR:BF2 Developer
Supporting Member

rPoXoTauJIo's Avatar
Default Re: Chopper flight models

Quote:
Originally Posted by Piipu View Post
Min and Max rotation speed don't seem to have much effect on rotor lift, aka thrust. Maybe they're scaled away and it only affects startup time? I don't know.
Quote:
Originally Posted by rPoXoTauJIo View Post
Note those values. They're displaying not rotation, but rather "power" values from 0% to 100%.
Code:
ObjectTemplate.setMinRotation 0/0/-20
ObjectTemplate.setMaxRotation 0/0/900
Speed with which "power" will increase.
Code:
ObjectTemplate.setMaxSpeed 0/0/1
Acceleration to "max speed".
Code:
ObjectTemplate.setAcceleration 0/0/13
Someone did not read
900 is 100%, 0 is 0%, -20 is negative thrust, that's allows me to do barrel rolls on carrier deck.
Those values indeed have effect on startup speed.
Quote:
Originally Posted by Piipu View Post
horizontalSpeedMagnifier is some magic value that governs how much of your upwards thrust is converted to horizontal acceleration. Setting it to 1 seems to produce the most realistic behaviour for choppers. After setting it to 1 for the British Apache, it behaves otherwise pretty nicely but the max level flight speed is capped at around 360 km/h. I tried removing drag from the chopper and lift from all wings and it still doesn't change, which seems very odd to me. There must be some other drag variable somewhere that I haven't found yet.
You probably should try to remove wings(as they're responsible for dragging you on high speed), increase maxAngleOfAttack, increase horizontalSpeedMagnifier or either torque.

assetruler69: I've seen things you smurfs wouldn't believe. Apaches on the Kashan. I watched burned down tank hulls after the launch of the single TOW. All those moments will be lost in time, like tears in rain.
Time to give up and respawn.
rPoXoTauJIo is offline Reply With Quote
Old 2016-04-24, 12:09   #8
[R-DEV]Mats391
PR:BF2 Lead Developer
Supporting Member
PR Server License Administrator

Mats391's Avatar
Default Re: Chopper flight models

Check this setting:
objectTemplate.noEffectAtPerpSpeed float -> float
This is somehow caps the max speed

Mineral: TIL that Wire-guided missiles actually use wire
Mats391 is offline Reply With Quote
Old 2016-04-24, 12:24   #9
Piipu
Default Re: Chopper flight models

Quote:
Originally Posted by rPoXoTauJIo View Post
Someone did not read
900 is 100%, 0 is 0%, -20 is negative thrust, that's allows me to do barrel rolls on carrier deck.
Those values indeed have effect on startup speed.

You probably should try to remove wings(as they're responsible for dragging you on high speed), increase maxAngleOfAttack, increase horizontalSpeedMagnifier or either torque.
I believe you're mistaken about the RPM values. Unless you have some reliable source saying otherwise, I'm more inclined to believe my own tests. I just tried to see what happens when you set min RPM to -2000 and max RPM to 7000. The only thing that changed was that the warmup sequence where you have to wait for your rotor to start spinning fast enough to lift off takes 5 minutes instead of 30 seconds. After the warmup is done, it flies just the same as with -20 and 700.

Based on my tests, the negative thrust is governed by the relation of max and default angle of attack. The default angle of attack is the 'rest' position for the rotor blades, while the maximum is the highest angle they can turn into. It seems that their movement range is governed by the difference of max and default AoA: the blades can turn the same angle in the negative direction that they can in the positive one.

This means that with default AoA of 2 and max AoA of 15, like on the British Apache, the blades can turn +-13 degrees from the default, which translates to a minimum angle of -11 degrees. You can verify this by setting default AoA to 13 degrees and max AoA to 15. Now you won't be able to stop your chopper from lifting off, as the minimum AoA will be at +11 degrees, which gives you a lot of vertical thrust.

There also seems to be some sort of autohover system in place which adjusts the default thrust level to be at level flight, if that's possible. Even if you double the gravity affecting the chopper or increase rotor torque by a lot, the chopper will stay hovering without thrust input. This makes the engines a lot easier to balance, as you don't have to worry about keeping the idle thrust at neutral lift.
Piipu is offline Reply With Quote
Old 2016-04-24, 12:30   #10
Piipu
Default Re: Chopper flight models

Quote:
Originally Posted by [R-DEV]Mats391 View Post
Check this setting:
objectTemplate.noEffectAtPerpSpeed float -> float
This is somehow caps the max speed
I tried that already, it just gradually removes lift from the rotor, and lift will be zero once your chopper reaches that value. You need to set AirFlowAffect to 1 as well I think for it to work. I believe that's the system that decreases the tail rotor effectiveness at higher speeds, but I don't see how that would be useful with limiting your max speed. It just makes the chopper drop like a rock once you reach that speed, which is not really desirable.

Edit: It looks like that doesn't work as simply as that. If you set it to 10, your chopper will drop with any horizontal velocity at all, but at 150 it has no effect anymore. It also looks like AirFlowAffect does something different, it didn't have any effect on that.

I also found the variables that control the autohover behaviour. RegulateVerticalPos and the next few variables control it. It looks like MaxVertRegAngle and NoVertRegAngle have something to do with it, it feels like they actually tilt the main rotor to keep your chopper level.

Here's a demonstration with the angles changed from around 40 to around 10 degrees (loud music warning, can't be bothered to edit it out). I don't touch the thrust at any point, this is all on neutral. I only change the angle of the chopper.
https://dl.dropbox.com/s/9tvy5dr7juh...5.46.44.01.mp4

Here's the same with with regulation angles set at 60 degrees. Note how the chopper doesn't start losing altitude until angle of attack is at 60 degrees.
https://dl.dropbox.com/s/6kz2wm4fca1...49.02.mp4?dl=0
Piipu is offline
Last edited by Piipu; 2016-04-24 at 12:55..
Reply With Quote
Reply


Tags
chopper, flight, models

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 19:14.