Jump to content
Sign in to follow this  
rocket

Using the "Super" Shader (RVMAT material)

Recommended Posts

I have similar problem, only fix is to wait for the new BinPBO tool :rolleyes: It seems that when model is binirized some of the RVMAT data is actually baked into the p3d.

I think it has to do with the material definition per polygon, this might be something I might try and confirm with through Suma or someone.

Is anyone getting any RPT errors from materials when they binarize p3d's? I think it is dropping the material definition entirely, so it is possible in the ArmA2 p3d binarization process, material definition is compressed in a different way than in ArmA.

Anyone have any ideas?

Share this post


Link to post
Share on other sites

binarize embedds the rvmats in the p3d. The A1 binarize does this slightly different than the new one. THis could already be the problem...

Share this post


Link to post
Share on other sites
binarize embedds the rvmats in the p3d. The A1 binarize does this slightly different than the new one. THis could already be the problem...

It can't embed ALL the RVMAT data in the p3d, because the rvmat file is still required. It must just embed some of the information. I've PM'd suma to see if he can offer any advice.

Share this post


Link to post
Share on other sites

Materials for damage are not embedded, because the p3d doesn't reference them. The config does that.

Share this post


Link to post
Share on other sites
Materials for damage are not embedded, because the p3d doesn't reference them. The config does that.

Yeah, I realise that lol. I'm talking about all the rvmat. Surely not all of the rvmat data is embeded in the p3d when it get binarized.

If you binarize a model, then delete the rvmat files - you will get errors.

Share this post


Link to post
Share on other sites

I removed all rvmats (that does not end with _destruct) from water.pbo and had no error ingame using the RHIB

Share this post


Link to post
Share on other sites

'Primary' material files get embedded/baked into the model during binarization.

'Secondary' material files, such as damage materials or materials that one may 'swap' to from original 'primary' ones do not get embedded. And, as such must be included in the .pbo.

Once, the 'primary' material is inside the model I believe that one doesn't need to have the corresponding textual or binarized version of the same sitting inside the .pbo.

Because, they are small and inconsequential in the scheme of things it's easier to include them all rather than excluding the unnessesary ones.

The entirety of the 'primary' material.rvmat gets embedded. Not, of course any of the raw image data that a given material.rvmat may point too in turn.

If you are trying to use 'new' shaders (and consequently any subordinate texture images) in your source textual material file and then expect the A1 binarize.exe to try and embed these into a A1 style binarized model, you won't succeed.

If, binarize.exe fails to pre-process a material then subsequentally it will fail to embed said material into the output model.

Possibly, If the engine fails to find the appropriate proper embedded material information in the model (due to the above problem) it may then try looking in the .pbo for the textual/binarized version but I don't think it does. Been along time since I tested that.

If, you want to use these 'new' shaders etc. then for the moment probably don't binarize your model.

Seems a mute point though because if you wait a few shakes-of-a-lambs-tail the 'new' A2 binarize and associated tools should be along. And then you can knock yourselves out.

Share this post


Link to post
Share on other sites

Thanks T_D and Synide, that's a brilliant explanation. I really did not realize that at all, learn something new every day! I might use the old ArmA1 shaders for anything that needs binarizing, until the new binarization tool comes out.

Share this post


Link to post
Share on other sites

I noticed some vehicles in ArmA 2 have .smdi map with black and white channel. What exactly does it do? Also there is one even in nohq maps...

Edited by USSRsniper

Share this post


Link to post
Share on other sites

What is the pathname and filename of the _smdi's & _nohq's you are referring too?

And, when you say 'black & white' are you referring to the alpha channel?

Share this post


Link to post
Share on other sites
What is the pathname and filename of the _smdi's & _nohq's you are referring too?

And, when you say 'black & white' are you referring to the alpha channel?

wheeled2\BTR90\data\body_nohq.paa

wheeled2\BTR90\data\body_smdi.paa

Anyway figured out this myself

I had figured out the alpha channel in _nohq it's a height map which is used for creating the parallax map or also known as offsets mapping. Didn't know it would be that easy to make :D

And alpha channel in _smdi is a specular mask. Not sure about this though... Apply swizzling when importing with PSD plugin to see it, otherwise the alpha channel will be white. The alpha channel appears to be a copy of the blue channel.

Edited by USSRsniper

Share this post


Link to post
Share on other sites

There doesn't appear to be anything in those two .paa's alpha channels. If you are forcing something into the alpha channel using swizzling then of course.

Remember, that if you are using Keygety's Photoshop plugin you would have to apply whatever is in the 'TexConvert.cfg' parameter file for TexView2/pal2pace in reverse. This means that you would open a .paa in Photoshop with his plugin without applying any swizzling. Then you manually do whatever is in TexConvert.cfg for that given type of texture, but in reverse.

The only time I've seen the alpha channel have anything in it in a _nohq is to effect the opacity of the overall image when TexView2/pal2pace is parsing it into a .paa and it's a rare occurence when someone wants to reduce the strength of ones _nohq so most all _nohq's I've seen prior to being turned into a .paa by TexVeiw2/pal2pace have had their alpha channels set to 1 (255).

When your talking 'parallax' I think you might be referring to the _nopx.paa's aren't you?

In a _smdi.paa that's outputed by TexView2/pal2pace the alpha channel is always forced to be 1 (or 255 whichever you prefer).

And, if you had stuff in a _smdi.tga's alpha channel and then used TView/pal2pace to turn it into a .paa they both disregard whatever's there and just fill it with 1.

Share this post


Link to post
Share on other sites

When your talking 'parallax' I think you might be referring to the _nopx.paa's aren't you?

I was talking in general with DX9 games, what I had found with google :)

Share this post


Link to post
Share on other sites

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, 0.0};

specular[] = {1.0, 1.0, 1.0, 0.0};

specularPower = 90.0;

{ texture="C:\Documents and Settings\quinten\Bureaublad\zwart\zwartnormal_nohq.paa";

uvSource="tex";

class uvTransform

{

aside[]={1.000000,0.000000,0.000000};

up[]={0.000000,1.000000,0.000000};

dir[]={0.000000,0.000000,0.000000};

pos[]={0.000000,0.000000,0.000000};

};

};

class Stage2

{

texture="C:\Documents and Settings\quinten\Bureaublad\zwart\zwartdetail_dt.paa";

uvSource="tex";

class uvTransform

{

aside[]={8.000000,0.000000,0.000000};

up[]={0.000000,8.000000,0.000000};

dir[]={0.000000,0.000000,0.000000};

pos[]={0.000000,0.000000,0.000000};

};

};

class Stage3

{

texture="#(argb,8,8,3)color(0,0,0,0,MC)";

uvSource="tex";

class uvTransform

{

aside[]={1.000000,0.000000,0.000000};

up[]={0.000000,1.000000,0.000000};

dir[]={0.000000,0.000000,0.000000};

pos[]={0.000000,0.000000,0.000000};

};

};

class Stage4

{

texture="C:\Documents and Settings\quinten\Bureaublad\zwart\zwart_as.paa";

uvSource="tex";

class uvTransform

{

aside[]={1.000000,0.000000,0.000000};

up[]={0.000000,1.000000,0.000000};

dir[]={0.000000,0.000000,0.000000};

pos[]={0.000000,0.000000,0.000000};

};

};

class Stage5

{

texture="C:\Documents and Settings\quinten\Bureaublad\zwart\zwartspecular_smdi.paa";

uvSource="tex";

class uvTransform

{

aside[]={1.000000,0.000000,0.000000};

up[]={0.000000,1.000000,0.000000};

dir[]={0.000000,0.000000,0.000000};

pos[]={0.000000,0.000000,0.000000};

};

};

class Stage6 {

texture = "#(ai,64,64,1)fresnel(0.92,0.95)";

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 Stage7

{

texture = "ca\data\env_land_co.paa";

uvSource="none";

};

I put this rvmat as the material for my model.

what's wrong with it...when i open up bulldozer i get this message:

C:\Documents and Settings\quinten\Bureaublad\zwart\black.rvmat line7: '.' : '{' encountered instead of '='

please send a mail to flamebale93@hotmail.com

or quote this.

thanks in advance

Edited by sarge4267

Share this post


Link to post
Share on other sites

I put this rvmat as the material for my model.

what's wrong with it...when i open up bulldozer i get this message:

C:\Documents and Settings\quinten\Bureaublad\zwart\black.rvmat line7: '.' : '{' encountered instead of '='

The error is in black.rvmat, not in the rvmat you posted.

Share this post


Link to post
Share on other sites

Maybe it is a code error on the boards, but there are a few errors in that rvmat you posted.

{ texture="C:\Documents and Settings\quinten\Bureaublad\zwart\zwartnormal_nohq .paa";

->

{ texture="C:\Documents and Settings\quinten\Bureaublad\zwart\zwartnormal_nohq.paa";

(without a space behind _nohq).

texture="C:\Documents and Settings\quinten\Bureaublad\zwart\zwartdetail_dt.p aa";

->

texture="C:\Documents and Settings\quinten\Bureaublad\zwart\zwartdetail_dt.paa";

texture="C:\Documents and Settings\quinten\Bureaublad\zwart\zwartspecular_sm di.paa";

->

texture="C:\Documents and Settings\quinten\Bureaublad\zwart\zwartspecular_smdi.paa";

Also, you might want to work from an 'armawork" folder and work with the virtual drive (and make sure your texture path in 02 settings is point at that: Path for textures: P:\). Otherwise you will errors when you compile your pbo (paths pointing to your desktop atm).

Share this post


Link to post
Share on other sites
Also, you might want to work from an 'armawork" folder and work with the virtual drive (and make sure your texture path in 02 settings is point at that: Path for textures: P:\). Otherwise you will errors when you compile your pbo (paths pointing to your desktop atm).

I appreciate your help guys but it didn't work i still get the same error.

I also changed the folder to the P drive so now it's P:\comanche\zwart\texturename.

So what do i do now?

Edited by sarge4267

Share this post


Link to post
Share on other sites

Did you change the texture file names in my previous post?

Almost all texture (paths) had a space in the name and maybe something i overlooked: P:\blabla\....\texturename_nohq.paa

It is always best to have an as short as possible path name, so best is to put your texture directly in your pbo folder or in a subfolder. No need to call your normal map "zwartnormal" as the extention _nohq stands for normal map. Same for detail _, specular _smdi. Just call it "zwart" but use the proper extention with a _ between texturename and its class extention (don't confuse with .paa).

Anyway, just checking does your diffuse texture work? So the normal color texture...not your material (where the normal, smdi etc textures are defined).

If your diffuse texture works, it is just a mather of your texturename extensions (_noqh without spaces etc).

Anyway, if not mistaken there is some kind of rule (even a limitation) that a path has a limited amount of characters it can use. If not mistaken it is 32 letters/numbers, might be even only 16. I forgot. Additionally, if not mistaken aswell, linux even has problems with capital letters in pathlines...at least i thought i read it one time.

In the end, if you still can't figuer it out what the problem is, feel free to upload your folder and someone will have a look at it.

*We zijn er om te helpen, we moeten enkel even de tijd hebben ;) .

*We are here to help, we just needs to have the time for it...

Share this post


Link to post
Share on other sites

it's a material, take the "P:\" of the front of the pathnames to the textures !

there are a few .rvmat files that come with the A2 content... have a look at some of them for inspiration.

Share this post


Link to post
Share on other sites

well ok guys i'll take a look at it...as for the "zwartnormal_nohq" name...it's just easier for me to see what's the normal map and what specular and stuff...thanks for your help!

I'm gonna put this project on a pause for the only reason that there's school

dasquade...bedankt e :D

Share this post


Link to post
Share on other sites

Ok I now have my model set up in oxygen( geo,hitpoint,landcontact etc.) how do i set up the config for my chopper?

Share this post


Link to post
Share on other sites
by searching/looking through examples

sorry if I sound like a noob but when i extract a PBO for example "air2.pbo" or "air" and I want to open the config from the AH-1Z then it's notvery clear what's it all about.

Share this post


Link to post
Share on other sites

Best to reference a full Config like found here

http://www.ofpec.com/forum/index.php?topic=33429.0

Then look at "Air" cfgvehicle class definition, then look at "Plane", then look at definition for each aircraft.

There is no shortcut way to learn there. The parameter names are in english, what each parameter does is generally related to the name meaning.

Some can be related back to the old ArmA1 definitions.

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

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  

×