Jump to content
Sign in to follow this  
rocket

Using the "Super" Shader (RVMAT material)

Recommended Posts

Gnat;1430696']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' date=' 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.

[url']http://community.bistudio.com/wiki/CfgVehicles_Config_Reference[/url]

ok thanks...I've looked at it and it seems that I'll need to begin with the basics...I just can't get my chopper ingame

would it help if I posted the pbo file here?

Share this post


Link to post
Share on other sites

check new sticky and if you still have questions , feel free to ask

Share this post


Link to post
Share on other sites

put it into that thread as answer and btw. i updated the MAX/MAYA section for SuperShader ;)

---------- Post added at 21:02 ---------- Previous post was at 20:10 ----------

and updated MultiMaterial with MAX stuff

Share this post


Link to post
Share on other sites

hi guys im using the BI sample model and doing a british desert camo i got my textures all sorted out my problem is when i try and add the defualt rvmats for the areas of webbing face etc the locations go black when previewing in bulldozer ??

im doing this in the current LOD area on oxygen2 any suggestions ?

P.S sorry for hijacking the thread =)

Edited by 5urge

Share this post


Link to post
Share on other sites

you will have to open up the rvmat (just with notepad or something) and change the paths to the other textures to your pbo folder.

Share this post


Link to post
Share on other sites

hello,

I'm trying to make a static object for arma2 with a texture

my folder is in the P: drive.

I'm constantly getting this error in bulldozer: "cannot load texture warrior\normal\body_nohq.paa"

this is the rvmat:

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;
class stage1
{
texture="\warrior\normal\body_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="\warrior\detail texture\detail_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 Stage5
{
texture="\warrior\specular\bodytop_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";
};

please help.

Thanks in advance

Share this post


Link to post
Share on other sites
texture="warrior\normal\body_nohq.paa";

Thats how i have it and it works.

so you say without the dash?

well i did that and still same error

Share this post


Link to post
Share on other sites

Check if the file is named correctly.

Check if folder is named correctly.

Check twice if path is correct.

texture="\warrior\detail texture\detail_dt.paa";

Does this folder really have a white space? Preferably do not use spaces in folder or in filename. Don't know if it's related here, just a general advice.

Share this post


Link to post
Share on other sites
Check if the file is named correctly.

Check if folder is named correctly.

Check twice if path is correct.

texture="\warrior\detail texture\detail_dt.paa";

Does this folder really have a white space? Preferably do not use spaces in folder or in filename. Don't know if it's related here, just a general advice.

yups..but I wrote it as detail_texture in the rvmat just not in this example so that's not the problem.

:(

Share this post


Link to post
Share on other sites

Make sure you remove also the other dashs below...other than that, i can't see an error. Only explenation for me would be misspelled folder and/or filename but as you say you've checked that....i'm out of ideas, sorry.

Share this post


Link to post
Share on other sites
Make sure you remove also the other dashs below...other than that, i can't see an error. Only explenation for me would be misspelled folder and/or filename but as you say you've checked that....i'm out of ideas, sorry.

what dashs do you mean?

Edited by sarge4267

Share this post


Link to post
Share on other sites

so you say without the dash?

well i did that and still same error

You named them "dash"...the \ i mean, remove them also from the other texture path.

See stage 7, there you see it is also absent. I guess you copied this from a BIS rvmat.

Share this post


Link to post
Share on other sites
You named them "dash"...the \ i mean, remove them also from the other texture path.

See stage 7, there you see it is also absent. I guess you copied this from a BIS rvmat.

well that's it you helped me:p..thanks man.

Now do you know how to create a scratched texture like the F-35B?

Edit:nvm thanks for your help!

Edited by sarge4267

Share this post


Link to post
Share on other sites

I just want to pop in and say that the first post in this thread is an excellent resource however there are some very important inaccuracies.

The smdi map (and I think also the as map) has more than one usable channel. The green channel is for your specular colour (your spec map), and the blue channel is for scalar information regarding specular power. The specular power channel allows you to control the relative roughness or glossiness of an object per pixel. BIS has also made it so that this map controls the relative clarity of the environment map in reflections, so a glass smooth (ie. all pixels set to 1 or pure white) will have a clear reflection while other values will give increasingly blurred reflection as they approach 0 (or pure black).

I think this information is very important, especially if you are making an object with more than one material type on it (like an m16, for example).

Share this post


Link to post
Share on other sites
Specular map is a complex bitmap. Each color chanel has its own purpose. You should understand well the way of calculating pixel colors in scene before you paint those textures.

As written in http://community.bistudio.com/wiki/ArmA:_RVMAT

value of each pixel is calculated with RVMAT values and engine lighting values.

Texture _SM has diffuse values in RED, specular in GREEN and, Specular power in BLUE chanel. _SMDI does not use RED chanel (better compression) GPU calculates those values automaticaly as Diffuse = 1 - Specular.

When you use specular map - diffuse, specular in RVMAT should be 1. Then paint B/W map with maximum specular and minimum specular values you imagine on surface. Than choose minimum (black) and maximum specular (white) values and change the bitmap levels to those values.

I think this is still the case isn't it?

The '_as' map only uses 1 channel according to texconvert.cfg. The green channel. All the others are swizzled to 1.

 class ambient_shadow
 {
   autoreduce=1;
   name = "*_as.*";
   format = "DXT1";
   enableDXT = 1;
   channelSwizzleR = "1"; 
   channelSwizzleG = "G"; 
   channelSwizzleB = "1";
   channelSwizzleA = "1"; 
   dynRange = 0;
   errorMetrics=Distance;
 };

Share this post


Link to post
Share on other sites

From what I've seen in ArmA2 textured _smdi r-white, g - black/white values of specularity, b - all white, no alpha.

Share this post


Link to post
Share on other sites
From what I've seen in ArmA2 textured _smdi r-white, g - black/white values of specularity, b - all white, no alpha.

Yip, that's right.

 class specular_diffuseinverse_map
 {
   name = "*_smdi.*";
   format = "DXT1";
   enableDXT = 1;
   channelSwizzleR = "1"; 
   channelSwizzleG = "G"; 
   channelSwizzleB = "B";
   channelSwizzleA = "1"; 
   dynRange = 0;
   errorMetrics=Distance;
 };

As you can see from the above excerpt from texconvert.cfg Red & Alpha are swizzled to 1. Green & Blue stay untouched.

As per Mr Sheep's post. Green is used for the specular amount and Blue is multiplied with the Specular Power from the .rvmat.

Additionally, Green is mixed with diffuse channels in the end by a factor of 1 - green channel value.

And, of course this is why the name of this texture is '_smdi' - 'specular map diffuse inverse'. Meaning it's a specular map and an overall 'washout' effect is applied to the final RGB channels in the form of 1-SpecularAmount.

It's a little hard to discern this in game and I've always just ignored this tidbit of information and just treated the green channel as being solely 'specular amount'.

Edited by Synide

Share this post


Link to post
Share on other sites

The AS maps in ArmA 2 use 2 channels: green and blue. I don't know what that does, but the fact remains.

I did extensive smdi testing with rvmats using procedural textures. Trust me, the blue channel affects the over all look of the model VERY MUCH.

Both the rvmat values for specular colour and specular power are multiplied by what you show in the smdi mat. The sliders in the material editor can then be used to fine tune the look of your model after the fact. And finally, it doesn't matter what is on the red channel. Set it all to 0 or 1 or anything else. It doesn't make a difference.

Share this post


Link to post
Share on other sites
The AS maps in ArmA 2 use 2 channels: green and blue. I don't know what that does, but the fact remains.

'_as' maps only use 1 channel. The green channel.

Look at the TexConvert.cfg excerpt I posted below for confirmation and look at many of the '_as' maps in the BIS content. There are a few spurious '_as' maps in their stuff that has things in other channels but I think these are most probably mistakes that one of their modellers has let through their quality control process.

In saying that, these sorts of assertions are just that assertions. Admittedly, they are born out of observation and testing but still.

It's pretty rare for a BI employee to actually turn up here (or the biki) and publically state exactly, verbatim how these things work.

I did extensive smdi testing with rvmats using procedural textures. Trust me, the blue channel affects the over all look of the model VERY MUCH.

That's nice, i'm not disputing whether the 'Blue' channel affects the overall look 'very much' or not. The specular power from the .rvmat is multiplied by the value in the 'blue' channel, so of course it affects the overall look 'very much'.

You're quite right to draw people's attention to it more as few people use it effectively.

I was simply qualifying your remarks with additional information as to what TexView2 & Pal2pace do to both '_smdi' & '_as' textures to coerce them in preparation for use in shaders.

It wasn't quite right in your initial post to say the green channel in an '_smdi' texture is for specular color. It does indeed influence specular color but, primarily it's for 'specular amount', it also effects specular colour by way of (1 minus 'specular amount') being multiplied by each of the RGB channels from the diffuse.

Both the rvmat values for specular colour and specular power are multiplied by what you show in the smdi mat. The sliders in the material editor can then be used to fine tune the look of your model after the fact.

That's accurate.

And finally, it doesn't matter what is on the red channel. Set it all to 0 or 1 or anything else. It doesn't make a difference.

Indeed, that's why I posted that excerpt from the texconvert.cfg file to support your assertions. It clearly illustrates to people what resultant values will be in '_smdi' & '_as' textures for the various channels.

Again, it is good that you draw attention to these things for others, as there are alot of people that don't seem to use many or any of these sorts of features for their content and they should, as you'll probably agree many of these little titillations are very cool.

Edited by Synide

Share this post


Link to post
Share on other sites

Another thing:

I would leave the red channel at zero for the smdi maps so as not to confuse what's going on when you're looking at them. Without the red in there you can tell by a glance what's going on in there without opening the channels up.

In the original post I was saying that no one should overlook the blue channel and that the original post should be updated to include information about it. It`s important, and I was emphasizing that. What the author does to cheat it is also important, because it`s good to find time saving tricks, but I think that a reference post should include complete information where possible... especially when the original post says, `as per ArmA, the red and blue channels are filled with white and the green channel contains all data`, which is patently false.

Edited by Max Power

Share this post


Link to post
Share on other sites
Another thing:

I would leave the red channel at zero for the smdi maps so as not to confuse what's going on when you're looking at them. Without the red in there you can tell by a glance what's going on in there without opening the channels up.

In your working .tga version or in the final .paa version?

In the working .tga version I'd agree, that's a good idea/rule of thumb.

But, forcing the red channel to zero in a final .paa version may not be a good idea. Have you tried it? Hmmm, I haven't. While it may still work satisfactorily within the shader, TexView & Pal2Pace are forcing it to 1 for a reason, the shader maybe expecting it to be 1 and it's probably better practice to leave it 'as is' in final .paa's. Might lead to bad habits of 'altering' .paa's after texview2/pal2pace have 'had their way with them'.

In saying that, I suspose if it doesn't appear to hinder anything and there was no dessenting voice from a BI modeller then...

Share this post


Link to post
Share on other sites

Good distinction. I was reading the instructional first post like it was talking about the working files.

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  

×