Jump to content

Recommended Posts

While fixing and upgrading my Mig-21MF addon I decided to experiment with damage system, based on two, provided below, links:

 

https://forums.bistudio.com/topic/92016-arma-2-track-and-tire-dammages/

 

https://resources.bisimulations.com/wiki/Damage_Modeling:_Objects#General_properties

 

I found that using "hitPoints" BIS system you may get visual effects on aircraft, quite similar to the one used in IL-2 Sturmovik.

 

damage_ar196a3_d2.jpg

 

How it'd work, in general?

 

An aircraft gets AAA or small arms fire while flying. The game engine calculates whether weapon that was used against it is strong enough to destroy specific part of the aircraft that had being hit. Let's assume that it is.

The part of the aircraft hides and then "damaged" version of the part unhides, in the same way like it happens in case of destroyed wheels. The only difference is that the unhidden part has different texture applied with visible bullet holes (alpha channel).

Obviously, it might be destroyed further as well, even the animation of hide/unhide can be applied for smaller parts of damage value. For instance, when you shot at car window, the first level of damage would be a several bullet holes visible (only damage texture applied to mesh), the second level would be a many bullet holes (a new damage texture), the third - the window is broken (so mesh changes as well), the fourth - window dissapeared or detached from the vehicle (it need however additional input to the model.cfg and config.cpp to create vehicle-like "window").

 

The whole system can be used for a soldier model (leg amputation, fragmentation of skull) and any vehicle class entity as well. It depends mainly on desired outcome and how large the model is, in terms of poly-count, since you have to copy and paste some parts of the mesh to the same model. Sometimes even you have to copy the part again and revers its faces as well as add some additional elements to get immersion of a depth of the bullet holes (like on elevator picture below, where two wing frames/ribs have been added to the "damaged" part mesh).

 

-bdR0DlUjg5h9IqSTeXPXIy7_1MIBjNQGJzUQJgp

 

qDTsiOt1sj11oMRNjXVf-_-B43z0UKHdNhuR0uKR

 

This system has a big advantage over any custom script-based one though - the damage can be repaired by both vanila and ACE repair vehicles (tested), with no script behind eating your additional CPU cycles.

 

NightIntruder

Share this post


Link to post
Share on other sites

You are not the first to think of it. The reason i think why it's barely used is 1) because it's very time consuming  and equally important 2) the gameplay damagemodel has only 3 states "alive", "burn and die shortly after", "dead". So any modelling on that part is visual only - which is more often then not overlooked, so it's questionable if it's worth the efford to do it in the first place. In IL2 and other flight sims there a damaged wing has impact on the flight behaviour. So in case something is strange, you look around for damage and see:  aha my left wing is missing... In arma 3 the modder has to choose the option between keeping the player flying with 1 wing gone, or have him explode instead.

That's why i created this ticket. This would at least allow some rudamentary damage modelling

Alpha textures can be troublesome  when flying over water/ seeing water surfaces as backdrop,  so you might wanna check a prototype part in the game first before going that route for the entire model.

Share this post


Link to post
Share on other sites

This is precisely what I intend to add to my EF-2000.

 

I am having difficulty with the hitpoints system for fixed wing aircraft.  I am making the "Christmas tree lights" on the warning panel animate on/off based on the hitpoint.  So it works for the basic hitpoints in the Hitpoints LOD.  Something gets damaged, the appropriate warning light will illuminate (unhide animation).  I would like to have a bit more control over it, but it is pretty limited.  It seems however that the fuel doesn't start to slowly drain away if the fuel is hit, like it does for helicopters.  I might be missing part of the configuration settings however.

 

 

Another thing, you can also "drop" parts of the plane that are broken off.  Use of a getHit EH script which gets the appropriate part, and if the part in question is hit, the drop command can spawn a "part" that falls off of the plane, while simultaneously working with this hitpoint damage feature.  So basically you can shoot off the wings :)

Share this post


Link to post
Share on other sites

 

I might be missing part of the configuration settings however.

the damage modelling across different vehicle classes is extremely inconsistent and all hardcoded apparently. If you damage hitfuel on a car enough it automatically blows up. On tanks on the other hand hitfuel has no impact whatsoever.

Aircraft have the least detailed "damage model"  (namely: alive or dead), nothing regarding Fuel or anything else, so you would have to script every bit yourself. In case of fuel it isnt that difficult to achieve luckily.

 

I also played with the idea to make all my damage indicator lights work properly but imo its too much of a hazzle for little effect right now, since you have to script all the damageeffects, and apart from workarounds like removing fuel you can do nothing to affect the flightmodel in a smooth way. This ticket would help to alleviate that (and more).

Share this post


Link to post
Share on other sites

I remember when i was making spaceships for some awfully old space shooter, there was a poly cap on the model that the game alowed to load. we circumvented that poly cap by dividing the ship to separate parts load the parts in game as separate ships, and connecting them together ingame. (something like "attachTo" command in arma). 

 

Might similar approach help with making the plane in arma with destroyable parts?

Share this post


Link to post
Share on other sites

I stand corrected... I'm doing the indicator lights via the "dammaged" EH:

 

class EventHandlers: DefaultEventHandlers {

   dammaged = "_this execVM '\pook_MIG25\scripts\damage.sqf'";

};

 

Currently implemented on my MIG25 that is pending release in a week or two.  Pics here:

 

https://onedrive.live.com/?id=5B54FC51A7917265%2120269&cid=5B54FC51A7917265&group=0

 

 

 

Attachto would also work, as you would use the "detach" command instead of "drop" in the dammage EH script.  Should work, but the weapon proxies would be a challenge for the wing pieces.  Either way.

 

 

 

So here's a question - in that pic of the German plane, it looks to me like the frame is visible through the "shot out" pieces... is that part of the model?  Would likely be best to be a proxy-based "detail" since it would bump up poly count.

Share this post


Link to post
Share on other sites

So here's a question - in that pic of the German plane, it looks to me like the frame is visible through the "shot out" pieces... is that part of the model?  Would likely be best to be a proxy-based "detail" since it would bump up poly count.

 

To me, it's just several crossed simple polygons with alpha textures inside the fuselage and wings. Several dozens of them gives app. 0.5K poly which is nothing. I did my system based on hidden parts not proxies, however you may try with exchanging polygons only instead of whole parts. But, well ... yes, it might hit the poly count if one goes into exaggerated system ie. having three separate models of damage with additional frames being visible through shooting holes.

Of course, it will never be the same like in IL2 as x3kj said. In my case, it's just a concept proof that I can have visual clues for a pilot/players regarding an aircraft status and for entertainment. For example, landing without left landing gear was quite interesting experience :)

By the way, nice Foxbat you've got there mate! :)

Here's a short footage from one of the tests:

 

https://www.youtube.com/watch?v=mrHcHzl9fs4

Share this post


Link to post
Share on other sites

I use this system in my sailing ships --  you can shoot holes in the sails for example, or shoot away part of the railing of the ship.  In the first post in this thread you say it is possible to limit what weapons can do that kind of damage.  Currently a musket can shoot a big hole in a sail; I'd like to limit that type of damage to cannonfire.  Is that possible?  I couldn't find anything in the above links (but I may have missed it.)

Share this post


Link to post
Share on other sites

You can tinker with damageResistance based on calculations provided in the link below although ammo's config values have to be known. Note that damageResistance is a value applied to whole addon, not its separate objects, however you may create big addon (like ship for instance) that is composed of several parts that have its own config values, ie. different damageResistance for different ship parts.

 

Also you may try simply with HitPoint classes where armor coefficient decides whether musket can damage railing at all. All needed calculations are provided in the link below. Good luck! 

 

 https://resources.bisimulations.com/wiki/Damage_Modeling:_Objects#General_properties

  • Like 1

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

×