Jump to content
Sign in to follow this  
Törni

Damaged vehucles

Recommended Posts

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

so if i do LOD "damagehide" after dammage there will be destroyed vehicle ?

so if it works my VIBI need update

Share this post


Link to post
Share on other sites

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 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.

Share this post


Link to post
Share on other sites

than all model should be hidden 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 wink_o.gif which for me is nonsense

because i havent noticed engine "lowering" burned car for tire thick/height

Share this post


Link to post
Share on other sites
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 sad_o.gif

Share this post


Link to post
Share on other sites

Would any of this be of use to killing the lights on a uaz?

Cheers

GC

Share this post


Link to post
Share on other sites
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 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...

Share this post


Link to post
Share on other sites

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.)

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
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 wink_o.gif it works for me without it. At least textures darken after destuction like in OFP

Share this post


Link to post
Share on other sites
...Model must contain at least selection "zbytek" that will contain all faces that are animated.

Is this statement accurate?

Share this post


Link to post
Share on other sites
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 wink_o.gif Check M60 as an example - there're working hide anims there.

@Armored_Sheep

Can we expect models/configs examples to be released with the tools ?

Share this post


Link to post
Share on other sites
@Armored_Sheep

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.

Share this post


Link to post
Share on other sites

[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 'newer' models, so when Sheep refers to 'New ArmA damage visualization' perhaps it's

something that has only been implemented in recent patches and the recently made models are utilizing this feature.

That's why I was looking for clarification... Is it a necessity or Is it not?

Oh... And, what does 'zbytek' mean anyway?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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;

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Well, I'm not following this damage setup;

For a start, I can'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[] = {"\ca\a10\data\a10_glass_ca.paa", "\ca\a10\data\A10_glassBR1_CA.paa"};

dammageFull[] = {"\ca\a10\data\A10_glass_CA.paa", "\ca\a10\data\A10_glassBR1_CA.paa"};

class Damage {

tex[] = {};

mat[] = {"ca\a10\data\A10_01.rvmat", "ca\a10\data\A10_01.rvmat", "ca\a10\data\A10_01_destruct.rvmat", "ca\a10\data\A10_02.rvmat", "ca\a10\data\A10_02.rvmat", "ca\a10\data\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'm having to try the "rvmat" idea .... that I can't read !  crazy_o.gif

Ideas, suggestions or Tuts ? ? ?

Share this post


Link to post
Share on other sites

Usual story ... post and then find a solution yourself  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\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\data\destruct\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\data\destruct\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\Warrior0.rvmat", "GNT_PiperWII\Warrior0.rvmat", "GNT_PiperWII\Warrior0_destruct.rvmat","GNT_PiperWII\Warrior1.rvmat", "GNT_PiperWII\Warrior1.rvmat", "GNT_PiperWII\Warrior1_destruct.rvmat","GNT_PiperWII\Warrior2.rvmat", "GNT_PiperWII\Warrior2.rvmat", "GNT_PiperWII\Warrior2_destruct.rvmat","GNT_PiperWII\Warrior3.rvmat", "GNT_PiperWII\Warrior3.rvmat", "GNT_PiperWII\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;

PiperWII_B.jpg

Now the only problem is that I have a dozen more little textures that I have to do the same for sad_o.gif

Now I see why its best to contain everything into 1 or 2 main textures.

Share this post


Link to post
Share on other sites

.... 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;

Damage_rvmat_1.jpg

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

Damage_rvmat_2.jpg

Best of luck  thumbs-up.gif

Share this post


Link to post
Share on other sites
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's track that has either passThrough = 0 or passThrough = 1 does not cause the entire tank to blow up. Similarly, destroying a tank'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?

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×