User Tools

Site Tools


arma:texturing

This is an old revision of the document!


Texturing

For texturing you can use things such as Adobe Photoshop, Paint Shop Pro, Gimp or virtually any paint program.

You should use the ArmA Texture Naming Rules always when texturing.

Panda[PL] said in BIS forums: No, don't use different textures for each lod. In ArmA if texture is not needed in high resolution anymore (because of distance or low framerate) the engine automatically scales it down in memory (dropps out every one in two pixels, that's why all textures need to have dimensions of powers of two). On the other hand loading a texture from HDD or from ram into the video memory is performance consuming and will cause FPS dropps. So use the same txture for every LOD and let ArmA worry about it.

BIS Ohara said in BIS forums: Drop of FPS in vegetation is caused by overdaw, it means that grafic card is not able to draw so many pixels that scene needs. When GC draw scene, it automatically cut hiden pixels, BUT only if this pixels are not alphatransparent. Vegetation is builded from polygons with some opacity textures, so this cuting (early Z test on HW) not work here. There is no simple solution, better performance will be with low shading detail settings (simplified pixel shader), but overdraw is still there. Also using of worst LODs will not help so match, because less polygons means worst tree shape aproximation and final surface (what is most important for overdraw reduction) will be similar. We are still woring on some research in this area.

Overview

We can't point o2 to rvmat files, or even use the stock textures (texture name too long). Right now basically you apply the texture like normal, then in the units config you make a CfgTextureToMaterial entry for each texture.

class CfgTextureToMaterial
{
            class texture1
            {
                         textures[] =  {"project\data\texture1.paa"};
                         material = "#texture1";
            };
};

Then you define a CfgMaterials entry for it, this is in the same format as the rvmat files, there might be a way to link it to an external rvmat, I haven't tried though…

class CfgMaterials
{
            class texture1
            {
                         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[] = {1, 1, 1, 1.000000};
                         specularPower = 100;
                         PixelShaderID = "NormalMapSpecularDIMap";
                         VertexShaderID = "NormalMap";
                         class Stage1
                         {
                                      texture = "project\data\texture1_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 = "project\data\texture1_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};
                                      };
                         };
            };
};

the _nohq texture is a tangent space normal map, and the _smdi is the specular map. Specular maps are grey scale images that are combined with 2 white greyscale maps into an rgb image. The spec maps go in the green channel, I'm not sure what the other channels do. Anyways, thats all there is to making the various layers.

how to make an SMDI specular map out of my grayscale ones. FYI, grab the grayscale one, put it in a layer on top of a layer of just magenta, and then set the top layer to 'screen'. Works perfectly. The only other trick was cranking the NVIDIA normal map plugin way up to get some really visible details.

Specular Maps

More details on specular maps read here

Normal Maps

More details on normal maps read here

Merging Textures

Merging textures in O2 is possible, read here

arma/texturing.1192802183.txt.gz · Last modified: 2007-10-19 13:56 (external edit)