Symthic Forum was shut down on January 11th, 2019. You're viewing an archive of this page from 2019-01-09 at 00:45. Thank you all for your support! Please get in touch via the Curse help desk if you need any support using this archive.

Welcome to symthic forums! We would love if you'd register!
You don't have to be expert in bit baking, everyone is more than welcome to join our community.

You are not logged in.

## First approach to air drag model in BF1

Hey! If this is your first visit on symthic.com, also check out our weapon damage charts.
Currently we have charts for Battlefield 3, Call of Duty: Black Ops 2, Medal of Honor: Warfighter and Call of Duty: Modern Warfare 3

Posts: 282

Date of registration
: Mar 17th 2015

Platform: PC

Battlelog:

Reputation modifier: 10

Wednesday, July 13th 2016, 12:12am

### First approach to air drag model in BF1

OUTDATED - SEE 4th APPROACH THREAD

At the moment the only information we have (I have) are the stats provided by Miffyli (Vo=880 m/seg, g=12 m/seg, and a mysterious drag value = 0.0025 ....) and this image

The horizontal scale is given by damage model. No vertical scale for drop curve. Analyzing this curve

IThe initial angle can be given arbitrary or may correspond to weapon zeroing. In this case we see that the weapon seems to be zeroed at 150 m.

We are going to adjust a curve to the trajectory using a simplified model of air drag (proportional) given by

F = k.V

and the negative acceleration "A" that slows the bullet is:

F = m.A where "m" is the mass of the bullet

Equaling forces

A = K / m.V = C.V

Note that we have to know "K" and the mass of the bullet or the value "C" for each ammo. Surprisingly the drag values are the same for almost all weapons (0.0025).

As the relationship between "A" and "V" is linear we can decompose the movement in the X and Y axes, resulting those differential equations:

Ax = dVx/ dt = -C.Vx

Ay = dVy / dt = -C.Vy - g

This can be solved analytically but provides a solution versus time and the graph curve have a regular spacing by distance not by time.

Note that unlike the "single gravity" model of BF4, in BF1 equal times do not correspond to equal distances traveled due to variable values of Vx.

We will use a finite difference method "forward" (ie, the value that is applied in the interval "i" is the initial value. There are other methods "backward" and "central" even with complex functions that give the value applied dependig on the values t-1, t-2, etc...

The spacing will be "s" constant (here calculation each 10 m), with the formulation for the interval "i" to get the value "i+1" (sorry, but I don't know how to get the Delta symbol for the time increment )

Vx (i + 1) = Vx (i) - (Ax (i).inc(t).) = Vx (i) - (C.Vx (i). inc(t))
Vy (i + 1) = Vy (i) - (Ay (i) . inc(t)) - g.inc(t) = Vy (i) - (C.Vy (i) .inc(t)) - g.inc(t)

being inc(t)=s/Vx(i)

So we have a curve and we can drag it to adjust to drop curve adjusting the parameter "C" and initial angle.

As you see it fits (spacing is not the same).

Using that parameters we can extend the curve to other distances. The initial angle has been increased for better clarity in the vision of the trajectory.

Here you see the air drag efect in the last part of the trajectory with the terminal speed almost vertical.

CONCLUSIONS

1. A simplified model (K.V applied independently to the X and Y axes) reasonably fits, but can not rule out that the model used in the game is K.V2 or another, only with the graphic used. (Just first approach).

2. The effect of air drag will be small in the usual distances (100-200 m). Feeling will be similar to the model "only gravity" of BF4 at these distances.

3. The shots further 400-500 meters will be very difficult to estimate intuitively through the scope (strongly nonlinear) and will need strong corrections, perhaps out of the scope.

Remember that in the model "only gravity" the number of dots of correction has a linear relationship with the distance (double distance = double number of dots) beside the distortion produced by the offset.

More discussion with model K.V2 in the following posts.

This post has been edited 8 times, last edit by "leptis" (Nov 2nd 2016, 12:31pm)

PvF 2017 Champion

Posts: 7,304

Date of registration
: Apr 3rd 2012

Platform: PC

Battlelog:

Reputation modifier: 19

Wednesday, July 13th 2016, 12:16am

Will you be doing an analysis with the non-simplified form?
Data Browser

Passive Spotting is the future!

"Skill" may indeed be the most magical of words. Chant it well enough and any desire can be yours.

Are you a scrub?

### Quoted from "blahdy"

If it flies, it diesÂ.

Posts: 282

Date of registration
: Mar 17th 2015

Platform: PC

Battlelog:

Reputation modifier: 10

Wednesday, July 13th 2016, 12:44am

### Quoted from "NoctyrneSAGA"

Will you be doing an analysis with the non-simplified form?

The problem with non simplified model F=K.V2 is it has not analytical solution.

The analytical solucion of the simplified model F=K.V is complex enough because the expresion of V or the coordinates of the trajectory are an exponential function.

In any case we have only the curve for small distances and the difference between both methods is more important at long range not in the 100-200 m range.

But it can be calculated by finite differences but not with a "forward" method. The change "inside" of the interval may be very strong due to exponent 2. A "central" method with an unknown funtion (to be deducted) would be more accurated. Too hard to do for a small result.

Symthic Developer

Posts: 3,752

Date of registration
: Mar 21st 2013

Platform: PC

Location: __main__, Finland

Reputation modifier: 17

Wednesday, July 13th 2016, 12:50am

### Quoted from "leptis"

(sorry, but I don't know how to get the Delta symbol for the time increment )

You can use $$\delta$$ or $$\Delta$$ by writing:

### Source code

1

$$\delta$$ or $$\Delta$$

I can't dig too deep into this as I am just getting to bed, love to see maths and logic I could completely understand for once tho! .
About velocity: To be precise the velocity is slightly higher than 800m/s. The speed on z axis (away from shooter) is 800m/s, while speed on y axis (upwards in shooter's view) is 1.045m/s. This is what causes the zeroing.

Also as the graph only extends to around 270m and effect of drag seems to be exponential-ish (dunno better word atm), would the effect of drag be accurately visible in the given graph considering the accuracy (image pixels)?
• 3VerstsNorth - Analysis of game mechanics in BF4 (tickrates, effects of tickrate, etc)
• InterimAegis - Weapon comparisons/scoring.
• leptis - Analysis of shotguns, recoil, recoil control and air drag.
• Veritable - Scoring of BF4/BF1 firearms in terms of usability, firing and other mechanics.
• pmax - Statistical analysis of BF4 players/games.
• Miffyli - Random statistical analysis of BF4 battlereports/players and kill-distances. (list is cluttered with other threads).
Sorry if your name wasn't on the list, I honestly can't recall all names : ( . Nudge me if you want to be included

Can't get a title

Posts: 1,531

Date of registration
: Dec 23rd 2013

Platform: Xbox One

Location: The Land of Multitudinous Kangaroos

Reputation modifier: 13

Wednesday, July 13th 2016, 1:33am

I got a very similar graph (I posted it somewhere in the BF1 Alpha stats thread) by using a distance formula, and assuming drag to be acceleration. This was the function:

y = [InitialYVelocity]*t + 0.5*[Gravity]*t^2,
where t = x / sqrt([InitialZVelocity]^2 + 2*[DragAcceleration]*x)

The problem is that I (we?) don't know what units the drag value is listed as. I don't think it is m/s^2 (acceleration) as that hardly would make a difference to the graph.

If drag turns out to not be acceleration (as I suspect), then I guess you could substitute [DragAcceleration] for [DragForce] / [MassOfBullet] into the function.

Edit: found the graph
something something Model 8 bestgun

### Quoted from "Pastafarianism"

Next, wanna try adding a guy that you KNOW is bad, and just testing to see that? Example: PP-2000 (god I so wanna love this gun, and yet...)

### Quoted from "Pastafarianism"

Example: PP-2000 (god I so wanna love this gun, and yet...)

Yes, it comes in last so far, but that is mostly because I'm making it shoot at 100m ADS - Not Moving as one of the criteria. Even then, between 50-100m Not Moving, when you include Useability, it is only 1.37% worse than the MTAR-21. Within 50m then it even beats the A-91.

Have a look, vs. the A-91 Carbine:

Using it with Muzzle Brake and Compensator is a wash in terms of overall performance. Comp is SLIGHTLY more accurate, while MB is SLIGHTLY more easy to use. Their overall scores are basically tied, with MB just ahead. I guess either can be recommended.

### Quoted from "Pastafarianism"

But... You can't be counting for the fact that it takes 9 bullets to kill at "long" range... Don't you dare tell me my A-91 is worse than a 9 BTK 650 RPM mediocre PDW.

Also. Just go heavy barrel. The recoil is low enough.

### Quoted from "Zer0Cod3x"

Well, technically...

Comparing a PP2K with HB and an A-91 with comp and stubby (as you suggested in an earlier post), at 50m not moving, the A-91 is only better by 4 damage per hitrate. While at 75m and 100m, surprisingly the PP2K does better than the A-91 (I'm pretty damn surprised as well).

And 10m and 50m moving the PP2K also does more damage per hitrate than the A-91. At 25m the A-91 is only better by about half a bullet's damage as well.

In addition, the PP2K has a much larger mag size and substantially less recoil. And it looks hella awesome. So comparing the A-91 to a PDW is of some worth after all, as the PP2K is better (technically, not practically) than the A-91.

Mind blown.

### Quoted from "Pastafarianism"

I... I...

*cries in a corner*

### Quoted from "Veritable"

Zer0Cod3x explained it very well. If you look at the raw numbers right here on Symthic Comparison, you can see how that happened:

A-91 vs PP-2000 | BF4 Weapon Comparison | Symthic

A-91's "23%" RPM advantage only afforded it 1 extra round.

Velocities are wash.

V-Recoil are wash (and this is HBar on PP2k vs. A-91 without).

Hipfire and ADS - Moving are better on the PP2k, but it's a PDW and not the surprising part.

The surprising part is that, as equipped (and we see above that PP2k HBar has almost same V-Recoil as A-91 without HBar so why not?), the PDW performs better at 50 - 100m than a bloody Carbine. Why?

SIPS, 42% better on the PP2k.

And here is the most important part. ADS - Not Moving Spread, 0.35 vs. 0.2, 43% improvement.

Without HBar then of course the PP2k loses, which is why when I add all the attachments together for an Overall Ranking, it would slot below the A-91. Run HBar on it, though, then... I'm sorry

### Quoted from "Pastafarianism"

@Veritable
@Zer0Cod3x
I... I...
But...
Wha...
I AM HAVING AN EXISTENTIAL CRISIS IN SCHOOL BECAUSE OF YOU TWO.

FUCK YOU NERDS AND YOUR FANCY NUMBERS

SEXY RUSSIAN BULLPUPS FTW.

In all seriousness, thank you both so much for giving me the numbers. I still don't want to accept them. You have led the horse to water. I still need to drink.

This post has been edited 1 times, last edit by "Zer0Cod3x" (Jul 13th 2016, 1:43am)

Moderator

Posts: 1,941

Date of registration
: Sep 26th 2012

Platform: PC

Location: State of Confusion

Battlelog:

Reputation modifier: 15

Wednesday, July 13th 2016, 2:01am

I don't see any reason why the realistic drag formula wouldn't be used over the simplified one. It wouldn't really be any more complicated to set up in game either way. Bullet positions aren't solved analytically, they're integrated frame by frame from velocity, which is integrated from acceleration.

The numbers make sense too. Just use the drag equation and F=ma, then just solve for acceleration and roll everything that isn't velocity into a single constant, drag.

Instantaneous acceleration = v^2 * drag

For G98, that would be 880^2 * 0.0025 for the first frame, or 1936m/s^2 acceleration, which seems really high, but remember it's applied over a short time. At 60 frames per second, that would be around 32m/s less for the next frame.

For the second frame we'd have 848^2 * 0.0025, which is 1798m/s^2, and -30m/s in the next frame.

For the third frame we have 818^2 * 0.0025, 1673m/s^2, and -28m/s in the next frame.

The bullet would have a velocity of ~790m/s on the fourth frame. I'm stopping here, but the math would keep repeating for each frame.

To get position we just multiply the velocity in the frame by the delta (1/60 for 60fps) and then sum them.

So first frame gives a travel distance of 14.667m, second 14.133, third 13.633, fourth 13.1667, etc.

Summing those we get a travel distance of around 55.6m, for an average velocity of 834m/s for the first four frames. The more frames we calculate for, the more average velocity will be reduced by drag.

Posts: 282

Date of registration
: Mar 17th 2015

Platform: PC

Battlelog:

Reputation modifier: 10

Wednesday, July 13th 2016, 12:15pm

### Quoted from "Miffyli"

About velocity: To be precise the velocity is slightly higher than 800m/s. The speed on z axis (away from shooter) is 800m/s, while speed on y axis (upwards in shooter's view) is 1.045m/s. This is what causes the zeroing.

interesting.

I have adjusted the curve with two degrees of freedom (angle and "C") but if you can give me the values of zeroing ( Vx and Vy) I will know the initial angle and the crossing by "0" at 150 m, leaving only one degree of freedom. So I can try the K.V and K.V2 models and possibly discriminate between them.

But the data you have given me may not be correct because the listed muzzle speed for the GEWERH is 880 m / sec and not 800 m/sec. Please check it.

2nd question: have ammo files data for the bullets mass ?. If they have them, drag may be "K". If they do not have it has to be "K / m".

### Quoted from "Zer0Cod3x"

I got a very similar graph (I posted it somewhere in the BF1 Alpha stats thread) by using a distance formula, and assuming drag to be acceleration. This was the function:

y = [InitialYVelocity]*t + 0.5*[Gravity]*t^2,
where t = x / sqrt([InitialZVelocity]^2 + 2*[DragAcceleration]*x)

I saw your curve in your post, but as you can see the formula did not look complete. Now I see the structure used.

You apply the drag effect only to horizontal speed. I do not think so. There isnt any reason for that restriction.

Trajectories with single horizontal drag tend to be very strange.

Incidentally I do not really understand the expression of "t" (perhaps thinking a while... )

### Quoted from "Labby"

I don't see any reason why the realistic drag formula wouldn't be used over the simplified one. It wouldn't really be any more complicated to set up in game either way. Bullet positions aren't solved analytically, they're integrated frame by frame from velocity, which is integrated from acceleration.

You're right. The applied model may be K.V2 which is hard to see with such poor information as the graph.

Applying this model (in finite differences) would produce more cumulative error refering to real physical path but this is not important in the game. In fact the BF4 model "only gravity" was more unreal and it worked perfectly to play. In the game the trajectory calculated is the "REAL" one. I was thinking in the accuracy of finite differences methods, and that is not important.

I change my conclusion to be less "conclusive":

1. A simplified model (K.V applied independently to the X and Y axes) reasonably fits, but can not rule out that the model used in the game is K.V2 or another, only with the graphic used. (Just first approach).

Perhaps with the data I have asked Miffyli I could discriminate better.

We have hours and hours of funny maths ahead!!!!! (Sorry math haters )

Symthic Developer

Posts: 3,752

Date of registration
: Mar 21st 2013

Platform: PC

Location: __main__, Finland

Reputation modifier: 17

Wednesday, July 13th 2016, 12:53pm

### Quoted from "leptis"

But the data you have given me may not be correct because the listed muzzle speed for the GEWERH is 880 m / sec and not 800 m/sec. Please check it.

2nd question: have ammo files data for the bullets mass ?. If they have them, drag may be "K". If they do not have it has to be "K / m".

Oh wups, my bad! Yes it was supposed to be 880m/s for z axis, not 800m/s. Vx is 880m/s and Vy is the 1.045m/s.

The projectile for Gewehr 98's projectile doesn't include any mass values, but it could be stored somewhere else or even inside engine (in which case it could be shared among different projectiles).
• 3VerstsNorth - Analysis of game mechanics in BF4 (tickrates, effects of tickrate, etc)
• InterimAegis - Weapon comparisons/scoring.
• leptis - Analysis of shotguns, recoil, recoil control and air drag.
• Veritable - Scoring of BF4/BF1 firearms in terms of usability, firing and other mechanics.
• pmax - Statistical analysis of BF4 players/games.
• Miffyli - Random statistical analysis of BF4 battlereports/players and kill-distances. (list is cluttered with other threads).
Sorry if your name wasn't on the list, I honestly can't recall all names : ( . Nudge me if you want to be included

Can't get a title

Posts: 1,531

Date of registration
: Dec 23rd 2013

Platform: Xbox One

Location: The Land of Multitudinous Kangaroos

Reputation modifier: 13

Wednesday, July 13th 2016, 4:04pm

### Quoted from "leptis"

I saw your curve in your post, but as you can see the formula did not look complete. Now I see the structure used.

You apply the drag effect only to horizontal speed. I do not think so. There isnt any reason for that restriction.

Trajectories with single horizontal drag tend to be very strange.

Incidentally I do not really understand the expression of "t" (perhaps thinking a while... )

Well, the original distance formula is r = ut + 0.5at^2, so I modified that a bit to fit a graph.

t is time, as you would expect. However, t = distance / velocity as well, so I substituted r / v into the formula. Since the x-axis represents r, the numerator is x, and since v = sqrt(u^2 + 2ar), I substituted the appropriate values into the denominator.

Hence, t = x / sqrt([InitialZVelocity]^2 + 2*[DragAcceleration]*x)

I guess I didn't consider the effects of drag specifically on the vertical scale. But haven't I already incorporated it? Since the y-value is directly affected by the x-value, and hence affected by drag, haven't I already taken it into account? Or am I just being bad at physics (as I normally am )

On the graphing calculator, the curve I produced looked about correct, so that's why I shared it.

Besides, I have no idea how to translate Labby's iterative equations into a function. I'll leave that to someone better at maths than me.
something something Model 8 bestgun

### Quoted from "Pastafarianism"

Next, wanna try adding a guy that you KNOW is bad, and just testing to see that? Example: PP-2000 (god I so wanna love this gun, and yet...)

### Quoted from "Pastafarianism"

Example: PP-2000 (god I so wanna love this gun, and yet...)

Yes, it comes in last so far, but that is mostly because I'm making it shoot at 100m ADS - Not Moving as one of the criteria. Even then, between 50-100m Not Moving, when you include Useability, it is only 1.37% worse than the MTAR-21. Within 50m then it even beats the A-91.

Have a look, vs. the A-91 Carbine:

Using it with Muzzle Brake and Compensator is a wash in terms of overall performance. Comp is SLIGHTLY more accurate, while MB is SLIGHTLY more easy to use. Their overall scores are basically tied, with MB just ahead. I guess either can be recommended.

### Quoted from "Pastafarianism"

But... You can't be counting for the fact that it takes 9 bullets to kill at "long" range... Don't you dare tell me my A-91 is worse than a 9 BTK 650 RPM mediocre PDW.

Also. Just go heavy barrel. The recoil is low enough.

### Quoted from "Zer0Cod3x"

Well, technically...

Comparing a PP2K with HB and an A-91 with comp and stubby (as you suggested in an earlier post), at 50m not moving, the A-91 is only better by 4 damage per hitrate. While at 75m and 100m, surprisingly the PP2K does better than the A-91 (I'm pretty damn surprised as well).

And 10m and 50m moving the PP2K also does more damage per hitrate than the A-91. At 25m the A-91 is only better by about half a bullet's damage as well.

In addition, the PP2K has a much larger mag size and substantially less recoil. And it looks hella awesome. So comparing the A-91 to a PDW is of some worth after all, as the PP2K is better (technically, not practically) than the A-91.

Mind blown.

### Quoted from "Pastafarianism"

I... I...

*cries in a corner*

### Quoted from "Veritable"

Zer0Cod3x explained it very well. If you look at the raw numbers right here on Symthic Comparison, you can see how that happened:

A-91 vs PP-2000 | BF4 Weapon Comparison | Symthic

A-91's "23%" RPM advantage only afforded it 1 extra round.

Velocities are wash.

V-Recoil are wash (and this is HBar on PP2k vs. A-91 without).

Hipfire and ADS - Moving are better on the PP2k, but it's a PDW and not the surprising part.

The surprising part is that, as equipped (and we see above that PP2k HBar has almost same V-Recoil as A-91 without HBar so why not?), the PDW performs better at 50 - 100m than a bloody Carbine. Why?

SIPS, 42% better on the PP2k.

And here is the most important part. ADS - Not Moving Spread, 0.35 vs. 0.2, 43% improvement.

Without HBar then of course the PP2k loses, which is why when I add all the attachments together for an Overall Ranking, it would slot below the A-91. Run HBar on it, though, then... I'm sorry

### Quoted from "Pastafarianism"

@Veritable
@Zer0Cod3x
I... I...
But...
Wha...
I AM HAVING AN EXISTENTIAL CRISIS IN SCHOOL BECAUSE OF YOU TWO.

FUCK YOU NERDS AND YOUR FANCY NUMBERS

SEXY RUSSIAN BULLPUPS FTW.

In all seriousness, thank you both so much for giving me the numbers. I still don't want to accept them. You have led the horse to water. I still need to drink.

Symthic Developer

Posts: 3,752

Date of registration
: Mar 21st 2013

Platform: PC

Location: __main__, Finland

Reputation modifier: 17

Wednesday, July 13th 2016, 5:04pm

Update: Added 'Time' to show how long it takes for projectile to get that far

Update2: Updated to work at 60Hz and draw first 3 seconds of the shot Moved back to fixed step so chart works correctly.

Update3: Added initial y position, modified max range to 600m

Made a quick chart thingy for drawing and comparing bullet drops with drag (according to what Labby said, will update as we get more info etcetc). The values are updated at steps of 5m instead of fixed tickrate, so it might be more accurate than the game would be. Default values are there to show how much drag affects at longer ranges.

Chart updates when you click outside a value box after changing a value

Drop 1
Velocity x:
Velocity y:
Position y:
Gravity :
Drag:
Drop 2
Velocity x:
Velocity y:
Position y:
Gravity:
Drag: