This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
arma:modeling:damage_tut [2008-06-23 14:18] 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\\ | ||
Line 42: | Line 42: | ||
* 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 118: | 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 125: | 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 137: | 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 162: | 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 191: | 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 199: | 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 | ||