User Tools

Site Tools


arma:modeling:damage_tut

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
arma:modeling:damage_tut [2008-06-23 14:17]
gnat
arma:modeling:damage_tut [2008-12-10 17:20] (current)
snakeman fixed typos and c++ formatting.
Line 14: Line 14:
 What I won't address (until further knowledge);​\\ What I won't address (until further knowledge);​\\
   * Level 2 or intermediate damage textures\\   * Level 2 or intermediate damage textures\\
-  * Window ​armour+  * Window ​armor
  
 Scope\\ Scope\\
   * Most if not all ArmA vehicles\\   * Most if not all ArmA vehicles\\
   * You can edit the P3D file (and have O2 installed)\\   * You can edit the P3D file (and have O2 installed)\\
 +
  
  
 ====== Damage Textures ====== ====== Damage Textures ======
  
-**Step 1 - Face selection**\\+__**Step 1 - Face selection**__\\
   * In all your Resolution and XXXX View LODs ensure the WHOLE vehicle is highlighted (ALT-A) in O2 and the whole vehicle is named "​zbytek"​\\   * In all your Resolution and XXXX View LODs ensure the WHOLE vehicle is highlighted (ALT-A) in O2 and the whole vehicle is named "​zbytek"​\\
   * If at any time you add to the model, ensure you Redefine "​zbytek"​ to be the whole model again.   * If at any time you add to the model, ensure you Redefine "​zbytek"​ to be the whole model again.
  
-Step 2 - Material definitions\\+__**Step 2 - Material definitions**__\\
   * In every Resolution and XXXX View LOD ensure every texture you plan to make damaged has a MATERIAL definition\\   * In every Resolution and XXXX View LOD ensure every texture you plan to make damaged has a MATERIAL definition\\
   * This also typically means each texture will also have a "​_NOHQ.paa"​ and a "​_SMDI.paa"​ version of the textures.   * This also typically means each texture will also have a "​_NOHQ.paa"​ and a "​_SMDI.paa"​ version of the textures.
Line 38: Line 39:
   * If the texture does not have this, you probably have no choice except to create a Material definition.   * If the texture does not have this, you probably have no choice except to create a Material definition.
  
-Step 3 - Destruct RVMATs\\+__**Step 3 - Destruct RVMATs**__\\
   * Once all textures have been checked / fixed you don't need to re-enter O2\\   * Once all textures have been checked / fixed you don't need to re-enter O2\\
   * For each texture with a Materials definition you need to know 2 things\\   * For each texture with a Materials definition you need to know 2 things\\
-  * (a) the filename ​and location of the NOHQ file\\+  * (a) the file name and location of the NOHQ file\\
   * (b) the dimensions of the texture (eg 1024x512 or 256x256 etc)\\   * (b) the dimensions of the texture (eg 1024x512 or 256x256 etc)\\
   * Now create a FILENAME_destruct.rvmat for each texture using a copy of below;   * Now create a FILENAME_destruct.rvmat for each texture using a copy of below;
 <​code>​ <​code>​
-ambient[]={1.0,1.0,1.0,1.0}; +ambient[] = {1,​1,​1,​1};​ 
-diffuse[]={1.0,1.0,1.0,1.0}; +diffuse[] = {1,​1,​1,​1};​ 
-forcedDiffuse[]={0.0,0.0,0.0,0.0}; +forcedDiffuse[] = {0,​0,​0,​0};​ 
-emmisive[]={0.0,0.0,0.0,1.0}; +emmisive[] = {0,​0,​0,​1};​ 
-specular[]={1.0,1.0,1.0,0.0}; +specular[] = {1,​1,​1,​0};​ 
-specularPower=40.0+specularPower = 40; 
-PixelShaderID="​NormalMapMacroASSpecularDIMap";​ +PixelShaderID = "​NormalMapMacroASSpecularDIMap";​ 
-VertexShaderID="​NormalMapAS";​+VertexShaderID = "​NormalMapAS";​
 class Stage1 class Stage1
 { {
-texture="​SIG_general\effects\bottom_nohq.pac";​ + texture = "​SIG_general\effects\bottom_nohq.pac";​ 
-uvSource="​tex";​ + uvSource = "​tex";​ 
-class uvTransform + class uvTransform 
-+
-aside[]={1.0,0.0,0.0}; + aside[] = {1,0,0}; 
-up[]={0.0,1.0,0.0}; + up[] = {0,1,0}; 
-dir[]={0.0,0.0,0.0}; + dir[] = {0,0,0}; 
-pos[]={0.0,0.0,0.0}; + pos[] = {0,0,0}; 
-};+ };
 }; };
 class Stage2 class Stage2
 { {
-texture="​ca\data\destruct\vehicle_destr256_256_mc.paa";​ + texture = "​ca\data\destruct\vehicle_destr256_256_mc.paa";​ 
-uvSource="​tex";​ + uvSource = "​tex";​ 
-class uvTransform + class uvTransform 
-+
-aside[]={1.0,0.0,0.0}; + aside[] = {1,0,0}; 
-up[]={0.0,1.0,0.0}; + up[] = {0,1,0}; 
-dir[]={0.2,0.0,0.0}; + dir[] = {0.2,​0,​0};​ 
-pos[]={0.2,0.0,0.0}; + pos[] = {0.2,​0,​0};​ 
-};+ };
 }; };
 class Stage3 class Stage3
 { {
-texture="#​(argb,​8,​8,​3)color(1,​1,​1,​1)";​ + texture = "#​(argb,​8,​8,​3)color(1,​1,​1,​1)";​ 
-uvSource="​tex";​ + uvSource = "​tex";​ 
-class uvTransform + class uvTransform 
-+
-aside[]={1.0,0.0,0.0}; + aside[] = {1,0,0}; 
-up[]={0.0,1.0,0.0}; + up[] = {0,1,0}; 
-dir[]={0.0,0.0,0.0}; + dir[] = {0,0,0}; 
-pos[]={0.0,0.0,0.0}; + pos[] = {0,0,0}; 
-};+ };
 }; };
 class Stage4 class Stage4
 { {
-texture="​ca\data\destruct\vehicle_destr256_256_smdi.paa";​ + texture = "​ca\data\destruct\vehicle_destr256_256_smdi.paa";​ 
-uvSource="​tex";​ + uvSource = "​tex";​ 
-class uvTransform + class uvTransform 
-+
-aside[]={1.0,0.0,0.0}; + aside[] = {1,0,0}; 
-up[]={0.0,1.0,0.0}; + up[] = {0,1,0}; 
-dir[]={0.0,0.0,0.0}; + dir[] = {0,0,0}; 
-pos[]={0.0,0.0,0.0}; + pos[] = {0,0,0}; 
-};+ };
 }; };
 </​code>​ </​code>​
Line 117: Line 118:
 {{ http://​members.iinet.net.au/​~nrspence/​ArmA/​DamageTut/​DT_2.jpg }} {{ http://​members.iinet.net.au/​~nrspence/​ArmA/​DamageTut/​DT_2.jpg }}
  
-====== ​Step 4 - CONFIG.CPP ​======+ 
 +__**Step 4 - CONFIG.CPP**__\\
  
   * Not proven but likely in each CfgSkeletons you will need to inherit a BIS class, in this example "​Car"​   * Not proven but likely in each CfgSkeletons you will need to inherit a BIS class, in this example "​Car"​
Line 124: Line 126:
 class CfgSkeletons class CfgSkeletons
 { {
-  ​class car; + class car; 
-  class MyAddonSkeleton:​ car + class MyAddonSkeleton:​ car 
-  +
-isDiscrete=1;​ + isDiscrete = 1; 
-skeletonInherit = ""; ​+ skeletonInherit = ""; ​
 </​code>​ </​code>​
  
Line 136: Line 138:
 class CfgModels class CfgModels
 { {
-class default{};​ + class default{};​ 
-class Vehicle: Default + class Vehicle: Default 
-+
-sectionsInherit="";​ + sectionsInherit = "";​ 
-sections[] = {xxxx, xxxxx, xxxxxx, xxxxxx}; + sections[] = {xxxx, xxxxx, xxxxxx, xxxxxx}; 
-}; + }; 
- + class Car: Vehicle 
-class Car: Vehicle +
-+ sectionsInherit = "​Vehicle";​ 
-sectionsInherit="​Vehicle";​ + sections[] = 
-sections[]= + { 
-{xxxxxx, xxxxx, xxxxx, xxxxx, xxxxxx}; + xxxxxx, xxxxx, xxxxx, xxxxx, xxxxxx 
-}; + }; 
-class MyAddonP3D: Car + }; 
-+ class MyAddonP3D: Car 
-skeletonName = "​MyAddonSkeleton";​ +
-sectionsInherit="​car";​+ skeletonName = "​MyAddonSkeleton";​ 
 + sectionsInherit = "​car";​
 </​code>​ </​code>​
  
Line 161: Line 164:
 class CfgVehicles class CfgVehicles
 { {
-class Landrover; ​// extended class + class Landrover;​ 
-class MyAddon: Landrover + class MyAddon: Landrover 
-+
-............ + ............ 
-............ + ............ 
-class Damage + class Damage 
-+
-tex[] = {}; + tex[] = {}; 
-mat[] = { + mat[] = { 
-"​SIG_general\effects\bottom.rvmat",​ + "​SIG_general\effects\bottom.rvmat",​ 
-"​SIG_general\effects\bottom.rvmat",​ + "​SIG_general\effects\bottom.rvmat",​ 
-"​SIG_general\effects\bottom_destruct.rvmat",​ + "​SIG_general\effects\bottom_destruct.rvmat",​ 
-............. + ............. 
-............ + ............ 
-............. + ............. 
-"​SIG_general\effects\LastDamageTexture.rvmat",​ + "​SIG_general\effects\LastDamageTexture.rvmat",​ 
-"​SIG_general\effects\LastDamageTexture.rvmat",​ + "​SIG_general\effects\LastDamageTexture.rvmat",​ 
-"​SIG_general\effects\LastDamageTexture_destruct.rvmat"​ + "​SIG_general\effects\LastDamageTexture_destruct.rvmat"​ 
-}; + }; 
-}; + }; 
-............ + ............ 
-............+ ............
 </​code>​ </​code>​
  
Line 190: Line 193:
   * Third definition is FULL damage\\   * Third definition is FULL damage\\
   * In the example above there is no HALF damage definition, it simply copies the NO damage definition.\\   * In the example above there is no HALF damage definition, it simply copies the NO damage definition.\\
-  * For half damage you could experiement ​with another "​half"​ RVMAT file and reference it in the second line.+  * For half damage you could experiment ​with another "​half"​ RVMAT file and reference it in the second line.
  
 With above complete for ever texture, this should now mean that you will see damage on your vehicle. With above complete for ever texture, this should now mean that you will see damage on your vehicle.
Line 198: Line 201:
  
 NEXT - Animation - PENDING being written\\ NEXT - Animation - PENDING being written\\
-  * Covers HIDING sections of the vehicle once damaged (i.e. unnessisary ​model detail)\\+  * Covers HIDING sections of the vehicle once damaged (i.e. unnecessary ​model detail)\\
   * Also covers animating things like LANDCONTACTs etc   * Also covers animating things like LANDCONTACTs etc
  
arma/modeling/damage_tut.1214230630.txt.gz · Last modified: 2008-06-23 14:17 by gnat