Jump to content

Damage modeling in CA.


vicx

Recommended Posts

Earlier this week I was looking at collision models for CA units.

 

It turns out most CA units have a basic collision model which has a chassis, turret and gun component. I was interested. Did this mean that guns and turrets could be disabled independently of the chassis or at the very least we could script a little more visual variety in the way that things smoke and burn when damaged.

 

Maybe.

 

It actually turns out this already in the game for ground units.

 

Fire and smoke effects can be localized and scaled to match the damage taken by collision models for Naval ships. Naval ships are considered a type of ground unit in DCS.

 

The Perry collision model has regions for front and rear tower, three turrets, the comm tower and portions of the hull.

3anpQBR.jpg

 

How the damage is to regions is calculated and displayed as fire and smoke is configured in the units lua file.

 

Snipped from DCS World\Scripts\Database\navy\blue\oliver_hazard_perry.lua
-- Oliver Perry FFG-7CL (OLIVER HAZARD PERRY Class Frigate) FFG-7 - FF-61
...
GT.DM = {
{ area_name = "TPK", area_arg = 109, area_life = 26, area_fire = { pos = {38.53, 7.49,0.0}, size = 1.0}},
}

 

This is the SAM turret "TPK" taking critical damage.

m4welre.jpg

 

OK Ships have this cool feature; what about Tanks.

 

This is the collision model for the M1. It has the most detailed collision model for all ground units which are not ships ... BUT ... it does not work like the ships.

 

DXVfhtV.jpg

 

I couldn't get it working. Perhaps someone else can try and make DM work with the M1.

 

GT.DM = {
{ area_name = "gun", area_arg = 25, area_life= 1, area_fire = { pos = {-0.11,2.73,0.49}, size = 0.3}},
}

You might find the other attributes and types required to make it work. I will try and make it work as a type ship next. I think this will prove to be the requirement.


Edited by vicx
terminology
Link to comment
Share on other sites

NW, I think Area Life is the HP for a component, at least for ships.

 

I didn't get this component damage system working with the M1 but I might have made a silly mistake somewhere OR it isn't possible because this component DM is only supported in wsType_Ship OR I didn't find the workaround.

 

For wsType_Ground,wsType_Tank (which is most ground things |tank or not|) there are some attributes defined in DCS World\Scripts\Database\scripts\GT_t.lua for an armor_scheme

 

But this gives me an idea to try. I did comment out the armour scheme but I will change the vehicle type to something other than a tank or an IFV next time.

 

The armour scheme looks like it might entirely replace the collision model and use a basic hitbox and approximate armor by dividing the box into aspects and angles.

 

The aspects are hull_elevation, hull_azimuth, turret_elevation, and turret_azimuth. The angles equate to front, sides and back | front, top, back. It probably does a decent job but it might replace the component damage model.

 

Most of the ground vehicles have a simpler collision model like the Shilka which has chassis, turret and gun.

 

KoBAKEF.jpg

Link to comment
Share on other sites

This is the collision model for the M1. It has the most detailed collision model for all ground units which are not ships ... BUT ... it does not work like the ships.

 

pretty sure the damage model is not ready yet (in the edm file) for that collision model

i guess DCS:Abrams will get a new edm model as well

sign-pic4.jpg

Link to comment
Share on other sites

Well actually the M1 collision model IS ready to use.

 

When I say "collision model" I mean the geometry (hitbox or mesh) . For the M1 this is m-1-collision.edm. In this video (sorry no sound) I used the M-1.edm and m-1-collision.edm in a SHIP definition (which is why the tank floats up and down).

 

 

I defined damage areas in a GT.DM attribute as explained in the OP. You can see that I mapped BODY_FRONT collision region to the model animation argument that rotates the turret. When I shoot the front it rotates the turret. Once the hitpoints for the DM area are depleted a fire and smoke effect is spawned. It works but this implementation doesn't offer as much as it could.

 

I am curious as to how the damage model will be implemented into CA vehicles in the future. Will it be implemented like aircraft or like ships or will there be a new system for DCS 2.0.

Link to comment
Share on other sites

  • 9 months later...

Your new (M1 collision) Where can I download this file?

Visually, it looks very good.:)

Не говорите что мне надо делать и я не скажу куда вам надо идти…

| Asus Z390 | Core i5 9600K | HyperX Fury 32Gb | RTX 2070 | 1TB HDD + Intel Optane memory 32Gb | Thrustmaster F-16C Viper Add-on Grip+TWCS Throttle | Dell WMR | Oculus Quest 2 |

Link to comment
Share on other sites

  • 4 weeks later...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...