Page MenuHomeFeedback Tracker

Damage material swap function ignores materials applied with hiddenSelections
Feedback, NormalPublic

Description

When damage class configured to swap materials ARMA3 engine only acknowleges materials that were applied in the p3d.
If material was swapped using hiddenSelections it is ignored when damage is applied and game swaps original material, causing whole model to look completely different compared to the "healthy" version.

Example video of this behavior:

It can be reprodued with any custom vehicle, not unique to this setup.
It's also relevant to player uniforms too, which don't show damage textures if their materials are changed using hiddenSelectionsMaterials.
Model was spawned using hiddenSelection material (xxx_camo.rvmat) to replace shiny default material (xxx.rvmat) assigned in the p3d.
When damage was applied game ignored xxx_camo.rvmat and swapped xxx.rvmat instead, despite xxx_camo.rvmat entry in the Damage class.

Details

Severity
Minor
Resolution
Open
Reproducibility
Always
Operating System
Windows 11 x64
Operating System Version
22H2
Category
Visual-Vehicles
Steps To Reproduce
  • Configure a vehicle to use hiddenSelections materials for different variants;
  • Add entries for all those materials in class Damage;
  • Spawn a vehicle variant that has material swapped with hiddenSelections;
  • Apply 0.5+ damage to the vehicle;
  • Observe how xxx_damage material is based on original material from p3d.
Additional Information

In this example materials in class Damage were set up similar to this, where vn_air_mig19_01.rvmat is the default shiny material and vn_air_mig19_01_camo.rvmat is a less shiny version that spawns in the game for that vehicle class.

"vn\air_f_vietnam_02\mig19\data\vn_air_mig19_01.rvmat",
"vn\air_f_vietnam_02\mig19\data\vn_air_mig19_01_damage.rvmat",
"vn\air_f_vietnam_02\mig19\data\vn_air_mig19_01_destruct.rvmat",

"vn\air_f_vietnam_02\mig19\data\vn_air_mig19_01_camo.rvmat",
"vn\air_f_vietnam_02\mig19\data\vn_air_mig19_01_camo_damage.rvmat",
"vn\air_f_vietnam_02\mig19\data\vn_air_mig19_01_destruct.rvmat",

Event Timeline

Slowpokevg updated the task description. (Show Details)Jun 27 2023, 11:16 PM
dedmen set Ref Ticket to AIII-55739.Jun 28 2023, 3:44 PM
Lexx2k added a subscriber: Lexx2k.Jul 3 2023, 3:54 PM
dedmen added a subscriber: dedmen.Jul 6 2023, 5:38 PM

Fixed next dev-branch and profiling branch.
This fix applies to materials AND textures.

I anyone wants to spend the time, maybe find duplicate tickets for this (I'm sure they exist) and see if this also fixed wound material issues for Soldier types?

This does NOT work for glass materials on plane/helicopter. They will still ignore hiddenSelection changes. In this case and the other repro I had it didn't matter. I don't really want to fix the glass case.

dedmen changed the task status from New to Feedback.Jul 6 2023, 6:26 PM

Retested this setup with 2.14 and 2.15 and issue still persists - only rvmat that was set up in p3d is affected by damage and all hiddenSelection materials are ignored.

I didn't have VN to test with, but I could reproduce same issue in Spearhead, tested it there and fixed it there.

I have VN now and tried to retest. None of the MIG planes show any damage effects. The inside material of the cockpit gets damaged a bit. But the outside is still pristine even on 0.9 damage.

I checked the config and currently the class Damage on Mig 19 S is configured as

"vn\air_f_vietnam_02\mig19\data\vn_air_mig19_03.rvmat"
,"vn\air_f_vietnam_02\mig19\data\vn_air_mig19_03_damage.rvmat"
,"vn\air_f_vietnam_02\mig19\data\vn_air_mig19_03_destruct.rvmat"
,"vn\air_f_vietnam_02\mig19\data\vn_air_mig19_04.rvmat"
,"vn\air_f_vietnam_02\mig19\data\vn_air_mig19_04_damage.rvmat"
,"vn\air_f_vietnam_02\mig19\data\vn_air_mig19_04_destruct.rvmat"
,"vn\air_f_vietnam_02\mig19\data\vn_air_mig19_05.rvmat"
,"vn\air_f_vietnam_02\mig19\data\vn_air_mig19_05_damage.rvmat"
,"vn\air_f_vietnam_02\mig19\data\vn_air_mig19_05_destruct.rvmat"

If the 01 material is not defined in there, it might not work correctly.
All materials that can be applied later, should be listed there.. I think.