project reality header
Go Back   Project Reality Forums > PR:BF2 Mod Forums > PR:BF2 Community Modding
09 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 2017-06-23, 20:41   #1
B4rr3l
Default RBE - Real Ballistic Environment - Guide

I've been the whole week modding weapons and all I can say is delete all BF2 parameters and start from zero, this game has the best ballistic system between all BF series but EA didn't use it. They added the same project velocity for a shotgun and for a M4 but made the shotgun projectile "die" sooner so they don't have the same reach, instead of making it drop to ground.

You will need this:

(1) http://www.hornady.com/assets/files/...Ballistics.pdf
Fixed Link:
https://press.hornady.com/assets/pct...tics-Chart.pdf
2019 (Non-Metric):https://press.hornady.com/assets/pct...tics-Chart.pdf

(2) Standard Ballistics Calculator - Hornady Manufacturing, Inc

(3) https://phet.colorado.edu/en/simulat...jectile-motion


From ballistic charts you can see that a rifle like Ak47 has a velocity of around 715m/s and uses a projectile with 123g of mass. For pistols we have an average projectile velocity of 330ms and a larger projectile mass variation. We will use that later as reference, but you can take the initial muzzle velocity and energy from the first link.

Ok, so we already have the parameters necessary for the Ak47 rifle now lets find the physics:

Using standard BF2 gravity and drag (don't know exactly how this last one varies in BF2 engine but gravity seems like same as real 9.8m/s^2 for gravity = 1)

We will need to calculate all the parameter for ballistics using projectile motion with drag resistance otherwise a M24 fire in a 20 degree angle would have a reach of 65Km.

I've done a spreadsheet using Runge Kutta discretization of fourth order, but I thought would be easier to just give the flash link above that once adjusted correctly can bring the same results in a much more interactive way.

We will need that to calculate the maximum practical range of each weapon in a battle field and also the necessary time to live so the bullets don't die before it reaches the end of it's trajectory.

With your ballistics chart opened open the projectile simulator (link 3) and lets start to calculate.

For that we will take the following scenario:

Average shooting height of 1.6m in a flat field using a 2 Degree elevation angle for compensation. That would be considered for maximum practical reach of the weapon and the needed time to live for this full trajectory.

The engine ballistic itself will be given by the projectile velocity, it's bundlemesh geometry, density, shooting angle and gravity modifier used, so that simulation will be used only to find appropriate realistic time to live and damage model.

Lets start:
- Move the cannon up to 1.6m
- Select tankshell
- Input angle of 2 Degree
- Input your desired project muzzle velocity
- Set 0.07 for mass
- Set 0.012 for diameter
- Set Air Resistance enabled
- Set Drag coefficient 1.8 (Don't ask me why this number, don't know how it's converting inside the model but that is the number that brought same results as when using a real ballistic spreadsheet that I use in the army)
- Fire! check if your final height is -1.6 check the time to live and the maximum range.


2 Degree is more than enough to cover 99.5% of real world given shoots with hand weapons, and that would be a good model to represent practical maximum reach and time necessary to finish the trajectory.

let's see how it works in practical, with a handgun of vi = 330ms and a 2 degree elevation you gonna be aiming 4.3m over your target to hit it at a maximum reach of 367m. For an assault rifle, that means you will be aiming 10m higher to hit a target at 698m. So if your target it's a human body you going to be aiming 5 human body higher in a distance that most of BF2 maps don't cover, that's more than most real scopes can handle but it can happen and it's covered by some good scopes so those are good numbers for practical use with a legend skilled shooter.

So lets go back to our AK-47 now, from the simulation model you should have something close to a maximum reach of 700m with a trajectory time of 2.9s.

The 2.9s you guess where it goes, I know it's much higher than standard BF2 TL, but the whole BF2 ballistics in general is different cause it doesn't exist, basically all the weapons have the same velocity and they adjusted the reach of each one using the time to live function to make one type of bullet die before the other.

So let's put original M4 spec in the simulation and see what happen:

Velocity = 1000 / TL 0.5s at 2 degree elevation the bullet will be traveling at a 10m height in direction of the target when suddenly at 323m it will disappear. Magic bullet. The M24 sniper rifle has the same velocity as the M4 but a time to live of 1 so it dies at 500m. None would ever hit that 800m target, sorry myths!

Yeah Lets go ballistic! That means you will have more objects with physics, geometry and ai computed at the same time, exactly the kind of object that BF loves most. So if you have other different effects, rain, wreck fires, smokes all over... be sure they all are well tuned so they don't live more than necessary, at frequencies that don't make any difference.

Oh the Ak! alright alright

So for now we have:

ObjectTemplate.velocity 715
ObjectTemplate.timeToLive CRD_NONE/2.9/0/0

a maximum reach of 700m and a projectile mass of 123g

On to the Damage model

I will also divide this in tree classes to make things easier, you can do that for as many calibers you whish.

Handguns/smg silenced
Projectile mass = 40g-120g
Velocity = 250-450ms
Energy = 300-650J
Damage Normalizing Factor (DNF) = 25
Caliber 45 Auto / 9mm Luger
Maximum practical range = 360m

Assault rifles
Projectile mass = 60g-120g
Velocity= 450-750ms
Energy = 650 - 1500J
Caliber 7.62x39
Damage Normalizing Factor (DNF) = 48
Maximum practical range = 700m

Long range rifles / Sniper
Projectile mass = 130g-180g
velocity = 750-1100ms
Energy = 1500J - 5000J
Caliber 300 Win Mag / 7.62x51 DMR (308 win SF)
Damage Normalizing Factor (DNF) = 34
Maximum practical range = 890m

The Damage Normalizing Factor, were attained crossing the damage in BF2 vanilla weapons with the real weapons energy according to the chart on first link. The method used was cross interpolation using the average effective range for each class above. Those factors will translate the real weapon energy into BF2 damage at their respective effective range of use. If you decrease them, you will have more damage than vanilla and if you increase it, less.

So let's go back to the Ak47 now, we have the project velocity from ballistic chart, maximum effective range of 700m from the simulation model, 2000J of energy at the muzzle and a Normalize Factor of 46, so lets make the damage model now.

First open up your ballistic calculator (link 2), than you fill it with your projectile mass and velocity accordingly with the ballistic chart (link 1), in the case of the AK 47 that would be 715ms with a bullet mass of 123g, set the maximum range to 2.000m and calculate, you will find that the energy in the muzzle will be around 2040J and around 620J at it's maximum effective range of 700m.

So on for the AK-47:

ObjectTemplate.velocity 715

ObjectTemplate.timeToLive CRD_NONE/2.9/0/0
ObjectTemplate.hasOnTimeEffect 1
ObjectTemplate.tracerScaler 10
ObjectTemplate.maxTracerScaler 60
ObjectTemplate.minTracerScaler 1
ObjectTemplate.tracerSizeModifier 3
ObjectTemplate.tracerTemplate p_tracer_r
ObjectTemplate.tracerConvergeDistance -1
ObjectTemplate.tracerInterval 1
ObjectTemplate.minDamage 620/48 = 13 (Divide the energy at the maximum effective range by the DNF)
ObjectTemplate.damage 2000/48 = 42 (Divide the energy at the muzzle by the DNF)
ObjectTemplate.distToStartLoseDamage 0
ObjectTemplate.distToMinDamage 700 (Maximum practical reach)


Now lets compare this with the original AK47 damage model

ObjectTemplate.timeToLive CRD_NONE/0.5/0/0
ObjectTemplate.material 38
ObjectTemplate.minDamage 0.2
ObjectTemplate.damage 38

Velocity = 1000

Well I don't even know how is that supposed to work, but if you try to hit a target at 499m it will give you a damage of 0.2 and at 500m the bullet will simply die before hitting the target. If you go back and check the ballistic chart again you will see that the AK still having 800J at 500m if you are compensating your drop. That's about 40% of the original energy/damage and if we take the original 38 of damage as reference that minimum damage value should be 15 at the maximum range and not 0,2.

With the new model the Ak will have a damage of 42 in the muzzle, 33 in a 175m range, 23 in a average effective range of 350m and 13 of minimum damage at its maximum effective range of 700m.

So that way we maintain the magnitude of BF2 damage system but scaling accordingly with each weapon real ballistic energy, so each weapon will behave and variate it's damage as the real ones.

Following the same technique we will have:

9mm handgun
ObjectTemplate.timeToLive CRD_NONE/1.9/0/0
ObjectTemplate.minDamage = 334/25 =13
ObjectTemplate.damage= 500(J)/25(DNF) = 20
ObjectTemplate.distToStartLoseDamage 0
ObjectTemplate.distToMinDamage 360

ObjectTemplate.velocity 330

300 Win Sniper
ObjectTemplate.timeToLive CRD_NONE/3.25/0/0
ObjectTemplate.minDamage 1980/28 = 36
ObjectTemplate.damage = 4800/34 = 141
ObjectTemplate.distToStartLoseDamage 0
ObjectTemplate.distToMinDamage 890

ObjectTemplate.velocity 1000

The only unrealistic stuff is that we kept it at BF2 standards for damage in each weapon class so we can have the same cool gameplay. The assault rifles are a bit underpowered in relation to the handguns. And all classes are underpowered when we take the reality into consideration.

There is 2 ways to make all the classes scale the same as the real ones in the same rate. And make the model 100% realistic.

The first one is to make the handguns behave as BBs using the average DNF of 34 for all classes, so we keep the BF2 damage standards and the weapons damage effectiveness scaling almost exactly as the real ones for all the classes but with a different magnitude than reality, which is the BF2 magnitude. That way the handguns would be very weak and the assault rifles much higher than BF2 standards so it means that at 180 distance you would need 4 shots with an AK-47 assault rifle to put some one down or 15 shots with a handgun at the same range, they are both unrealistic but the rifle gets much more powerful than it is on BF2 and the handguns even weaker than they were. The second way, and the most realistic one, would be to use a DFR of 10 for all weapons and have the real energy directly translated to damage in all classes, that would mean that a handgun would need 5 shots to put some one down at 180m, an assault rifle less than 2 shots and a sniper would have you killed twice at that distance.

If you got shoot by an 9mm at 180mm once, you will probably not be able to move as before but you got 75% chance of survive and probably one of your 4 members would ger fucked up (25%), 4 shots of a 9mm even at 180m will drop you dead with 90% of certain. That is the most realistic model, but not sure if it is the most fun one. A single shot of an assault rifle at 10m distance could put you down for good. That's well aligned with the reality but not really fun for gameplay so I will keep the first model which follows BF2 characteristics for each class individually. We can't take the credit for them on the gameplay model which brought countless hours of fun for everyone that knows and tried the game.
B4rr3l is offline
Last edited by Arab; 2020-10-14 at 14:05..
Reply With Quote
Old 2017-06-23, 22:12   #2
FlyingR
Default Re: RBE - Real Ballistic Environment - Guide

Here we go...
FlyingR is offline Reply With Quote
Old 2017-06-23, 23:20   #3
agus92
Supporting Member
Default Re: RBE - Real Ballistic Environment - Guide

Quote:
Originally Posted by B4rr3l View Post
snip
I haven't read it fully (I lack gun knowledge anyway) but congrats for the scientific approach.

Very salomonic resolution of the damage model, but I guess it's acceptable, at least on paper, to try to integrate realism and gameplay basically by merging them. Perhaps instead of merging vanilla values, PR 1.4.7 would be better.
agus92 is offline Reply With Quote
Old 2017-06-23, 23:25   #4
B4rr3l
Default Re: RBE - Real Ballistic Environment - Guide

I think for PR this DFR woud be great:

Pistols 20

Assault rifles 38

Snipers 28

If you have a gravity modifier in your projectile or weapon delete it after set the correct velocity. Let the engine do its work, it will set it to 1 but you don't need to tell that

for a new class you need the weapon with the highest velocity in the class to calculate the maximum practical range and than the time to live, but you can use average speed and energy of the class for finding the:

ObjectTemplate.minDamage
ObjectTemplate.damage
ObjectTemplate.distToMinDamage

This will mean that every weapon in the same class will deal the same damage when at the same distance, but with different velocity within the class speed range, they will have the ballistic exactly as they should in real life so they would feel very different among them, different trajectory arcs, and different times to hit the target, and of course different reach and range of shooting. So from a single class you can make a lot of weapons that feels exactly as their real counterparts.

you can also add the same class with a different projectile mass, that is going to change the energy, velocity and effective range so you have a lot of more options in the same class, let's say 7.62x39 and 223 Rem, they are both assault rifles but the mass in the 7.62x39 is around 123g while in the 223 is only 60g, so the energy in the 7.62x39 is much higher but with a slower velocity so the 223 will have less deviation and further reach, the difference in the ballistic is there even when using the same class for both but they would deal the same damage in a range the 7.62x39 can reach, that's not true cause the 7.62 has more energy, so dividing the class in 2 gives you option for most of the assault rifles out there, the ones with 45-70g and the ones from 120-180.

I think that with no more than 6 projectiles you can make almost every weapon behave in a precision way, of course you can make the projectile and damage model for each weapon as long as their individual ballistic, which depends only of the velocity, geometry and time to live. The time to live using the fastest weapon in a class already cover all the other ones, but you can find it for each one to tweak it better for performance, the velocity and trajectory is already individual from real ballistic chart, the geometry should look like a bullet and have appropriate density and drag, I don't know if that input is in the projectile model or in the engine itself, the mass of it is added in the damage model when we use the ballistic calculator to find its energy and from that, the min/max damage and distance to min damage.

Also, if you wanna try to enable drag for projectile in this model, try it with cx 0.026
B4rr3l is offline
Last edited by B4rr3l; 2017-06-24 at 14:06..
Reply With Quote
Old 2017-06-24, 14:22   #5
B4rr3l
Default Re: RBE - Real Ballistic Environment - Guide

Quote:
Originally Posted by agus92 View Post
I haven't read it fully (I lack gun knowledge anyway) but congrats for the scientific approach.

Very salomonic resolution of the damage model, but I guess it's acceptable, at least on paper, to try to integrate realism and gameplay basically by merging them. Perhaps instead of merging vanilla values, PR 1.4.7 would be better.
Thank you, but actually it's not merging reality with game it is more about finding the real parameters for a simulation model, since all the engine uses real units in a true 3D space. That velocity number it's not just a parameter that's actually m/s. The gravity and drag are also calculated by using the same constants and mathematical model that are applied in reality also.

I can see that the community here is not very friendly since no one commented or expressed their opinion, but they rated the thread at the lowest value possible.

Well I'm a naval engineer from brazilian army, that's the best approach I could think to represent reality and that has a easy way to balance a whole class of weapons with only one factor while keeping each one ballistic signature aligned exactly as they were in reality.

And that's not by using the perception of how I fell about handguns or how they are supposed to work throwing random number on it, there is no achism those are real ballistic models used in real ballistic simulators.

Well I had to do it for me anyway since I didn't find any ballistic model that seems correct out there for BF2. And I also would wrote it down anyway so I didn't get lost in the way so I decided to share it with other people.
B4rr3l is offline Reply With Quote
Old 2017-06-24, 14:39   #6
agus92
Supporting Member
Default Re: RBE - Real Ballistic Environment - Guide

Quote:
Originally Posted by B4rr3l View Post
Thank you, but actually it's not merging reality with game it is more about finding the real parameters for a simulation model, since all the engine uses real units in a true 3D space. That velocity number it's not just a parameter that's actually m/s. The gravity and drag are also calculated by using the same constants and mathematical model that are applied in reality also.

I can see that the community here is not very friendly since no one commented or expressed their opinion, but they rated the thread at the lowest value possible.

Well I'm a naval engineer from brazilian army, that's the best approach I could think to represent reality and that has a easy way to balance a whole class of weapons with only one factor while keeping each one ballistic signature aligned exactly as they were in reality.

And that's not by using the perception of how I fell about handguns or how they are supposed to work throwing random number on it, there is no achism those are real ballistic models used in real ballistic simulators.

Well I had to do it for me anyway since I didn't find any ballistic model that seems correct out there for BF2. And I also would wrote it down anyway so I didn't get lost in the way so I decided to share it with other people.
I thought you were indeed an engineer, people around here don't usually use Runge Kutta

What I meant about the merging was the damage model, not the ballistic simulation. I take it that in order to keep the differentiation in classes you propose to merge a kinetic based DM and a more arbitrary (vanilla). Is that incorrect?

In regards of negative reviews, don't be surprised: the community is exhausted of fighting around the damage model, and I doubt anyone cares too much about ballistics right now due to that. Besides, your post is highly technical in the sense that it dives right into the game implementation, which users who haven't tinkered with the game will have trouble understanding. So don't worry about the reviews.

Finally, I'm afraid the only way you'll get taken seriously is if you implement those changes yourself and prove them empirically. Check Vista's recent Damage model thread for more insight.

Cheers, a fellow.
agus92 is offline Reply With Quote
Old 2017-06-24, 15:19   #7
B4rr3l
Default Re: RBE - Real Ballistic Environment - Guide

Quote:
Originally Posted by agus92 View Post
I thought you were indeed an engineer, people around here don't usually use Runge Kutta

What I meant about the merging was the damage model, not the ballistic simulation. I take it that in order to keep the differentiation in classes you propose to merge a kinetic based DM and a more arbitrary (vanilla). Is that incorrect?

In regards of negative reviews, don't be surprised: the community is exhausted of fighting around the damage model, and I doubt anyone cares too much about ballistics right now due to that. Besides, your post is highly technical in the sense that it dives right into the game implementation, which users who haven't tinkered with the game will have trouble understanding. So don't worry about the reviews.

Finally, I'm afraid the only way you'll get taken seriously is if you implement those changes yourself and prove them empirically. Check Vista's recent Damage model thread for more insight.

Cheers, a fellow.
Actually if you use some sort of non-linear regression you will find that BF2 damage values aren't actually arbitrary and there is a good direct correlation with the weapon energy itself. It's more about the magnitude of it, so we keep the same kind of damage in the effective shooting range for each weapon as a proved fun to play system, but the damage variation between the trajectory varies exactly accordingly to each weapon real characteristics.

How real or how fun to play that magnitude would be can be determined by just changing the DFR.

and thanks for the discussion, I really appreciate that.

It's already implemented and tested, finishing some Hud Holo sights only.
B4rr3l is offline Reply With Quote
Old 2017-11-13, 19:25   #8
B4rr3l
Default Re: RBE - Real Ballistic Environment - Guide

RBE 2.0 live testing

https://www.youtube.com/watch?v=L2_DgKq6WVE&t=1875s

B4rr3l is offline
Last edited by [R-DEV]Rhino; 2017-11-13 at 23:03..
Reply With Quote
Old 2017-11-13, 22:39   #9
Valmont
Default Re: RBE - Real Ballistic Environment - Guide

Quote:
Originally Posted by B4rr3l View Post
That looks cool as hell! Of course the damage model can be improved with tests such as this and I will be one of your testers when you release it It is great to see new people experimenting with the BF2 engine other than the PR devs.

PS: If you ever plan on releasing the mod as a stand alone I suggest you change the mod name to something unrelated to Battlefield and dropping the use of DICE/EA logos anywhere to avoid any "letters" from them.

Some cool untaken names for a possible stand alone release:

1) Tactical Engagements HD
2) Modern Conflicts HD
3) 21st Century Warfare HD
4) Combined Arms HD

Also, it is great that you are sharing your work here with the PR community and the PR devs so thanks for that.
Valmont is offline Reply With Quote
Old 2017-11-15, 14:32   #10
B4rr3l
Default Re: RBE - Real Ballistic Environment - Guide

Quote:
Originally Posted by Valmont View Post
That looks cool as hell! Of course the damage model can be improved with tests such as this and I will be one of your testers when you release it It is great to see new people experimenting with the BF2 engine other than the PR devs.

PS: If you ever plan on releasing the mod as a stand alone I suggest you change the mod name to something unrelated to Battlefield and dropping the use of DICE/EA logos anywhere to avoid any "letters" from them.

Some cool untaken names for a possible stand alone release:

1) Tactical Engagements HD
2) Modern Conflicts HD
3) 21st Century Warfare HD
4) Combined Arms HD

Also, it is great that you are sharing your work here with the PR community and the PR devs so thanks for that.

Yes I got that but it still their original work so I don't think I'm doing more harm than good.

I'm not re-uploading exactly the same old game as the 2005 BF2, so maybe they can even use something from it? I'm not sure, but I also really don't care much, I'm doing this for free and I don't have anything they can take from me for that. Anyway I hope they enjoy the work more than hate it.

That a remaster of a classic and as the classic it should be.

I did some fix on the damages already, actually I used the wrong Dammage factor on the pistols so that's why they seem underpowered in the video. the rest was actually dam fine and balanced, even following all the real parameters of each weapon.

Pretty happy with the final result and we will able to play it very soon if nothing goes wrong... again... lol
B4rr3l is offline Reply With Quote
Reply


Tags
ballistic, environment, guide, rbe, real

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 12:52.