Printable Version of Topic

Click here to view this topic in its original format

Armed Assault Info Forums _ Addons - Work in progress _ RVMATs files... Impossible to open?!

Posted by: SGJackson Jun 20 2010, 05:58

In the tutorial of visitor3, http://www.flashpoint1985.com/cgi-bin/ikonboard311/ikonboard.cgi?;act=ST;f=77;t=68535 , sais "open a RVMAT and change the path to ... "
the notepad is USELESS!!

I tried with: Firefox, Adobe Reader, Microsoft Exel, Microsoft Word, Pain, Notepad, Adobe Photoshop, 3Ds Max Desing 2010, Snagit Editor...

don't take this as joke.... i really tried those programs sad.gif


After reading that tutorial i made 1 sucsessfull isalnd with objects and stuff... now i'm making a serious small island witch is going REALLY good so far... but in the 1st one i didn't add any textures 'cause of the RVMATs problem and 'cause the guy losted me in the way...

I'd appreciate someone to tell me how to open it so i can change the directory of it as in the tutorial...

What i REALLY need is someone that has experience on this and knows how to add textures properly to my island... i really don't need my island to have the textures in map... i just want to see the textures in-game, not in-map.

Once i end this i'll gladly upload my map with the pretty textures i know SOMEONE will SOMEDAY teach me to apply smile.gif

Best Regards, SGJackson!

Posted by: D@V£ Jun 21 2010, 11:36

RVMAT files extracted from PBOs are usually binarized, so opening them with notepad isn't going to get you anywhere.

If you've downloaded the tools pack, you should have an application called "material editor", that'll be able to open rvmat files, though you can edit them with notepad if you find that easier. Here's a sample (unbinarized) rvmat:

CODE
ambient[]={1.000000,1.000000,1.000000,1.000000};
diffuse[]={1.000000,1.000000,1.000000,1.000000};
forcedDiffuse[]={0.000000,0.000000,0.000000,1.000000};
emmisive[]={0.000000,0.000000,0.000000,1.000000};
specular[]={0.000000,0.000000,0.000000,1.000000};
specularPower=1.000000;
PixelShaderID="NormalMapMacroASSpecularMap";
VertexShaderID="NormalMapAS";
class Stage1
{
    texture="HSO_SLA\tex\sla_soldier_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="#(argb,8,8,3)color(0,0,0,0)";
    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 Stage3
{
    texture="#(argb,8,8,3)color(1,1,1,1)";
    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="#(argb,8,8,3)color(1,1,1,1)";
    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};
    };
};


This will do for pretty much for any general non-metallic surface. The only thing you really need to change is "class stage1", to point to your own nohq texture.

For metal surfaces, or anything shiny (ie, ice, polished wood etc.), You'll want something more like this:
CODE
ambient[]={1.000000,1.000000,1.000000,1.000000};
diffuse[]={1.000000,1.000000,1.000000,1.000000};
forcedDiffuse[]={0.000000,0.000000,0.000000,0.000000};
emmisive[]={0.000000,0.000000,0.000000,1.000000};
specular[]={0.980000,1.000000,0.950000,1.000000};
specularPower=50.000000;
PixelShaderID="NormalMapSpecularDIMap";
VertexShaderID="NormalMap";
class Stage1
{
    texture="HSO_SLA\tex\Especa_helmet_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="HSO_SLA\tex\Especa_helmet_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};
    };
};

With this one, change the path to in class stage1 to your own nohq texture, and the path in class stage2 to your own smdi texture.

Normal and shinyness textures are otherwise treated pretty much the same as colour textures. If you look around on the internet, you'll probably be able to find a program to generate normal maps (nohq textures), it's good practice to keep them in the same directory as your colour textures, and have the _nohq extension.

Some material files also reference _as textures, which apply some shading to the model, I don't tend to use these though, because I'm lazy! boppin2.gif (The difference with and without them is very minor, and if you make any minor modification to the model they have to be completely redone! ohnoo.gif )

Posted by: SGJackson Jun 21 2010, 16:41

Huh, i already have the tools pack... the material editor pops up an error when i try to open a RVMAT with it.

And, in the tut the guy neven mentions a smdi file :S

He says that i only need these 4:

_detail_co.paa

_mco.paa

_rvmat.paa

_detail_nohq.paa

If you could explain me what each one is for smile.gif

Thanks for answering! It's been a looong time noone answered me sad.gif

Posted by: D@V£ Jun 21 2010, 17:22

I'm not too sure what this other tutorial is (and I've never seen the _mco suffix), though a quick run down of the types of textures you should have:

1. Colour textures (designated with the suffix _co)
Applied directly in oxygen. They're the base on which all materials are applied.

2. Colour textures with transparencies (designated with the suffix _ca)
As above, but note that any texture you wish to have transparencies on must have the _ca suffix, otherwise transparent areas won't be rendered correctly.

3. Overlay textures (designated with the suffix _mc)
Applied on to of the colour texture, too add extra details. Referenced in a material file, which is then applied in oxygen.

4. Normal Maps (designated with the suffix _nohq)
Define the normals (lighting) of an object, they're used to make the otherwise flat colour textures appear rough. Attempting to create normal maps by hand is highly in-advised, you're better off using software to generate them. Referenced in a material file, which is then applied in oxygen.

5. Shading Maps (designated with the suffix _as)
Define the shading of the model. With white being completely unshaded, and magenta (r=255,g=0,b=255) being completely shaded. Referenced in a material file, which is then applied in oxygen.

6. Shinyness maps (don't know the proper name for these! Designated with the suffix _smdi)
Define how much light a surface will reflect. I'm not entirely sure what the correct specifications for these textures are. I use r=255,g=0,b=240 for unreflective surfaces, and r=255,b=25,g=255 for reflective surfaces, which seems to work pretty well.

7. _dt suffix
Don't know what this does.

8. _no suffix
Looks to be an old convention for normal maps, use _nohq.

The rvmat isn't a texture file per-say, it's more like a config. It just references other textures, along with a few constants, then is applied in oxygen as a composite of these.

Posted by: SGJackson Jun 21 2010, 18:51

Huhm...

Is the RVMAT REALLY necessary?

I mean, couldn't i make a .cpp or a .hpp config file?

it must be .RVMAT?

Posted by: D@V£ Jun 22 2010, 11:29

Materials have to be stored as rvmats, and can only be applied to a model in oxygen when in this format. It might seem complex now, but once you get your head around it, it's actually pretty simple smile.gif

Posted by: SGJackson Jun 22 2010, 17:53

Bah... my head ran out of gas long time ago sad.gif

But when i get to a gas station (intresting stuff that calls my attemption) i'll get back on the road.

Thanks for all your replies!

Best Regards, SGJackson!

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)