Jump to content
attorney1977

Attn Community: Help needed - wind and windage

Recommended Posts

Sup,

I have coded a system for DayZ to simulate wind and it's affect on ballistics. I have submitted the idea to R4zor and his team and they generally seem positive about including it.

The system works like this:

  • The server periodically sets the wind (based on the DayZ weather module) and broadcasts it to all clients.
  • Whenever a projectile is launched by a player (bullet, can, grenade, pellets), a modifier is applied to the projectile based on the strength and direction of the wind, plus the properties of the projectile itself.
  • The projectile's new path is then recalculated and set on it's merry way.

The system also features a 3D wind sound source. The volume of the wind sound changes in accordance with the strength of the wind. The sound will be played to the player from the direction of the wind, so you can turn your head to check where the wind is coming from.

(Of course, you could always look at which way the trees and grass is leaning, but there may not be any around in some areas of the map).

There is also a system for windage on sights, so that you can compensate for the wind. The windage system works much like the default BIS zeroing system, so you press a pre-defined key for left windage and another for windage to the right.

I don't want to replace the default Arma zeroing system because it works fine (no point reinventing the wheel).

Here is a mock up of it working:

Disclaimer: All sounds and values used for this demonstration are WIP.

Please ignore the debug information and use of triggers for the wind.

The code is 90% complete, but to get it accurate for all weapons, I need some help from the community.

How you can help

I need to find out how much each caliber of bullet will drift with a set speed of wind over a set distance. So, if you can post in here some data (or links to accurate data), it would save me a whole bunch of time.

(Example: .50 cal will drift by 30cm over 500 yards in a 5m/s cross wind).

Basically, I need data for every gun (or caliber) in DayZ. Obv, I'll be looking stuff up myself, but if you can help, I would really appreciate it. I'll also post up on Reddit in case anyone there can assist.

Once I've got enough to work with, I will submit the code to the devs for consideration. I can't promise that they will accept it, but as long as it's fit for purpose, then there's a good chance it could be put in game.

EDIT: Reddit linky

Edited by Horde
  • Like 15

Share this post


Link to post
Share on other sites

i have no idea where to find this info, and i don't really have time to find it. this thing is awesome though!

Share this post


Link to post
Share on other sites

hey, how does it work? is there a "global" wind, or are there different winds, different speeds in different areas? or is this possible for further developement?

NICE JOB btw

Share this post


Link to post
Share on other sites

Looks good and will be an excellent addition :thumbsup:

Don't know if any of this info will help, but anyway..

M14 Calculations M14 Calculations

Plus some charts..

99dnvm.gif

2n3h4p.gif

rivml1.gif

m97xty.gif

kaie04.gif

....that lars pic always freaks me out

  • Like 2

Share this post


Link to post
Share on other sites

well i don't really know anything about that matter, but how big is the impact on projectiles, when it is raining or snowing? are there also statistics or characertistics?

well a quick google search shows me, that there is seemingly no impact on projectiles (too fast and forms a dense wind shield around it, so that the little drops simply do not touch the bullet..)

but what about hail then... well i just google it..to be edited

Edited by joe_mcentire

Share this post


Link to post
Share on other sites

I love it! Brilliant job on scripting that and i sure hope they implement it!!

If you have loads of spare time left and want to make it very realistic then:

- wind in the entire server blows in same direction?

- wind directions and speeds can be different within a 1000 yard (914,4 meters) range.

- wind is altered by the buildings

- humidity comes into count when making long range shots

- air temperature comes into count when making long range shots

- barrel temperature .....

- ammunition temperature....

They all influence the energy the bullet carries and the speed of which the bullet drops over a certain range.

So again, very nice job on getting this done!

Share this post


Link to post
Share on other sites

If you have loads of spare time left and want to make it very realistic then:

- wind in the entire server blows in same direction?

- wind directions and speeds can be different

wut? :huh:

Share this post


Link to post
Share on other sites

are you using fixed drift (say 0.15 degrees over all distances) or curved (increases over distance, as in Hestaine's tables)?

If you can get your hands on bulletflight for Iphone, that is the best solution for you (in case of curved flight)

for fixed drift let me know at which distance you need info

Good addition, btw, just a little nag: arma grass and trees are swaying back and forth while IRL they would simply lean in one direction, or at least lean in one direction and than sway slightly, could a better wind indication be added/used?

Share this post


Link to post
Share on other sites

Nicely done man! This would add so much more realism into DayZ mod! Heck, it would cut down on the sniper noobs aswell because sniping would become more of a challenge! I hope R4zor adds this in, its just so great! I wish I could give you an entire backpack full of beans!

  • Like 1

Share this post


Link to post
Share on other sites

wut? :huh:

He said..is the wind direction going to be the same on the whole server at the same time. So if in Elektro it is blowin' an Easterly gale at 10mph then the same is happening at Stary,,and Tulga,,and Berezino..etc. Same wind. Whole server.

Good addition, btw, just a little nag: arma grass and trees are swaying back and forth while IRL they would simply lean in one direction, or at least lean in one direction and than sway slightly, could a better wind indication be added/used?

Always wanted the wind to be indicated by your surroundings, noise is a good start though. Would be awesome to be able to gauge the wind direction by all those dandelion fluffy things flying around as well.

edit : surprised there was not much more reaction than 1 post on Reddit for this.

Edited by Hetstaine

Share this post


Link to post
Share on other sites

He said..is the wind direction going to be the same on the whole server at the same time. So if in Elektro it is blowin' an Easterly gale at 10mph then the same is happening at Stary,,and Tulga,,and Berezino..etc. Same wind. Whole server.

Always wanted the wind to be indicated by your surroundings, noise is a good start though. Would be awesome to be able to gauge the wind direction by all those dandelion fluffy things flying around as well.

edit : surprised there was not much more reaction than 1 post on Reddit for this.

actually he said that the wind should be the same, then says that the wind should change every 1000 yards. but that was probably just a fuckup anyway soo, yeah.

Share this post


Link to post
Share on other sites

Thanks for replies all, especially Hetstaine who has caused me all sorts of headaches! :)

When I coded the drift, I didn't realise that the drift is linked to the drop off in velocity. (I hadn't done any research and assumed it was a constant change - which is incorrect). Classic schoolboy error....

What this means is the calculations in the code are only good for one range, and at all other ranges, the results would be skewed.

Having looked at the link you gave me, and those charts, I'll have to go away and recode it to dynamically calculate the path of the bullet relative to time.

*Puts thinking cap on*...

  • Like 1

Share this post


Link to post
Share on other sites

You have to be aware of the different rounds involved.

5.56mm rifles would fire 62-grain M885.

7.62mm NATO rifles would fire 147-grain M80.

7.62mm NATO sniper rifles (M24 and M40A3) would fire the 175-grain M118LR

The DMR and M14 AIM would probably fire the M118LR as well, not the 147-grain M80.

7.62x39mm rifles would fire generic 123-grain ball at 2,350 ft/s.

The Lee-Enfield would fire .303 British Mk.VII, a 174-grain bullet at 2,440 ft/s.

The M107 is a bit iffy, standard issue load data is hard to find. Would probably fire M33 ball, but M33 ball comes in different specs from different manufacturers.

The AS50 would fire a British load, too troublesome to find information online, use M33 data.

The CZ550 is a tricky one. It claims it fires 9.3x62mm, but the magazine classname refers to .17 HMR and .22 LR, and the muzzle velocity and damage is identical to the 7.62mm sniper rifles. Hence, use values for any type of 150-grain 7.62mm hunting ammunition.

The 5.45mm rifles would fire the 7N10, a 56-grain bullet at 2,900 ft/s.

The Lapua rifles fire the B408 Lockbase at 3,071 ft/s.

Handgun caliber data is less important, use ballistic coefficients from commerical loads with similar bullets. Shotgun pellets don't matter either, slug data is available if you Google around a bit.

You'll need to use a ballistic calculator to find out the drift at different wind speeds and how range effects the velocity. Please note two important things: ballistic coefficients are designed for use compared to a "standard" projectile. How accurate the calculations will be depends on how close your projectile is to the "standard" one. That's why there are different ballistic coefficient systems, like G1, G5, G7. Make sure to use the correct coefficients - G7 will work better than G1 for "very low drag" bullets, etc. The G1 will work well for most standard military ammunition and hunting loads, etc.

Also make sure to use the muzzle velocities presented in the configuration files to find out which loads the rifles are firing. If the M24 fires at about 2,600 ft/s, you know it's supposed to use M118LR, but if it fires at 2,800 ft/s, you know it is supposed to be using M80 ball, etc.

Some loads will be hard to find information for - nearly impossible in some cases, e.g. the ballistic coefficients for the MkVII ammunition for the Lee-Enfield. In these cases you should estimate one using data from similar bullets and your general knowledge.

You have some work ahead of you. :lol:

Share this post


Link to post
Share on other sites

Okay, changed the code for the ballistics.

Bullets now change their path during flight and follow a correct ballistic arc horizontally when in wind.

The windage system is in mil-dots and increments in 0.1 mils.

Bullets now even react to changes in the wind during their flight-time (I'm not going to do anything about regions of wind at this time, but maybe something for the future). Arma 2 does have a variable wind speed however, so even though the server might set wind speed as 3 m/s southerly fror example, you will still experience fluctuations in the wind from time to time.

Please see the following video for demonstration. The DMR was picked as I had Hetstaines data for 7.62mm NATO. (I don't even know if the DMR should have windage in Dayz) I'm thinking if a gun has zeroing controls in Dayz already, then it should have windage controls. If it doesn't have zeroing, then why should it have windage turrets simulated?

Anyway, please see the demo vid. The data is based off the first chart in this post.

The yellow trails are just debugging stuff so you can see what's going on.

I need to add in the coefficients for other calibers (dependent on finding ballistic charts), determine which guns need windage and tidy the sound files up then it's good to go.

Edited by Horde
  • Like 2

Share this post


Link to post
Share on other sites

This is a good idea, but we still need too account for the slow bullet travel

Share this post


Link to post
Share on other sites

Please explain. What do you mean by 'slow bullet travel'?

Edited by Horde

Share this post


Link to post
Share on other sites

Ever tried to shoot a guy that is, lets say, running 200 m in front of your position? ever noticed that if u aim exactly at him or even trying too aim a bit in front of him too account for what you believe is normal bullet travel ( lets say like in battlefield, best recreated realistic bullet travel i know of), if you take that shot in the ArmA 2 engine, you will probably miss. Try in the editor too shot with some tracers, I'm not a weapon expert, but from what I've seen, the bullet travel speed is way off.

EDIT

Either its a problem with what i just (tried to) explained, or the bullet impact is slow too make any reaction.

Sorry for bad spelling, not my native language

Or it could be both, been doing some research into this matter, and my experience with the travel time/reaction time is shared.

Edited by Mad mega

Share this post


Link to post
Share on other sites
normal bullet travel ( lets say like in battlefield, best recreated realistic bullet travel i know of)
I'm not a weapon expert, but from what I've seen, the bullet travel speed is way off

O3qpoNX.jpg?1

Are you serious? If you don't know anything about how real bullets travel, how can you say ArmA has unrealistic bullet travel, especially compared to... BATTLEFIELD?!

Here are some in-game ArmA stats:

----------------Muzzle-------300m-------800m---

AKM-----------710-----------392--------148----

M16A2--------930-----------601--------295----

M24-----------900-----------679--------425----

Now for the approximate real-world values:

----------------Muzzle--------300m--------800m---

AKM----------710------------426----------157----

M16A2-------930------------633----------305----

M24----------900------------675----------374----

As you can see, ArmA is not perfect, but they're certainly not too far off. They're actually surprisingly close to the real-world, given the complexity of real ballistics calculations. ArmA uses a very simplified system but the results are still good.

Note how slow the AKM rounds are going at 800m... in the 500 ft/s range. Very weak. That calculation is quite accurate, they've been measured with Doppler radar.

Edited by Gews
  • Like 1

Share this post


Link to post
Share on other sites

O3qpoNX.jpg?1

Are you serious? If you don't know anything about how real bullets travel, how can you say ArmA has unrealistic bullet travel, especially compared to... BATTLEFIELD?!

Here are some in-game ArmA stats:

----------------Muzzle-------300m-------800m---

AKM-----------710-----------392--------148----

M16A2--------930-----------601--------295----

M24-----------900-----------679--------425----

Now for the approximate real-world values:

----------------Muzzle--------300m--------800m---

AKM----------710------------426----------157----

M16A2-------930------------633----------305----

M24----------900------------675----------374----

As you can see, ArmA is not perfect, but they're certainly not too far off. They're actually surprisingly close to the real-world, given the complexity of real ballistics calculations. ArmA uses a very simplified system but the results are still good.

Note how slow the AKM rounds are going at 800m... in the 500 ft/s range. Very weak. That calculation is quite accurate, they've been measured with Doppler radar.

I tested shooting with tracers and the bullet travel time just feels very slow, compared to battlefield, where i know they try to be realistic 2. Only CoD I've ever owned was CoD 2. Plus have watched a lot of videos where they shoot M4s and such with tracers, and it feels there's a helluva difference in bullet time travel.

Share this post


Link to post
Share on other sites

I tested shooting with tracers and the bullet travel time just feels very slow, compared to battlefield, where i know they try to be realistic 2. Only CoD I've ever owned was CoD 2. Plus have watched a lot of videos where they shoot M4s and such with tracers, and it feels there's a helluva difference in bullet time travel.

Battlefield may try to be realistic, but it doesn't try nearly as hard as ArmA. I don't know why bullets feel faster in Battlefield, all I know is that the speeds in ArmA are pretty correct.

Check out this video, about 30 seconds in:

You can see the vapor trail from the bullet and how long it takes to hit after it is fired. 1030 yards is 941 meters.

Share this post


Link to post
Share on other sites

How far away is the camera from the rifle? Just next to it?

Edited by Mad mega

Share this post


Link to post
Share on other sites
Think this one shows the bullet time travel a bit better, but I'm guessing those are a bit faster (completely uneducated guess). If you would compare that bullet travel time to the ones in ArmA 2 I'm 100% it would be off

Share this post


Link to post
Share on other sites

How far away is the camera from the rifle? Just next to it?

Right next to it, zoomed in. You can tell because he adjusts it. As for the above video... he doesn't say what range he's shooting at.

Edited by Gews

Share this post


Link to post
Share on other sites

Battlefield may try to be realistic, but it doesn't try nearly as hard as ArmA. I don't know why bullets feel faster in Battlefield, all I know is that the speeds in ArmA are pretty correct.

Check out this video, about 30 seconds in:

You can see the vapor trail from the bullet and how long it takes to hit after it is fired. 1030 yards is 941 meters.

I have a feeling everything in the shooting department in BF is slower than in ArmA. Seems to be a trick to make players feel they shoot over longer distances. You see it the most on rocket launchers, no vehicle could evade them like you do in BF ( even at close range a rocket can be evaded just by moving a bit ) because they are so slow. Bullets might be a bit faster but not faster than in ArmA, sniping distances in BF are also quite close compared to ArmA.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×