Jump to content
Sign in to follow this  
wld427

Dammage textures

Recommended Posts

I am having a problem with my damage textures showin up on the vehicle...... the car burns..... but does not apply the dammage texture? do i need to add anything more than the class damage in the config?

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">cargoIsCoDriver[] = {0};

cargoAction[] = {BRDM2_Cargo01,BRDM2_Cargo02};

driverForceOptics = 1;

class Damage

{

tex[]={};

mat[]={

"ca\wheeled\data\detailmapy\brdm2_01.rvmat",

"ca\wheeled\data\detailmapy\brdm2_01.rvmat",

"ca\wheeled\data\detailmapy\brdm2_01_destruct.rvmat",

"ca\wheeled\data\detailmapy\brdm2_02.rvmat",

"ca\wheeled\data\detailmapy\brdm2_02.rvmat",

"ca\wheeled\data\detailmapy\brdm2_02_destruct.rvmat",

"ca\wheeled\data\brdm_in_base.rvmat",

"ca\wheeled\data\brdm_in_base.rvmat",

"ca\wheeled\data\brdm_in_base_destruct.rvmat",

"ca\wheeled\data\brdm_in_second.rvmat",

"ca\wheeled\data\brdm_in_second.rvmat",

"ca\wheeled\data\brdm_in_second_destruct.rvmat",

"ca\wheeled\data\brdm_in_forth.rvmat",

"ca\wheeled\data\brdm_in_forth.rvmat",

"ca\wheeled\data\brdm_in_forth_destruct.rvmat",

"ca\wheeled\data\brdm_in_third.rvmat",

"ca\wheeled\data\brdm_in_third.rvmat",

"ca\wheeled\data\brdm_in_third_destruct.rvmat"

};

};

class Library

{

Share this post


Link to post
Share on other sites

try adding the script from wheeled.pbo, the name has dead in it, i don't remember what its named but when I looked inside, it had a bunch of stuff for smoking the car and having it burn and all.

Share this post


Link to post
Share on other sites

that script seems to just create the fire and pieces flying away. I already have that with the default vehicle explosion. The issue becomes when the dammage textures need to be applied.

Share this post


Link to post
Share on other sites

I think you also need to define the damage textures used too. See my example from the BIS HMMWV below:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> dammageHalf[] = {"\ca\wheeled\data\HMMWV_glass_CA.paa", "\ca\wheeled\data\HMMWV_glassbr1_CA.paa", "\ca\wheeled\data\HMMWV_glass_CA.paa", "\ca\wheeled\data\HMMWV_glassbr1_CA.paa"};

dammageFull[] = {"\ca\wheeled\data\HMMWV_glass_CA.paa", "\ca\wheeled\data\HMMWV_glassbr2_CA.paa", "\ca\wheeled\data\HMMWV_glass_CA.paa", "\ca\wheeled\data\HMMWV_glassbr2_CA.paa"};

EDIT: On reconsideration, thats probably not going to help. However, it will help you get damaged window textures.

Share this post


Link to post
Share on other sites

yeah thats just it i cannot for the life of me to get the dammage texture to show.

Do you think i need to add a "killed" event handler and execute a setobjectTexture script?

Share this post


Link to post
Share on other sites

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> "ca\wheeled\data\detailmapy\brdm2_01.rvmat",

Do you have these RVMAT's applied to your model?

---------

I believe the mat[] array works as follows:

-It is organized in triplets

-The first rvmat is the one that is currently applied to your model

-The second rvmat is used when the vehicle is damaged. The first rvmat is replaced with this second rvmat

-The third rvmat is used when the vehicle is destroyed, in the same manner as above

-You can have as many of these triplets as you want, but they need to be organized in triplets (even if the second and third rvmat are the same)

---------

So, to summarize, you need to apply one rvmat to part of your vehicle, then you need to configure TWO replacement rvmats for the rvmat that you applied. Repeat for all the parts you want to have damage textures on.

---------

The tex[] array work almost identically to the mat[] array; however, it replaces textures, not rvmats.

In your case, you might want to use the tex[] array, not the mat[] array (though you can still add textures via rvmat of course).

I'm not sure how the old dammageHalf[] and dammageFull[] arrays relate to this system. They seem to be similar, only they are organized in pairs, not triplets (texture on your model, texture to replace it with).

There is also the old method of applying a "user value" on your model. This is linked in a hitpoint in the config, under the "material=" property. When that hitpoint is damaged, all textures with the same material number ("user value") will be darkened, in the old OFP style. Ex:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class HitEngine {armor=1.2;material=60;name="engine";passThrough=1;}

All textures with "user value" of 60 will darken when the engine is damaged.

Share this post


Link to post
Share on other sites

they are applied......anybody willing t look intot he PBO please PM me and i will send it to you.

Share this post


Link to post
Share on other sites

For working animated material that is bind to vehicle damage you need:

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 dammage in config.cpp where switching materials are defined

6) Model and all its sources must be binarised (packed) in PBO

Share this post


Link to post
Share on other sites
For working animated material that is bind to vehicle damage you need:

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 dammage in config.cpp where switching materials are defined

6) Model and all its sources must be binarised (packed) in PBO

That sounds good until you come to point number 6. The use of BIS MLODs in an author's addons means, thanks to the EULA, that addon cannot be Binarized. Will this all still work without Binarizing the models?

Share this post


Link to post
Share on other sites

Of course it can.

You are only meant to supply MLOD too.

Not sure right now, but I think you don't even have to offer both

in the same pbo or so. You are only meant to offer MLOD models

at some place.

Share this post


Link to post
Share on other sites

I put them in the MAP_Skills not in the same Pbo, but of cause in the same Download archive file.

This use have to be the right way, i can't see any reason why MLODs have to be implanted in the Pbo. wink_o.gif

Share this post


Link to post
Share on other sites
Of course it can.

You are only meant to supply MLOD too.

Not sure right now, but I think you don't even have to offer both

in the same pbo or so. You are only meant to offer MLOD models

at some place.

Thats fair enough then, I still wasn't 100% clear on that aspect of the EULA, and didn't want to get myself crucified one way or the other.

Share this post


Link to post
Share on other sites

the rvmats you are using must point also to the texture you are using.

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

Share this post


Link to post
Share on other sites
Of course it can.

You are only meant to supply MLOD too.

Not sure right now, but I think you don't even have to offer both

in the same pbo or so. You are only meant to offer MLOD models

at some place.

Thats fair enough then, I still wasn't 100% clear on that aspect of the EULA, and didn't want to get myself crucified one way or the other.

You posted on these here forums, get the spikes... wink_o.gif

Share this post


Link to post
Share on other sites

I'm having trouble getting mine to work. Here is how my config looks.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class Damage {

tex[] = {};

mat[] = {"Mech_BTR70M\t\veh_btr_camo.rvmat", "Mech_BTR70M\t\veh_btr_camo.rvmat", "Mech_BTR70M\t\veh_btr_camo_destruct.rvmat"};

};

Is there a special place I have to put damage in the config? When I apply the RVMat in Oxygen the damage textures appear fine, but when I switch back to the normal RVmat and blow the vehicle up it does not switch over.

Share this post


Link to post
Share on other sites
Is there a special place I have to put damage in the config? When I apply the RVMat in Oxygen the damage textures appear fine, but when I switch back to the normal RVmat and blow the vehicle up it does not switch over.

the config scripting is correct in all the above examples but...To get the Damage textures to animate you have to have a specific entery in the model's Named Selection, in all the Resolution LODs. To do that you have to select all the surfaces of the model you want the damage textures to animate in O2 and give the entire selection a specific name. The different type of vehicle models have different names applied to the model's sections. I am listing the Names applied to the damage selections in the different models...

helicopters damage named selection = trup

tracked vehicles damage named selection = telo

wheeled vehicles damage named selection = karoserie

aircraft damage named selection = zbytek

once the actual model has the named selection in all the Resolution LODs the damage texture animations will work.

Share this post


Link to post
Share on other sites

Im thinking its better to dig up a relevant thread than start a completely new one... so:

I've been trying to get my damage materials to work, but with no luck whatsoever. I've got the following:

Config entry:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class Damage

{

tex[]={};

mat[]=

{

"ukf_jackal_mwmik\Data\jackal_tex1.rvmat",

"ukf_jackal_mwmik\Data\jackal_damage_tex1.rvmat",

"ukf_jackal_mwmik\Data\jackal_damage_tex1.rvmat",

};

};

and of course the relevant rvmat files (all work fine when viewed in buldozer). Model.cfg entry for karosie and also the relevant stuff in actual model and hit points.

I can't think of anything I've missed? I'm inheriting from the BIS hummer, so I assume the actual hitpoint entries are take care of already (given im using the same one as in the hummer...)

Also, whilst the damage texture works fine, it doesn't seem to want to apply to a part of the model thats also a hidden selection? Its randomised at the start of the mission, but for those vehicles where you can see it, the damage texture doesn't get applied?

Share this post


Link to post
Share on other sites

hmmm... that's an interesting one...

i'll ask an obvious questions...

Are there any build errors in your .log file? (you'll ofcourse need to be binarizing...)

do the damage textures work on the 'proxy' object just as a standalone object... that is when it's not part of the humvee?

Share this post


Link to post
Share on other sites

ah yes, I forgot to binarize.. I've never used it before, so it had slipped my mind.

A quick question though, I've seen people talk about having to manually copy rvmat files across, but I'm not quite sure what that means? I know binarize can't seem to include rvmat files that are not 'attached' to the vehicle (i.e. the damage materials of course)

I get the missing rvmat error file which I pressume is down to binarize not being able to copy it across. Do I simply copy and paste them into the temp folder and then select pack from the Binarize GUI?

Share this post


Link to post
Share on other sites

I haven't had any problems with 'damage' texture type .rvmats, that is material files not directly referenced by either a model or an island.

Just add *.rvmat to the end of 'files to copy' under BinPBO options, you should be cool...

if the material is part of the BIS stuff you should already have it extracted into the P:\ca structure.

i always have binarize checked in BinPBO... it's the quickest way to find problems... if you can't binarize your model/island then there will be something wrong with a config/model/island/rvmat somewhere... and the build.log should be the first port of call...

does your 'proxy object' exist in another Messiah built .pbo?

Is that .pbo accessible to BinPBO/binarize during building your Humvee?

Share this post


Link to post
Share on other sites

i did add rvmat to my include files, but it seems to be ignoring that? I may have to check I spelt it correctly.

I may not have checked binarize, so I'll go back and check that too.

All the proxy objects are available to binpbo, and they get copied to the temp folder too, but none of them use damage texture yet.

Share this post


Link to post
Share on other sites
Quote[/b] ]helicopters damage named selection = trup

tracked vehicles damage named selection = telo

wheeled vehicles damage named selection = karoserie

aircraft damage named selection = zbytek

once the actual model has the named selection in all the Resolution LODs the damage texture animations will work.

notworthy.gif

and as addition:

ships damage named selection = motor

Share this post


Link to post
Share on other sites

Just a quick note to say that you do not need to binarize your addon to get the damage texture to work... unlike what's been said by a BIS official... I just did a test and it works ingame.

What I did :

- Trup selection (basicaly everything) + Damage Hide defined in O2 and model.cfg,

- No "texture" on the model in O2, only RVMATS which in turn point to the "default texture" you want to use (eg : camo1_co.paa) so that when you swap rvmats, you swap the base texture aswell, and there's no conflict.

- In config.cpp :

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

dammageHalf[]=

{

\ericm_kamov52\data\glass_ca.paa, \ericm_kamov52\data\glasscracks1_ca.paa,

};

dammageFull[]=

{

\ericm_kamov52\data\glass_ca.paa, \ericm_kamov52\data\glasscracks2_ca.paa,

};

class Damage

{

tex[]={};

mat[]={

"ericm_kamov52\data\KA52_fuselage.rvmat",

"ericm_kamov52\data\KA52_fuselagehalfdamage.rvmat",

"ericm_kamov52\data\KA52_fuselagedamage.rvmat",

};

};

Note that for the glass material I did it the otherway around since the rvmat doesn't change, only the base texture. But Both work.

I don't know if this is the one best way, but it did the trick for me.

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  

×