PDA

View Full Version : Damaged vehucles



Törni
May 17 2007, 21:24
Does anyone know how to make damaged/destroyed versions
of vehicles? Defining the "dammaged" textures for config alone does not work. Plus I want to make a separate model for the wreck.

EDIT: I can get the darkening effect working as it gets damaged, but how do I substitute a different mesh as the vehicle is destroyed?

EDITII: damageHide? Wiki is again a black hole of ignorance when it comes to this.

EDITIII: After many hours finally got it working. There are many options available to present damage. I'll be using an external script.

vilas
May 27 2007, 21:42
in ARMA models tere is probably LOD like "destroyed", but without tools, we don't know what name should be to work
if you look at data of game, you will find ,that models are very large files comparing to OFP and there is no wreck models, wreck is inside main model of vehicle - my opinion

Törni
May 28 2007, 06:21
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. I have studied it and there are several issues with the model. For example try to destroy BTR by firing it to the side. Shots will pass right through. That is because there is an err with the LODs. I have fixed that.

But how did they do BTR texture swap? Do they have tools that the rest of us do not? It might well be that I have missed something or the the old O2 might not show all needed properties.

vilas
May 28 2007, 07:23
so if i do LOD "damagehide" after dammage there will be destroyed vehicle ?
so if it works my VIBI need update

Törni
May 28 2007, 10:35
No. It is not a LOD. You can make parts of the model to be hidden after it is destroyed. But the simple texture changing (to burned textures) no luck so far http://forums.bistudio.com/oldsmileys/sad_o.gif

Mapfact choppers change the entire model to a different one via a script. But there is an error in that script. The damaged model faces 180 degress into wrong direction. They hide the model swap with all those custom smoke effects.

vilas
May 28 2007, 13:16
than all model should be hidden http://forums.bistudio.com/oldsmileys/wink_o.gif

stupid working think (engine)
if car is burnt, it sit on the ground , no tires,
so car should be lower
for exapmle explosion of fuel can destroy some part of model, so destroyed car should be for exapmle without back wheels
if i do hidden selection in editor, does old "not destroyed" car parts will be visible?
so i f my burned car will bo on naves/hubs of wheels, than what ?

for example jeep tires are thick, so my burned jeep should be 20 cm lower

and if in car like wartburg you have fuel, so explosion will send rear wheels few meters away, car will stay rotated on front wheels

trabi body is made of plastic/plywood, so burned trabi should be just some metal parts wreck ?

if it is not LOD, but just part of selection - now i know why car burned in ARMA stay on tires http://forums.bistudio.com/oldsmileys/wink_o.gif which for me is nonsense
because i havent noticed engine "lowering" burned car for tire thick/height

RN Malboeuf
May 28 2007, 15:29
EDIT: I can get the darkening effect working as it gets damaged
How you made it ? i played arounf with material but van't get it working http://forums.bistudio.com/oldsmileys/sad_o.gif

Cloughy
May 28 2007, 16:04
Would any of this be of use to killing the lights on a uaz?

Cheers

GC

RN Malboeuf
May 30 2007, 18:57
Quote[/b] ]Would any of this be of use to killing the lights on a uaz?
no. i guees you just need to setup ArmorLights http://forums.bistudio.com/oldsmileys/wink_o.gif


Quote[/b] ]EDIT: I can get the darkening effect working as it gets damaged
I'm still interested how to get it working...

vilas
Jun 4 2007, 11:57
for me - untill not tools i can only guess - would be the best if there is destruction LOD, but probably not, because sometimes dammaged textures are appering after some seconds and from far distance car looks good, and when i am near it became rusty, of course this is due to graphic performance of game, but destruction LOD would be good in future (reasons i wrote above, like tires without air or half dammaged vehicle and etc.)

Törni
Jun 4 2007, 14:20
One option is to swap the entire model to a different one using an external script. The only drawback for this is that the new model would also have to inherit turret facing etc. from the original. Plus there is this small time cap as the model is changed.

Armored_Sheep
Jul 3 2007, 13:24
New ArmA Damage visualisation by animating materials on surface is defined in config.cpp (class damage). Model must contain at least selection "zbytek" that will contain all faces that are animated. You can also use other selections bind in config.cpp in class Hit* as visual=. On top of that the selection must be defined as "section" in model.cfg.

Hiding animation bind to damage controler is also defined in model.cfg. Each animated part must be well configured in skeleton hierarchy.

http://community.bistudio.com/wiki/Model_Config

Törni
Jul 3 2007, 21:18
Thanks for the tip. Would have been almost impossible to find this out by simply trial and error. Going to give it a try tomorrow.

RN Malboeuf
Jul 3 2007, 22:33
Quote[/b] ]You can also use other selections bind in config.cpp in class Hit* as visual=
Custom hit selections are really supported ? I tried but only got  standart ones to work....

Quote[/b] ]On top of that the selection must be defined as "section" in model.cfg.
false AFAIK http://forums.bistudio.com/oldsmileys/wink_o.gif it works for me without it. At least textures darken after destuction like in OFP

Synide
Jul 4 2007, 04:31
...Model must contain at least selection "zbytek" that will contain all faces that are animated.

Is this statement accurate?

RN Malboeuf
Jul 4 2007, 08:05
Quote[/b] ]Is this statement accurate?
not exactly IMHO. sure thing you need bone for an anim. But you can name it whatever you like http://forums.bistudio.com/oldsmileys/wink_o.gif Check M60 as an example - there're working hide anims there.
@<hidden>
Can we expect models/configs examples to be released with the tools ?

[APS]Gnat
Jul 4 2007, 09:27
@<hidden>
Can we expect models/configs examples to be released with the tools ?
He said so in one of his recent responses.
Suggest you read all this thread responses, they are educational.

As I suspect Mr Sheep is an expert from the BIS team, ignoring a recommendation could mean addon compatability issues with later patches.

Synide
Jul 4 2007, 10:04
[APS]Gnat...

The reason I asked if
Quote[/b] ]...must contain at least selection "zbytek"
was accurate is many of the BIS models do not seem to have this selection defined.

Actually I just did a search and only 10 BIS models have this selection defined.

I should note they all appear to be &#39;newer&#39; models, so when Sheep refers to &#39;New ArmA damage visualization&#39; perhaps it&#39;s
something that has only been implemented in recent patches and the recently made models are utilizing this feature.

That&#39;s why I was looking for clarification... Is it a necessity or Is it not?

Oh... And, what does &#39;zbytek&#39; mean anyway?

Armored_Sheep
Jul 4 2007, 10:27
Custom hit selections are really supported ? I tried but only got  standart ones to work....
No, I did not say that. HIT zones still remain same from OFP.

"Zbytek" is czech word for "the rest" meaning remaining parts. In case HIThull - "karoserie" in czech - is used, you might not find "zbytek" it the model. All selection names are anyway defined in config.

RN Malboeuf
Jul 4 2007, 11:28
Custom hit selections are really supported ? I tried but only got  standart ones to work....
No, I did not say that. HIT zones still remain same from OFP.
OK. But we can get any amount of turrets on the model and thus any amount of selections (hit turret/gun for every turret) ?
I was always wondering what for is this coce in the calss hit* configs ?
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> passThrough = 1;[/QUOTE]

Armored_Sheep
Jul 11 2007, 13:37
As you can see in config each turret has its own hitzone definition (class HitTurret, class HitGun) so if you have diferent named selections for each turret, this might work.

passThrough=1 means that the hitzone is vital to the complete model, so if this "weakspot" is destroyed (he might be just 30% of the whole armor) the whole vehicle blows up. passThrough=0 means that destroyed hitzone does some effect (windows textures changed, wheeles not turning), but the vehicle does not blow up.

[APS]Gnat
Sep 26 2007, 11:58
Well, I&#39;m not following this damage setup;

For a start, I can&#39;t open the files like "a10_01_destruct.rvmat" to see how they work ....


Quote[/b] ] class HitLGlass {
armor = 0.1;
material = -1;
name = "sklo predni L";
visual = "sklo predni L";
passThrough = 1;
};

class HitRGlass {
armor = 0.1;
material = -1;
name = "sklo predni L";
visual = "sklo predni L";
passThrough = 1;
};
dammageHalf[] = {"&#92;ca&#92;a10&#92;data&#92;a10_glass_ca.paa", "&#92;ca&#92;a10&#92;data&#92;A10_glassBR1_CA.paa"};
dammageFull[] = {"&#92;ca&#92;a10&#92;data&#92;A10_glass_CA.paa", "&#92;ca&#92;a10&#92;data&#92;A10_glassBR1_CA.paa"};

class Damage {
tex[] = {};
mat[] = {"ca&#92;a10&#92;data&#92;A10_01.rvmat", "ca&#92;a10&#92;data&#92;A10_01.rvmat", "ca&#92;a10&#92;data&#92;A10_01_destruct.rvmat", "ca&#92;a10&#92;data&#92;A10_02.rvmat", "ca&#92;a10&#92;data&#92;A10_02.rvmat", "ca&#92;a10&#92;data&#92;A10_02_destruct.rvmat"};
};

Its pissing me of that the dammagefull[] (by itself, not with a Hitclass) is working on one model and not the other, for no obvious reason why the difference.

Which means I&#39;m having to try the "rvmat" idea .... that I can&#39;t read &#33;  http://forums.bistudio.com/oldsmileys/crazy_o.gif

Ideas, suggestions or Tuts ? ? ?

[APS]Gnat
Sep 26 2007, 13:39
Usual story ... post and then find a solution yourself  http://forums.bistudio.com/oldsmileys/tounge2.gif

OK .... I got the rvmat open with Unrap and near copied it to be like this (and made 1 similar for each texture);

Warrior0_destruct.rvmat

Quote[/b] ]ambient[]={1.0,1.0,1.0,1.0};
diffuse[]={1.0,1.0,1.0,1.0};
forcedDiffuse[]={0.0,0.0,0.0,0.0};
emmisive[]={0.0,0.0,0.0,1.0};
specular[]={1.0,1.0,1.0,0.0};
specularPower=40.0;
PixelShaderID="NormalMapMacroASSpecularDIMap";
VertexShaderID="NormalMapAS";
class Stage1
{
texture="GNT_PiperWII&#92;Warrior0_NOHQ.paa";
uvSource="tex";
class uvTransform
{
aside[]={1.0,0.0,0.0};
up[]={0.0,1.0,0.0};
dir[]={0.0,0.0,0.0};
pos[]={0.0,0.0,0.0};
};
};
class Stage2
{
texture="ca&#92;data&#92;destruct&#92;vehicle_destr1024_1024_mc.paa";
uvSource="tex";
class uvTransform
{
aside[]={1.0,0.0,0.0};
up[]={0.0,1.0,0.0};
dir[]={0.2,0.0,0.0};
pos[]={0.2,0.0,0.0};
};
};
class Stage3
{
texture="#(argb,8,8,3)color(1,1,1,1)";
uvSource="tex";
class uvTransform
{
aside[]={1.0,0.0,0.0};
up[]={0.0,1.0,0.0};
dir[]={0.0,0.0,0.0};
pos[]={0.0,0.0,0.0};
};
};
class Stage4
{
texture="ca&#92;data&#92;destruct&#92;vehicle_destr1024_1024_smdi.paa";
uvSource="tex";
class uvTransform
{
aside[]={1.0,0.0,0.0};
up[]={0.0,1.0,0.0};
dir[]={0.0,0.0,0.0};
pos[]={0.0,0.0,0.0};
};
};



And the main Config now has;

Quote[/b] ]
class cfgModels
{
class Plane;
class PWII: Plane
{
skeletonName = "GNT_PiperWIIBones";
sectionsInherit="";
sections[]=
{
"vrtule staticka","vrtule blur","clan","clan_sign","zbytek"

};
.........
.........
class CfgVehicles
{
class All {};
class AllVehicles: All {};
class Air: AllVehicles {};
class Plane: Air
{
class NewTurret; // External class reference
class AnimationSources;  // thanks to RockofSL
};
class GNT_PiperWII: Plane
{
..........
..........
class Damage {
tex[] = {};
mat[] = {"GNT_PiperWII&#92;Warrior0.rvmat", "GNT_PiperWII&#92;Warrior0.rvmat", "GNT_PiperWII&#92;Warrior0_destruct.rvmat","GNT_PiperWII&#92;Warrior1.rvmat", "GNT_PiperWII&#92;Warrior1.rvmat", "GNT_PiperWII&#92;Warrior1_destruct.rvmat","GNT_PiperWII&#92;Warrior2.rvmat", "GNT_PiperWII&#92;Warrior2.rvmat", "GNT_PiperWII&#92;Warrior2_destruct.rvmat","GNT_PiperWII&#92;Warrior3.rvmat", "GNT_PiperWII&#92;Warrior3.rvmat", "GNT_PiperWII&#92;Warrior3_destruct.rvmat"};
};


And for each Resolution LOD of the model I did a Select-All and named the selection "zbytek"

It works quite nice;
http://members.iinet.net.au/~nrspence/ArmA/PiperWII_B.jpg

Now the only problem is that I have a dozen more little textures that I have to do the same for http://forums.bistudio.com/oldsmileys/sad_o.gif
Now I see why its best to contain everything into 1 or 2 main textures.

[APS]Gnat
Sep 30 2007, 03:57
.... and to finish off explaining (because I forgot and wasted hours of my own time lol)

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;

http://members.iinet.net.au/~nrspence/ArmA/Damage_rvmat_1.jpg

And to clarify, all these files are needed (until experiementation proves otherwise) to enable damage textures.

http://members.iinet.net.au/~nrspence/ArmA/Damage_rvmat_2.jpg

Best of luck  http://forums.bistudio.com/oldsmileys/thumbs-up.gif

NonWonderDog
Oct 21 2007, 20:55
passThrough=1 means that the hitzone is vital to the complete model, so if this "weakspot" is destroyed (he might be just 30% of the whole armor) the whole vehicle blows up. passThrough=0 means that destroyed hitzone does some effect (windows textures changed, wheeles not turning), but the vehicle does not blow up.
Are you sure about this? Testing does not bear this out.

From some quick tests, I can say that destroying a tank&#39;s track that has either passThrough = 0 or passThrough = 1 does not cause the entire tank to blow up. Similarly, destroying a tank&#39;s engine that has either passThrough = 0 or passThrough = 1 does cause the tank to blow up.

Is this simulation dependent, or does it just not work?

[FF]Faust
Jan 5 2008, 20:40
I have few questions:

1)

Quote[/b] ]class Damage {
tex[] = {};
mat[] = {"GNT_PiperWII&#92;Warrior0.rvmat", "GNT_PiperWII&#92;Warrior0.rvmat", "GNT_PiperWII&#92;Warrior0_destruct.rvmat",};
};

1st rvmat means normal material, 2nd rvmat means half dammaged and 3rd full dammaged material??

2)
Quote[/b] ]class Stage3
{
texture="#(argb,8,8,3)color(1,1,1,1)";
uvSource="tex";
class uvTransform
{
aside[]={1.0,0.0,0.0};
up[]={0.0,1.0,0.0};
dir[]={0.0,0.0,0.0};
pos[]={0.0,0.0,0.0};
};
};
Is this stage3 in rvmat file necessary? if yes, what does it do?

3)
Quote[/b] ] sections[]=
{
"vrtule staticka","vrtule blur","clan","clan_sign","zbytek"

};
do I have to use the name of selection "zbytek" or can I use another name (for example "zbytek2") ?

THX for answers http://forums.bistudio.com/oldsmileys/help.gif

RN Malboeuf
Jan 5 2008, 21:02
1. yep
2. depends on shader used
3. yep, see and edit selectionDamage in cfgvehicles

[FF]Faust
Jan 5 2008, 22:04
1. yep
2. depends on shader used
3. yep, see and edit selectionDamage in cfgvehicles

selectionDamage? I dont know it. Could u post here any code with it?
...cuz in Gnat code there isnt any selectionDamage

RN Malboeuf
Jan 5 2008, 22:11
unpack and look through stabdart configs. that&#39;s best example http://forums.bistudio.com/oldsmileys/wink_o.gif

Zaphod
Jan 5 2008, 22:26
what i need is:

non functional ammo crates ... without "gear" action

USSRsniper
Jan 6 2008, 00:11
Faust @<hidden> Jan. 06 2008,00:04)]
1. yep
2. depends on shader used
3.  yep, see and edit selectionDamage in cfgvehicles

selectionDamage? I dont know it. Could u post here any code with it?
...cuz in Gnat code there isnt any selectionDamage
Also if you don&#39;t have done that, look through BIS example models. And you don&#39;t need selectionDamage, so don&#39;t look into standart config because there is no selectionDamage.

RN Malboeuf
Jan 6 2008, 06:32
Quote[/b] ]there is no selectionDamage.
false
though there&#39;s default value "zbytek" defined for base classes - you can always use it. but the question was different http://forums.bistudio.com/oldsmileys/wink_o.gif

another thing - with proper model without selection "zbytek" (or any otherdefined) damaged parts will just darken like in old good ofp ))

USSRsniper
Jan 6 2008, 07:04
For damage oxidized textures all you need is selection zbytek or karoserie(or any other name), and define it in HitClass, and also materials in class Damage, add it as section in model.cfg, cfgModel. You are just confusing people with selectionDamage..

RN Malboeuf
Jan 6 2008, 13:04
ok, add selectiondamage=""; to your config and then try to achieve damage effects http://forums.bistudio.com/oldsmileys/biggrin_o.gif

[FF]Faust
Jan 6 2008, 14:10
In Oxygen i select all faces of LOD 0 and create new selection called "zbytek". body_co.paa and tex1.rvmat is applied to LOD 0.

Config:

Quote[/b] ]
class CfgPatches
{
class FFRadio
{
units[] = {};
weapons[] = {};
requiredVersion = 0.10;
requiredAddons[] = {};
};
};

class cfgSkeletons
{
class FFRadio_Skeleton
{
isDiscrete=1;
skeletonInherit="";
skeletonBones[]=
{
};
};
};

class cfgModels
{
class FFRadio
{
sectionsInherit="";
sections[]=
{
"zbytek"
};

skeletonName="FFRadio_Skeleton";

};
};

class CfgVehicleClasses
{
class FFObjects
{
displayName = "FF Objects";
};
};

class CfgVehicles
{
class Thing;
class FFRadio: Thing
{
model="&#92;FF_Radio&#92;Radio";
vehicleclass="FFObjects";
armor=50;
scope=2;
displayname="Radio";
icon="&#92;FF_Radio&#92;icon_ca.paa";
mapsize = 1;
destrType = "DestructEngine";
simulation = "thing";
selectiondamage="zbytek";

class Damage
{
tex[] = {};
mat[] = {"FF_Radio&#92;tex1.rvmat","FF_Radio&#92;tex1.rvmat","FF_Radio&#92;tex2.rvmat"
};

};
};


tex1.rvmat:
Quote[/b] ]ambient[]={1.0,1.0,1.0,1.0};
diffuse[]={1.0,1.0,1.0,1.0};
forcedDiffuse[]={0.0,0.0,0.0,0.0};
emmisive[]={0.0,0.0,0.0,1.0};
specular[]={0.1,0.1,0.1,0.1};
specularPower=20.0;
PixelShaderID="NormalMapMacroASSpecularDIMap";
VertexShaderID="NormalMapAS";
class Stage1
{
texture="FF_Radio&#92;tex&#92;body_nohq.paa";
uvSource="tex";
class uvTransform
{
aside[]={1.0,0.0,0.0};
up[]={0.0,1.0,0.0};
dir[]={0.0,0.0,0.0};
pos[]={0.0,0.0,0.0};
};
};
class Stage2
{
texture="FF_Radio&#92;tex&#92;body_co.paa";
uvSource="tex";
class uvTransform
{
aside[]={1.0,0.0,0.0};
up[]={0.0,1.0,0.0};
dir[]={0.0,0.0,0.0};
pos[]={0.0,0.0,0.0};
};
};

class Stage3
{
texture="#(argb,8,8,3)color(1,1,1,1)";
uvSource="tex";
class uvTransform
{
aside[]={1.0,0.0,0.0};
up[]={0.0,1.0,0.0};
dir[]={0.0,0.0,0.0};
pos[]={0.0,0.0,0.0};
};
};
class Stage4
{
texture="FF_Radio&#92;tex&#92;body_smdi.paa";
uvSource="tex";
class uvTransform
{
aside[]={1.0,0.0,0.0};
up[]={0.0,1.0,0.0};
dir[]={0.0,0.0,0.0};
pos[]={0.0,0.0,0.0};
};

tex2.rvmat (destructed)
Quote[/b] ]ambient[]={1.0,1.0,1.0,1.0};
diffuse[]={1.0,1.0,1.0,1.0};
forcedDiffuse[]={0.0,0.0,0.0,0.0};
emmisive[]={0.0,0.0,0.0,1.0};
specular[]={0.1,0.1,0.1,0.1};
specularPower=100.0;
PixelShaderID="NormalMapMacroASSpecularDIMap";
VertexShaderID="NormalMapAS";
class Stage1
{
texture="FF_Radio&#92;tex&#92;body_nohq.paa";
uvSource="tex";
class uvTransform
{
aside[]={1.0,0.0,0.0};
up[]={0.0,1.0,0.0};
dir[]={0.0,0.0,0.0};
pos[]={0.0,0.0,0.0};
};
};
class Stage2
{
texture="ca&#92;data&#92;destruct&#92;vehicle_destr1024_1024_mc.paa";
uvSource="tex";
class uvTransform
{
aside[]={1.0,0.0,0.0};
up[]={0.0,1.0,0.0};
dir[]={0.2,0.0,0.0};
pos[]={0.2,0.0,0.0};
};
};
class Stage3
{
texture="#(argb,8,8,3)color(1,1,1,1)";
uvSource="tex";
class uvTransform
{
aside[]={1.0,0.0,0.0};
up[]={0.0,1.0,0.0};
dir[]={0.0,0.0,0.0};
pos[]={0.0,0.0,0.0};
};
};
class Stage4
{
texture="FF_Radio&#92;tex&#92;body_smdi.paa";
uvSource="tex";
class uvTransform
{
aside[]={1.0,0.0,0.0};
up[]={0.0,1.0,0.0};
dir[]={0.0,0.0,0.0};
pos[]={0.0,0.0,0.0};
};

Result: Doesnt work

Questions:
1) what i did wrong? (..or what I forget to do)
2) do i have to use _mc in destruct texture? ( like this "vehicle_destr1024_1024_mc.paa")
3) did I use that selectiondamage="zbytek"; correctly ?

Looking forward for answers like 1)all 2)maybe 3)no http://forums.bistudio.com/oldsmileys/rofl.gif

RN Malboeuf
Jan 6 2008, 14:47
you&#39;re making static object - all my words are about vehicles, i just never ported simple static object in game. i don&#39;t even know if damage type you wanted is supported for static - look through standart objects first