arma:modeling:damage_model
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
arma:modeling:damage_model [2008/04/30 15:33] – fixed broken link snakeman | arma:modeling:damage_model [2024/08/01 09:17] (current) – links added. snakeman | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Vehicle Damage Model ====== | + | ====== |
- | With **DamageHide** you can hide parts of the model when the it is destroyed. Just what I did with the BMD-1 2.0 addon. The only addon in which the texture swapping is currently working is BTR80 and the model can be opened with O2. | + | [[https:// |
- | Armored_Sheep (BIS dev): New ArmA Damage visualisation by animating materials on surface is defined in config.cpp | + | **ArmA 1** aka Armed Assault |
- | Hiding animation bind to damage | + | **Törni**: With **damageHide** selection (not a LOD) you can hide parts of the model when the it is destroyed. Just what I did with the BMD-1 2.0 addon. The only addon in which the texture swapping is currently working is BTR80 and the model can be opened with O2. |
+ | |||
+ | **Armored_Sheep** (bis dev): New ArmA Damage visualization by animating materials on surface is defined in config.cpp (class damage). Model must contain at least selection " | ||
+ | |||
+ | " | ||
+ | |||
+ | Hiding animation bind to damage | ||
+ | |||
+ | As you can see in config each turret has its own hitzone definition (class HitTurret, class HitGun) so if you have different named selections for each turret. | ||
+ | |||
+ | **passThrough = 1** means that the hitzone is vital to the complete model, so if this " | ||
+ | |||
+ | **Armored_Sheep**: | ||
+ | 1) Selection on your model that contains faces with animated material (switch one rvmat to another)\\ | ||
+ | 2) Damage materials\\ | ||
+ | 3) Section defined in model.cfg for the animated selection\\ | ||
+ | 4) Hitzone definition in config.cpp in class HitPoint* where the selection is written\\ | ||
+ | 5) Class damage in config.cpp where switching materials are defined\\ | ||
+ | 6) Model and all its sources must be binarised (packed) in PBO | ||
+ | |||
+ | **Linker_Split**: | ||
+ | |||
+ | Example: | ||
+ | Your model got a texture named: front_door_co.paa. | ||
+ | |||
+ | Then the Rvmat you define in the config must also point to this texture, otherwise the engine will not recognize the texture and will not replace it with the destruct one. | ||
+ | |||
+ | Also it appears that you cannot damageHide a already animated selection, good examples are helicopter rotors made the old OFP way (the new ArmA proxy way apparently works?). So be careful and test your damageHide selection by selection before overhauling your whole model. | ||
+ | |||
+ | ====== Selection names ====== | ||
+ | |||
+ | **Obmar** posted this about selection names:\\ | ||
+ | To get the Damage textures to animate you have to have a specific entry in the model' | ||
+ | |||
+ | ^ Selection Name ^ Vehicle type ^ | ||
+ | | trup | Helicopter | | ||
+ | | telo | Tracked vehicle | | ||
+ | | karoserie | Wheeled vehicle | | ||
+ | | zbytek | Aircraft | | ||
+ | |||
+ | Once the actual model has the named selection in all the Resolution LODs the damage texture animations will work. | ||
+ | |||
+ | //Please note that for aircraft' | ||
+ | |||
+ | ====== bis Example ====== | ||
+ | |||
+ | Here is example damage config from bis A10 aircraft. | ||
+ | <code cpp> | ||
+ | dammageHalf[] = | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | }; | ||
+ | dammageFull[] = | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | }; | ||
+ | |||
+ | class Damage | ||
+ | { | ||
+ | tex[] = {}; | ||
+ | mat[] = | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }; | ||
+ | }; | ||
+ | </ | ||
+ | The model itself contains **damageHide** selection in 1-6 Res LODs and others containing the weapon and pilot proxys only. Last 7.0 LOD don't have damageHide. | ||
+ | |||
+ | The **zbytek** selection is present on all LODs. It contains everything except weapons, wheels and canopy glass. | ||
+ | |||
+ | In the AH6 and AH1 helicopter models are no zbytek selection... in the AV8B there is zbytek again. | ||
+ | |||
+ | ====== [APS]Gnat Example ====== | ||
+ | |||
+ | [APS]Gnat example: | ||
+ | |||
+ | **Warrior0_destruct.rvmat** file: | ||
+ | <code cpp> | ||
+ | ambient[]={1.0, | ||
+ | diffuse[]={1.0, | ||
+ | forcedDiffuse[]={0.0, | ||
+ | emmisive[]={0.0, | ||
+ | specular[]={1.0, | ||
+ | specularPower=40.0; | ||
+ | PixelShaderID=" | ||
+ | VertexShaderID=" | ||
+ | class Stage1 | ||
+ | { | ||
+ | texture = " | ||
+ | uvSource = " | ||
+ | class uvTransform | ||
+ | { | ||
+ | aside[]={1.0, | ||
+ | up[]={0.0, | ||
+ | dir[]={0.0, | ||
+ | pos[]={0.0, | ||
+ | }; | ||
+ | }; | ||
+ | class Stage2 | ||
+ | { | ||
+ | texture = " | ||
+ | uvSource = " | ||
+ | class uvTransform | ||
+ | { | ||
+ | aside[]={1.0, | ||
+ | up[]={0.0, | ||
+ | dir[]={0.2, | ||
+ | pos[]={0.2, | ||
+ | }; | ||
+ | }; | ||
+ | class Stage3 | ||
+ | { | ||
+ | texture = "# | ||
+ | uvSource = " | ||
+ | class uvTransform | ||
+ | { | ||
+ | aside[]={1.0, | ||
+ | up[]={0.0, | ||
+ | dir[]={0.0, | ||
+ | pos[]={0.0, | ||
+ | }; | ||
+ | }; | ||
+ | class Stage4 | ||
+ | { | ||
+ | texture = " | ||
+ | uvSource = " | ||
+ | class uvTransform | ||
+ | { | ||
+ | aside[]={1.0, | ||
+ | up[]={0.0, | ||
+ | dir[]={0.0, | ||
+ | pos[]={0.0, | ||
+ | }; | ||
+ | }; | ||
+ | </ | ||
+ | And the main Config now has; | ||
+ | <code cpp> | ||
+ | class cfgModels | ||
+ | { | ||
+ | class Plane; | ||
+ | class PWII: Plane | ||
+ | { | ||
+ | skeletonName = " | ||
+ | sectionsInherit=""; | ||
+ | sections[]= | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }; | ||
+ | ......... | ||
+ | ......... | ||
+ | class CfgVehicles | ||
+ | { | ||
+ | class All {}; | ||
+ | class AllVehicles: | ||
+ | class Air: AllVehicles {}; | ||
+ | class Plane: Air | ||
+ | { | ||
+ | class NewTurret; | ||
+ | class AnimationSources; | ||
+ | }; | ||
+ | class GNT_PiperWII: | ||
+ | { | ||
+ | .......... | ||
+ | .......... | ||
+ | class Damage | ||
+ | { | ||
+ | tex[] = {}; | ||
+ | mat[] = | ||
+ | { " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }; | ||
+ | }; | ||
+ | </ | ||
+ | And for each Resolution LOD of the model I did a Select-All and named the selection " | ||
+ | |||
+ | The P3D file in O2 needs to have this bit added for each texture used. The Face Properties need the Materials definition to point to the rvmat file | ||
+ | |||
+ | {{ https:// | ||
+ | |||
+ | And to clarify, all these files are needed (until experimentation proves otherwise) to enable damage textures. | ||
+ | |||
+ | {{ https:// | ||
+ | |||
+ | Best of luck :) | ||
+ | |||
+ | |||
+ | ====== damageHide Additions ====== | ||
+ | |||
+ | This effect usually pops up, when a selection is only partial included in the " | ||
+ | |||
+ | Also some issues may pop up, when other " | ||
+ | |||
+ | There are few things you need to know. | ||
+ | |||
+ | * The damageHide animation will move the selection to the center of the model. Make sure that they are not connected to other parts which will remain after destruction, | ||
+ | * If you want to make a selection animated and hidden after destruction, | ||
+ | |||
+ | I suggest making 2 levels of landContact, | ||
- | [[model_config|Model_Config]] |
arma/modeling/damage_model.1209569608.txt.gz · Last modified: 2008/04/30 15:33 by snakeman