How is armour calculated?

  • Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/
  • Weve updated the Tripwire Privacy Notice under our Policies to be clearer about our use of customer information to come in line with the EU General Data Protection Regulation (GDPR) rules that come into force today (25th May 2018). The following are highlights of our changes:


    We've incorporated the relevant concepts from the GDPR including joining the EU and Swiss Privacy Shield framework. We've added explanations for why and how Tripwire processes customer data and the types of data that we process, as well as information about your data protection rights.



    For more information about our privacy practices, please review the new Privacy Policy found here: https://tripwireinteractive.com/#/privacy-notice

Moz

FNG / Fresh Meat
Nov 21, 2005
1,773
1
0
I mean, all I can find in the vehicle class is:

Code:
    // Armor
    FrontArmorFactor=14
    SideArmorFactor=11
    RearArmorFactor=10

    TreadHitMinAngle= 1.9

The great RO:O simulation level armour system can't be this?
Is there a collision mesh or something?
 

UncleDrax

FNG / Fresh Meat
Oct 13, 2005
1,494
60
0
Florida, USA
www.endoftheworldfor.us
Speaking strickly as someone that is playing with the code for modding purposes as well.. (note: I'm not a TWI coder.. so this is just stuff I figured out while playing around.. eat with salt)


Yes, there is a collision mesh as well, and there should be some code that defines the 'critical areas' (ie: engine/ammo/etc..)..

Poke around more, and be sure to check sub and super classes
 

[TW]Wilsonam

VP, Tripwire Int.
Oct 17, 2005
4,061
2,618
0
62
Roswell, GA
www.tripwireinteractive.com
Yep, the numbers wot you found are just the base armour numbers for each facing of the tank. Ramm can give you chapter and verse (cos he wrote the code - I just designed!), but in principle...

1. Check for collision
2. If you get collision, identify the area and the angle of impact (AoI)
3. Use the AoI and type of round fired to decide if the round deflects/skips
4. If the round doesn't skip, use the base armour factor, plus the AoI, weight and type of round, plus the velocity (KE) for a KE round... non-KE rounds such as PF work differently
5. Run through the penetration calcs - yes or no
6. If the round penetrates, track it on into the vehicle to see what it hits...

And so on :)
 

Moz

FNG / Fresh Meat
Nov 21, 2005
1,773
1
0
shouldn't the aoi and penetration calc be done together? A 88 shell is not going to deflect of cardboard if its beyond a angle.

Where are the collision meshes located?
 

[TW]Ramm-Jaeger

Tripwire Interactive President
Oct 11, 2005
1,887
3,113
0
www.redorchestragame.com
Moz said:
I mean, all I can find in the vehicle class is:

Code:
    // Armor
    FrontArmorFactor=14
    SideArmorFactor=11
    RearArmorFactor=10

    TreadHitMinAngle= 1.9

The great RO:O simulation level armour system can't be this?
Is there a collision mesh or something?

Collision meshes are stored in the UKX file for that particular vehicle. There is per-poly collision for the body of the tanks. Some of the calculations for the armor system are done in the base tank classes, other calculations are done in the projectile classes. There is data in about 6 different classes that are fed into the armor calculations. And since you phrased your question so "respectfully" i'll let you dig through the code yourself to find them ;) Also, some of the calculations are done in the native code for speed.
 

Moz

FNG / Fresh Meat
Nov 21, 2005
1,773
1
0
[RO]Ramm-Jaeger said:
Collision meshes are stored in the UKX file for that particular vehicle. There is per-poly collision for the body of the tanks. Some of the calculations for the armor system are done in the base tank classes, other calculations are done in the projectile classes. There is data in about 6 different classes that are fed into the armor calculations. And since you phrased your question so "respectfully" i'll let you dig through the code yourself to find them ;) Also, some of the calculations are done in the native code for speed.

Why the hell does it have per poly, wouldn't that mean something like a shovel on the side deflect armour.
 

[TW]Ramm-Jaeger

Tripwire Interactive President
Oct 11, 2005
1,887
3,113
0
www.redorchestragame.com
Moz said:
Why the hell does it have per poly, wouldn't that mean something like a shovel on the side deflect armour.

The determination of whether or not the shell impacted the tank or not is per poly. That doesn't mean the angle of the armor calculation is per poly. The angle of the armor calculation is generalized, otherwise you would have silly things like a shell hitting the antenna and deflecting.
 

Amizaur

FNG / Fresh Meat
Aug 18, 2006
275
3
0
44
Gdansk, Poland
The determination of whether or not the shell impacted the tank or not is per poly. That doesn't mean the angle of the armor calculation is per poly. The angle of the armor calculation is generalized, otherwise you would have silly things like a shell hitting the antenna and deflecting.

I have a question - how much is impact angle generalised ? The impact angle is very important thing and I would rather expect to generalise collision detection than impact angle. Best would be to use same, simplified 3D model (all non-armour elements removed including wheels) to detect collisions and to determine hit angle. You have very nice 3D models, let's give them another use and get armor angle determination even ahead of what is used in CM (generalised angles). Realistic ricoshets and penetration of round for complicated surfaces of turrets and mantles, turret ring hits ect. would be benefits, maybe even shot traps with little coding.

Also I'm not sure if armor rating is shared for hull and turret ? Or are there turret armor ratings stored somewhere ?

Second question would be your function for ricochets. I didn't found it yet, I'm only starting to learn about how is RO coded. I may point you to some formulas for determining ricoshet probability and critical angle because currently the ricochet angle is one of the greatest weakneses of the tank vs tank game. I read you are making new armor calculations, I hope it will be realised in different way. Most simple would be to just calculate penetration accounting for angle effect and all shots that don't penetrate are ricochets. Pure ricochets at angles >55-65deg could be calculated too, but the function to give good effects would have to account for T/D ratio and maybe shell velocity which is not so simple with (at least current) ballistic calculations...
Would be better if more arguments were passed from vehicle and shell classes to collision/penetration calculations. Not only armor rating and penetration rating + damage, but at least armor thickness and vertical angle (thickness my account for armor quality) from vehicle class, penetration and round caliber from shell class (shell type would be good too). With those data, decent penetration model, not as good as CM's but equal to SPWaW's one can be realised. To make CM's like model, the armor type, quality, hardness, ammo type and hardness (for determining shatter gaps) and some more would have to be included :) but I would be quite happy to see SPWaW-like penetration model in RO :).

The armor model could be easily made much better than CM one, because there is much less vehicles in RO they could have more detailed armor information, not only front/side/rear/ lower/upper/hull/turret, but complete modeling of all armor plates including thickness and angle. The angle would be already provided if AoI was determined by 3D model. If we have angle, then after hit you have at least determine where front turret armor ends and side turret begins for example, this has to be already resolved for hull models ? If so, one can go a step further and split armor into separate plates or areas with equal thickness and have kick-ass armor modeling. Although it's for sure more complicaded and requires more work than penetration model... I didn't looked at the code that determines hit location yet, so I'm not sure how it works and what is possible or easy and what not possible or hard without changing too much of the game.

Regards
 
Last edited:

Amizaur

FNG / Fresh Meat
Aug 18, 2006
275
3
0
44
Gdansk, Poland
After browsing the animations and static meshes in editir, I see that the collisions of tank hulls are based on simplified 3D models, right ? Now very important question, how are AoI calculated ? Are they based on real angle to the mesh surface hit, or simply on the angles from the XYZ axis ? And how the game knows when front or side was hit ? It isn't that just all hits over 45deg are assumed to be side armor hits ? If so then :-(

Now the turrets. The Tiger turret has it's collision mesh just like the hull. Any other tanks have only collision boxes, no collision meshes... Would it be easy to add them if someone did the 3D work and produced them from turret models that are in the game ?
About those collision boxes around turrets - are they true retangular boxes or rounded shapes ? The ricochets from turrets would lead to conclusion that they are rounded (and in fact not boxes, just streached or flattened spheres). Or how is the armor angle determined ?
The AoI without collision meshes can be only described as relative to XYZ axis I suppose ?

And determination of what armor (front or side) was hit, is it based on the angle ? I'll find it in collision & penetration calcs I suppose, when I find them first...

Now what it would take, to desing a collision mesh with separate side, front and rear SURFACES (plus maybe treads and wheels) ? I suppose it would have to be a collision mesh builded from different materials named front, side ect ?

Next question, is it possible to determine during the collision the AoI relative to the surface of the 3D model (mesh) that is hit ? Or only to the major axis of the object ? If I have a flat surface but angled in two axis, or a round surface and the hit is at the edge, can I determine the true AoI in the point of the impact ?

If so, then great. In most wargames and sims, the tank surfaces are described as front & side & rear * lower & upper * turret and hull plus top and bottom. Even if the turret has no upper and lower parts, it's still at least 13 surfaces with thickness and angle data. Now the tank usually is constructed with only few kinds of armor plate, different in thickness. Usually much less than 13.

It would be actually easier to construct a collision mesh using materials based on armor plate thickness, this would give 5-10 materials to build the whole tank, and actually doesn't matter if they are on the front, side, rear or top of the tank. The only thing that is important is the thicknes and angle. Thickness is based on material, the angle is calculated during the collision for the armor part that is hit.

Now I'd like somebody to tell me if it is possible to read the actual AoI at the point of impact between the mesh part and projectile trajectory ? For a flat or complicated surface ? If I make a collision mesh at a shape of a sphere and hit it near the edge, would I be able to read the true AoI from the collision event ?

And second question, can I give custom parameters to the materials used in collsion mesh construction, that would be later passed to collision calculations ? If not, I can at least name it and later read the armor thicknes from a table (of material names and properites) in my own collision/penetration calcs, right ?


Regards

P.S. Where to look for the function/class/whatever of projectile collision, that has ricochet and penetration calculations in it ?

edit: is it ROTreadVehicle in ShouldPenetrate ?

edit: yeah, found it. The table within GetPenetrationProbability seems to have nothing to do with penetration probability, as it's called in calculations of penetration value and decreases tabular penetration value with angle, so effectively controls ricochets. It has nothing to do with any known angled armor resistance function and in fact looks like probabilistic data... I though initially than it controls penetration probability (as named) and gun penetration has to be 12 points greater than armor resistance to have 100% penetration chance... but seems not be the case.
Wrong used ? Why a probabilistic-looking set of data named "probability" is used to calculate projectile penetration at angle ??? Well for the current purpose this table is wrong and this is where the overmodelled ricochets are born.

Or tell me I misunderstood something... Because the process doesn't look quite like described by Wilsonam in post #3.

Let's assume that it REALLY IS ricochet probability calculation based on armor rating and angle... even if so, the function doesn't look like true ricochet probability at all... it's even closer to penetration calcs than ricochet calcs... and there isn't even any probability in it , in same conditions the result will be always the same - either penetrates or deflects.

So would "true" penetration calcs be repeated/done in damage section ? I will analyse it tomorrow to check. And what would happen if the round doesn't penetrate ? Another kind of ricochet ? edit: the ArmorFactors are not used in TakeDamage function, don't see ArmorFactor word used anywhere but in vehicle classes, so don't think that there are second "true" penetration calculations done later because would be hard without knowing the base armor value... :-/

Anyway the initial ricochets are completly wrong... I'm starting to think about a small mod (mutator?), I hope when I have all the calcs in scripts corrected, someone will help me to package it... Would be a code only mod, so should be very small.
The wrong ricochet table would not be wasted, it's very good handy to calculate real probability of penetration when re**** is within few % from pen. threeshold, with random number generated to check the result...

edit: what a mess... sorry, no offensive :)
 
Last edited:

mat69

FNG / Fresh Meat
Aug 1, 2006
826
0
0
I know it is an old thread but I did not wanted to create an own for such a simple question:
Is it also possible (just interested) to have ArmorFactors like 8.5 or let's say 0.01, because all ArmorFactors are in natural numbers in your classes?
 

UncleDrax

FNG / Fresh Meat
Oct 13, 2005
1,494
60
0
Florida, USA
www.endoftheworldfor.us
I know it is an old thread but I did not wanted to create an own for such a simple question:
Is it also possible (just interested) to have ArmorFactors like 8.5 or let's say 0.01, because all ArmorFactors are in natural numbers in your classes?

Armor Factors are defined as an Integer:

Code:
// Armor values
var     int         FrontArmorFactor;
var     int         RearArmorFactor;
var     int         SideArmorFactor;

Therefore, it has to be a:
UnrealScript Reference said:
A 32-bit integer value.

Since I believe it's signed, that gives you values:

Signed: −2,147,483,648 to +2,147,483,647


Note: i haven't tried a negative armor factor.. i imagine it would either pitch a fit, or more likely?, just let everything penetrate.
 

Alan123

FNG / Fresh Meat
Jan 4, 2011
46
5
0
steamcommunity.com
Hello,

On this subject I wanted to ask a few questions:

Below is data taken out of RO uc data for armor factors and also penetration tables info. It is only for illustration purposes, in brackets () I have written what I think these things correspond to in real terms, please let me know if I am right or at least on the right track

FrontArmorFactor=14 (140mm or armour equivalent at 90degrees)
RearArmorFactor=10
SideArmorFactor=5
HealthMax=1000.000000 (a measure of the robustness of the vehicle, it could be hit about 4 times optimally with the canon listed below and each time lose 212 point of health until it exploded)
Health=1000

PenetrationTable(0)=12 (at 0m penetrates 120mm of armour or Armorfactor 12)
PenetrationTable(1)=12
PenetrationTable(2)=12
PenetrationTable(3)=12
PenetrationTable(4)=12
PenetrationTable(5)=11 (at 500m penetrates 110mm of armour or Armorfactor 11)
PenetrationTable(6)=11
PenetrationTable(7)=10(at 700m penetrates 100mm of armour or Armorfactor 10)
PenetrationTable(6)=11
PenetrationTable(8)=10
PenetrationTable(9)=10
PenetrationTable(10)=10 (Penetrations over 1000m are treated as being at armorfactor 10)
ImpactDamage=212 (hit damage upon penetration which is then modified for angle, hit zone and so on)
BallisticCoefficient=1.650000 (the curve at which the shot flies)
SpeedFudgeScale=0.500000 (speed modifier)
Speed=47676.000000 (speed of the shell)
MaxSpeed=47676.000000 (speed of the shell at its fastest point on its flight and which becomes less with distance traveled on its curve)

Sure hope you can help as I am building new tanks in 3ds max and photoshop etc and want to be able to code them in correctly.

Thanks


Alan.