PDA

View Full Version : Destruct textures



USSRsniper
Oct 22 2007, 09:02
I can't make destruct textures to appear on model.
Even changedd paths so its without caps, which some people suggest that it will make difference.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">
dammageHalf&#91;&#93; = {&#34;&#92;ca&#92;wheeled&#92;data&#92;hmmwv_glass_CA.paa&#34;,&#34;&#92;ca&#92;wheeled&#92;data&#92;hmmwv_glassbr1_CA.paa&#34;,&#34;&#92;ca&#92;wheeled&#92;data&#92;hmmwv_glass_CA.paa&#34;,&#34;&#92;ca&#92;wheeled&#92;data&#92;hmmwv_glassbr1_CA.paa&#34;};
dammageFull&#91;&#93; = {&#34;&#92;ca&#92;wheeled&#92;data&#92;hmmwv_glass_CA.paa&#34;,&#34;&#92;ca&#92;wheeled&#92;data&#92;hmmwv_glassbr2_CA.paa&#34;,&#34;&#92;ca&#92;wheeled&#92;data&#92;hmmwv_glass_CA.paa&#34;,&#34;&#92;ca&#92;wheeled&#92;data&#92;hmmwv_glassbr2_CA.paa&#34;};
class Damage {
tex&#91;&#93; = {};
mat&#91;&#93; = {&#34;ca&#92;wheeled&#92;data&#92;hmmwv_regular_1.rvmat&#34;, &#34;ca&#92;wheeled&#92;data&#92;hmmwv_regular_1.rvmat&#34;, &#34;ca&#92;wheeled&#92;data&#92;hmmwv_regular_1_destruct.rvmat&#34;, &#34;ca&#92;wheeled&#92;data&#92;hmmwv_hood.rvmat&#34;, &#34;ca&#92;wheeled&#92;data&#92;hmmwv_hood.rvmat&#34;, &#34;ca&#92;wheeled&#92;data&#92;hmmwv_hood_destruct.rvmat&#34;, &#34;ca&#92;wheeled&#92;data&#92;hmmwv_details.rvmat&#34;, &#34;ca&#92;wheeled&#92;data&#92;hmmwv_details.rvmat&#34;, &#34;ca&#92;wheeled&#92;data&#92;hmmwv_details_destruct.rvmat&#34;, &#34;ca&#92;wheeled&#92;data&#92;hmmwv_body.rvmat&#34;, &#34;ca&#92;wheeled&#92;data&#92;hmmwv_body.rvmat&#34;, &#34;ca&#92;wheeled&#92;data&#92;hmmwv_body_destruct.rvmat&#34;, &#34;ca&#92;wheeled&#92;data&#92;hmmwv_regular.rvmat&#34;, &#34;ca&#92;wheeled&#92;data&#92;hmmwv_regular.rvmat&#34;, &#34;ca&#92;wheeled&#92;data&#92;hmmwv_regular_destruct.rvmat&#34;, &#34;ca&#92;wheeled&#92;data&#92;hmmwv_clocks.rvmat&#34;, &#34;ca&#92;wheeled&#92;data&#92;hmmwv_clocks.rvmat&#34;, &#34;ca&#92;wheeled&#92;data&#92;hmmwv_clocks_destruct.rvmat&#34;};[/QUOTE]

Here is part of config with damage textures, but i think everything correct and it should work.  If i posted this in wrong section sorry, because i have no idea if its config related or model related.....

[APS]Gnat
Oct 22 2007, 12:21
Used to be able to do the same with old OFP models converted to ArmA ..... but since stopped working.

I suspect its either the 1.08 update or using the new O2 that caused the coding to stop working.

Check my Piper Warrior for how ArmA works now.
Every texture needs a .rvmat, _destruct.rvmat, _co.paa, _nohq.paa and a _smdi.paa

See more details here;
http://www.flashpoint1985.com/cgi-bin....21;st=0 (http://www.flashpoint1985.com/cgi-bin/ikonboard311/ikonboard.cgi?act=ST;f=80;t=62921;st=0)

USSRsniper
Oct 22 2007, 13:44
Gnat @<hidden> Oct. 22 2007,14:21)]Used to be able to do the same with old OFP models converted to ArmA ..... but since stopped working.

I suspect its either the 1.08 update or using the new O2 that caused the coding to stop working.

Check my Piper Warrior for how ArmA works now.
Every texture needs a .rvmat, _destruct.rvmat, _co.paa, _nohq.paa and a _smdi.paa

See more details here;
http://www.flashpoint1985.com/cgi-bin....21;st=0 (http://www.flashpoint1985.com/cgi-bin/ikonboard311/ikonboard.cgi?act=ST;f=80;t=62921;st=0)
Thx i think i found whats was the problem, what you said about .rvmat helped me. But how do i get glass breaking effect on windows? is this damagefull and damage half stuff in config? Or i need to add something else to make it work? Because i looked over your config on piper warrior and see nothing related to glass braking...

[APS]Gnat
Oct 22 2007, 16:05
Um ... yep, your right, I didnt get as far as working out glass I&#39;m sorry.

USSRsniper
Oct 28 2007, 22:53
Here is one weird things that i encountered today. When i binirize model with BINPBO, everything binirizes good, config files, .rvmat&#39;s, but all destruct .rvmat&#39;s don&#39;t appear in actual final version of .pbo. And there is absolutely no errors in log about those .rvmat&#39;s, nothing.

[APS]Gnat
Oct 29 2007, 10:50
NOTE:
I had to manually add those "missing" files to the BINPBO Temp directory so that they would be included in the final binized PBO

This suggests we are doing something wrong ...... or BIS stuffed up BINPBO ..... take your pick, but either way the Piper Warrior is binized and the damage textures work.

edit: typos

RN Malboeuf
Oct 29 2007, 21:08
Quote[/b] ]When i binirize model with BINPBO, everything binirizes good, config files, .rvmat&#39;s, but all destruct .rvmat&#39;s don&#39;t appear in actual final version of .pbo. And there is absolutely no errors in log about those .rvmat&#39;s, nothing.
the same thing with damage textures (like windows) and with pther texctures that re not in the model. Seems to be BIs error to me

Synide
Oct 30 2007, 02:15
can i just confirm what you are all saying please.

are you saying that if you have a folder that you are going to binarize into a .pbo, which includes a model, .cpp, main textures and main materials and perhaps also destructed materials, and other references to destructed materials is in the .cpp.

in your case are your referenced destruct materials pathnames pointing to rvmat&#39;s inside the addon folder or outside of the addon folder?

if your destruct materials are pointing to rvmat&#39;s that &#39;live&#39; somewhere else within your mod or the standard BIS addons - then why would you expect them to be pulled into your addon and squashed along with the rest of your content?

in the case where your destruct materials referenced in your cpp and/or model are pointing to rvmat&#39;s that are inside your working addon folder - are you saying they are not getting added when you &#39;squash&#39; the folder?

RN Malboeuf
Oct 30 2007, 07:48
in the case where your destruct materials referenced in your cpp and/or model are pointing to rvmat&#39;s that are inside your working addon folder - are you saying they are not getting added when you &#39;squash&#39; the folder?
exactly. destruct rvmats are referenced in cpp, but not included by binarizer automatically

Planck
Oct 30 2007, 10:28
As Synide has already said, if the referenced rvmats are outside of the actual PBO, lets say part of ArmA already like this example taken from above:

"ca&#92;wheeled&#92;data&#92;hmmwv_regular_1.rvmat"

These will not be packed in your PBO as they are already present in ArmA.

If they are your own rvmats inside your own addon and the path reference in your cpp is correct then all things being equal (even though not much is in this world) they should be packed along with everything else.


Planck

RN Malboeuf
Oct 30 2007, 22:42
Quote[/b] ]If they are your own rvmats inside your own addon and the path reference in your cpp is correct then all things being equal (even though not much is in this world) they should be packed along with everything else.
read my message http://forums.bistudio.com/oldsmileys/wink_o.gif they are custom into pbo folder, but they don&#39;t packed during binarize

Synide
Oct 31 2007, 03:17
i&#39;ll test tonight to see if i get the same result... but, another quick question... are your rvmat&#39;s that are inside your folder structure (and as such should get &#39;squashed&#39; as well...) and referenced by your .cpp in rapified format or as text format?

edit: indeed... agreed, there seems to be a definite problem with BinPBO adding either rapified or un-rapified rvmats... sorry, it&#39;s not that i didn&#39;t believe you or anything... just like to see &#39;problems&#39; first hand... cheers for the heads up on the &#39;trap for unwary&#39;...

UNN
Oct 31 2007, 10:22
In the options for BinPbo there is field called "List All Files To Copy Directly". *.rvmat is not included in the wildcards by default.

Could that be the problem?

Synide
Oct 31 2007, 17:49
possibly, could be as simple as that... but what if you want them rapified....

UNN
Oct 31 2007, 18:19
Quote[/b] ] but what if you want them rapified

I dunno, perhaps if you performed a little jig as well?...Surely it can&#39;t harm, if you make it energetic and put your heart into it&#33;

It may or may not work, but it’s one more thing to try?

Jackal326
Oct 31 2007, 19:04
In the options for BinPbo there is field called "List All Files To Copy Directly". *.rvmat is not included in the wildcards by default.

Could that be the problem?
That has been the issue for me thus far with the work on my weapons pack. BinPBO wasn&#39;t converting any RVMAT files until I added *.rvmat to the list of copied file formats, then everything was copied over perfectly and worked fine. Adding *.rvmat to the "list of files to copy directly" in BinPBO&#39;s "options" page, should work fine.

Synide
Nov 17 2007, 11:40
That has been the issue for me thus far with the work on my weapons pack. BinPBO wasn&#39;t converting any RVMAT files until I added *.rvmat to the list of copied file formats, then everything was copied over perfectly and worked fine. Adding *.rvmat to the "list of files to copy directly" in BinPBO&#39;s "options" page, should work fine.

ok, i&#39;ve had to do a bit more around this area myself the last week so this is what i have found... probably already some of you know this anyway... but, for those that don&#39;t...

There a 2 (two) methods by which materials work on models...

a. by specifying all relevant information for &#39;CfgTextureToMaterial&#39; and &#39;CfgMaterials&#39; in a config.cpp - this is the old/transition method.

 OR

b. by pointing faces in your model (using O2PE only) to not only the main texture for that face but also a .rvmat material file.

currently, method (b) will not work unless you do not binarize your model. if you choose to leave your model as a P3DM you can successfully utilize the new ArmA method.

if you want to binarize your model (to make it smaller for one thing...) currently i believe you cannot use method (b) and here&#39;s why...


1. when Binarize comes across a .rvmat reference in your lovelly P3DM mlod model it currently cannot include this rvmat in the binarized version it tries to produce.
(this is of course written in the readme... which i failed to read for a very long time... lol)

so, if you utilize the new method and want to binarize your models then the materials won&#39;t work...

Solutions

1. release your model as p3dm and you can use the new method.

2. if you want to binarize...
while working on your model and using Buldozer you can of course make use of the new method...
but when you go to produce your pbo (for use in game) you should remove all reference to .rvmat&#39;s in your model.
you should copy and paste all the information from your working rvmat files into a config.cpp and utilize the old/transition method of making CfgTextureToMaterial and CfgMaterials classes.

now when you produce your pbo using BinPBO the model will be binarized and it will read the material information from the config.cpp and include this in the model.p3d.

you do not need the rvmat files to be included in the pbo.

warning: if you specify the materials in a config.cpp AND still have references to the rvmat&#39;s on faces in the model you will probably find your materials will not work in game. they do in Buldozer but not in game...

This will, become irrelevant when BIS fix the Binarize.exe tool to correctly process rvmat&#39;s.

the issue detailed above is not entirely accurate with respect to damage textures... and is slightly off topic of this thread...
for an account of the issue detailed above interested parties should see the following thread Materials & BinPBO/Binarize... (http://www.flashpoint1985.com/cgi-bin/ikonboard311/ikonboard.cgi?act=ST;f=79;t=69856) and disregard the above in respect of damage textures...

RN Malboeuf
Nov 18 2007, 13:33
Synide
can&#39;t get what yuor post is about http://forums.bistudio.com/oldsmileys/sad_o.gif
Method a) is wierd, it was smth horrible temporary solution.
If you define rvmats in the model andd then specify destruct effects in the confgis correctly - it does work. always. with binarized and non-binarized models (just beware binarizer can miss your destuct rvmats - add them manually if so http://forums.bistudio.com/oldsmileys/wink_o.gif). I tried it quite long ago - it&#39;s working.
I always used

Synide
Nov 19 2007, 01:16
Synide
can&#39;t get what yuor post is about http://forums.bistudio.com/oldsmileys/sad_o.gif
Method a) is wierd, it was smth horrible temporary solution.
If you define rvmats in the model andd then specify destruct effects in the confgis correctly - it does work. always. with binarized and non-binarized models (just beware binarizer can miss your destuct rvmats - add them manually if so http://forums.bistudio.com/oldsmileys/wink_o.gif). I tried it quite long ago - it&#39;s working.
I always used
Binarize cannot process rvmat&#39;s at this time... this is not a disputable point. i know what a materials section inside a odolv40.p3d looks like and the binarize tool fails to produce this when you have rvmat material files specified through the O2PE Face Properties dialog.

i started another thread about this here (http://www.flashpoint1985.com/cgi-bin/ikonboard311/ikonboard.cgi?act=ST;f=79;t=69856) if you are interested.

[APS]Gnat
Nov 24 2007, 02:14
? ? ? ? .....
1) I am using method (b)
2) I have BinPBO&#39;ed my Piper Warrior
3) The Damage Textures work ingame&#33;

Synide
Nov 24 2007, 03:07
Gnat @<hidden> Nov. 24 2007,16:14)]? ? ? ? .....
1) I am using method (b)
2) I have BinPBO&#39;ed my Piper Warrior
3) The Damage Textures work ingame&#33;

sorry, to clarify, yes... destruct/damage materials work.
which is the subject of this thread.

as there is only one way to specify desturct materials and that&#39;s through the .cpp.

i was referring to something that was related (sort of)... and that&#39;s why i started another thread on that subject here... Materials & BinPBO/Binarize... (http://www.flashpoint1985.com/cgi-bin/ikonboard311/ikonboard.cgi?act=ST;f=79;t=69856)

so as not to confuse this thread...

PS. if you&#39;d been producing a odol&#39;d model in you pbo although you&#39;re damage textures would have been working, you&#39;re main material would not have been. (the one referenced on the Face Properties in O2PE)

RN Malboeuf
Nov 24 2007, 08:51
Quote[/b] ]PS. if you&#39;d been producing a odol&#39;d model in you pbo although you&#39;re damage textures would have been working, you&#39;re main material would not have been. (the one referenced on the Face Properties in O2PE)
...
as there is only one way to specify desturct materials and that&#39;s through the .cpp.

i can&#39;t get it too... I got model with main and damage materials working no matter if model is binarized or not. And damage materials are defined in cpp - there&#39;s noother way. just can&#39;t see what trouble you are discussing.

[APS]Gnat
Nov 24 2007, 09:57
I&#39;m suspicious that once you open and save a model in the new O2 it can never go back to the old method ..... I still have one addon (Ka-26) where the (a) method still works, but a newer model refuses to work the exact same way.

RN Malboeuf
Nov 24 2007, 10:31
you are wrong... ok, let&#39;s say probably http://forums.bistudio.com/oldsmileys/biggrin_o.gif I just wasted too lot of time on this engine to be wrong
actually method a) is very old and wierd way that was used only because of tool absence

[APS]Gnat
Nov 24 2007, 10:51
you are wrong
lol ... always amazes me how so many people (non BIS employees) in this forum are SO SURE about how the infinitely complex ArmA engine does and doesn&#39;t work when there can be <span style='font-size:11pt;line-height:100%'>100&#39;s</span> of variables (known and unknown) at play in each and every aspect of addon making.

But hey, you&#39;re probably right.

Synide
Nov 24 2007, 22:49
@<hidden>

as i said, i&#39;m sorry i posted in this thread as damage textures/materials are totaly fine and have nothing to do with the issue i have identified. well sorta nothing to do... but still relevant no the less... imo.

please, go over to that thread if you want to discuss it further. obviously, in this thread i have given you the impression that damage textures/materials will not work... however, no where (i think) in my post have i actually said this... i made a general statement earlier that &#39;you won&#39;t get materials to work if you do it one way&#39; but what i should have said was something a bit more specific. my apologies, i did not intend to include in this statement the damage textures/materials that have always been detailed within the config and not in the model itself...
however, if you go over to the other thread - hopefully, i explained or detailed the issue that i am referring to enough for you to understand... if not, i could probably go to the extent of showing you hex dumps and explaining in detail what the materials section of an odolv40 model file is meant to look like and what is produced by Binarize.exe.

i&#39;ll have to adjust my style of imparting info. obviously it is akward...

Jackal326
Nov 25 2007, 17:27
Well, something strange must be going on with the weapon models I&#39;ve been Bianrizing lately, because it would appear that the normal maps and spec maps (defined via the RVMATs, not the cfgmaterialtotexture) seem to work ABSOLUTELY fine. E.G. The Aimpoint dot glows (due to the RVMAT), the engraving on the MP5&#39;s receiver has normal maps (due to the RVMAT) etc. Maybe it depends on the type of model as to whether or not Binarize works correctly with RVMAT files?&#33;

EDIT:

Quote[/b] ]Rvmat
-----
Current version of binarize doesn&#39;t support rvmat files and these must be copied manually.
That basically means it doesn&#39;t automatically convert the RVMAT files like it does a texture. In my opinion it doesn&#39;t mean it doesn&#39;t convert their use (so provided the RVMAT files are still in the directory pointed to by the model(s) that use them, they&#39;ll work).

Synide
Nov 26 2007, 03:41
@<hidden> If you pop over to the other thread i have provided some links to an example of what i refer to... I don&#39;t doubt you are certain that your Binarized models are working well and they may well be... can you provide a detailed example of said working binarized model as per the examples in posted?

preferably... over in that thread...

USSRsniper
Dec 11 2007, 11:06
After all fo this time, my models are still without destruct textures. no matter what i try they don&#39;t want to work http://forums.bistudio.com/oldsmileys/crazy_o.gif

[APS]Gnat
Dec 11 2007, 13:06
If you like, send me a (non-Bin&#39;ed) sample and I&#39;ll see what I can do ......
2nd pair of eyes may be all it needs.

USSRsniper
Dec 13 2007, 22:38
Strange, but suddenly it started to work.. thx for offering help Gnat http://forums.bistudio.com/oldsmileys/smile_o.gif