Jump to content
Sign in to follow this  
Waterman

ARMA 2 textures in Visitor 3

Recommended Posts

Hey there, I've been following this Visitor tutorial: http://forums.bistudio.com/showthread.php?t=62725&highlight=Visitor+tutorial

I have also setup Visitor 3 to use ARMA2 objects and for buldozer etc.

I've started a project using OS Landranger based data and using Google Earth for creating a satellite image of the area im working on too (Took about 60 print screens at 1km to get it all lol)

Now I've got to the stage where I need to create a mask. The above tutorial uses 4 colours/textures:

Grass = Green RGB = 0.255.0

Sand = Yellow RGB = 255.255.0

Urban/Asphalt = Blue RGB = 0.0.255

Rock/Mountain = Red RGB = 255.0.0

However ARMA2 has 14 I believe:

Grass1

Grass2

GrassW1

GrassW2

Forest1

Forest2

MudGround

Field1

Field2

Grit1

Heather

Rock

Tarmac

Concrete

I was wondering, what RGB colours should I use in order to create the mask? Can I choose any and just define them in the Layers.cfg?

Also in the Layers.cfg example given in the tutorial, there are paths to RVMAT files for ARMA1 textures which need changed. In the ARMA2 chenerus_Data folder (equivalent of ARMA1 Data folder), there is any? Do they exist, if so where do I get them and if not, is there any other work around?

Thanks,

Hope it makes sence! :p

Share this post


Link to post
Share on other sites

Thanks, that helps a little to my understanding, but not get any further as those are for ARMA1.

When you un-binarize the config.bin you get a file called: CfgSurfaces.hpp

Inside:

// Generated by unRap v1.06 by Kegetys

class CfgSurfaces 

{

class Default {};


class Water {};



class CRGrass1 : Default {

		access = ReadOnly;

		files = "cr_trava1_*";

		rough = 0.11;

		dust = 0.1;

		soundEnviron = "grass";

		character = "CRGrassClutter";

		soundHit = "soft_ground";

		};



class CRGrass2 : Default {

		access = ReadOnly;

		files = "cr_trava2_*";

		rough = 0.11;

		dust = 0.1;

		soundEnviron = "grass";

		character = "CRTallGrassClutter";

		soundHit = "soft_ground";

		};



class CRGrassW1 : Default {

		access = ReadOnly;

		files = "cr_travad1_*";

		rough = 0.11;

		dust = 0.1;

		soundEnviron = "grass";

		character = "CRGrassWClutter";

		soundHit = "soft_ground";

		};



class CRGrassW2 : Default {

		access = ReadOnly;

		files = "cr_travad2_*";

		rough = 0.11;

		dust = 0.1;

		soundEnviron = "grass";

		character = "CRTallGrassWClutter";

		soundHit = "soft_ground";

		};



class CRForest1 : Default {

		access = ReadOnly;

		files = "cr_les1_*";

		rough = 0.2;

		dust = 0.2;

		soundEnviron = "forest";

		character = "CRForestMixedClutter";

		soundHit = "soft_ground";

		};



class CRForest2 : Default {

		access = ReadOnly;

		files = "cr_les2_*";

		rough = 0.2;

		dust = 0.15;

		soundEnviron = "forest";

		character = "CRForestFirClutter";

		soundHit = "soft_ground";

		};



class CRMudGround : Default {

		access = ReadOnly;

		files = "cr_pole_*";

		rough = 0.09;

		dust = 0.1;

		soundEnviron = "dirt";

		character = "SparseWeedsClutter";

		soundHit = "soft_ground";

		};



class CRField1 : Default {

		access = ReadOnly;

		files = "cr_oranice_*";

		rough = 0.15;

		dust = 0.25;

		soundEnviron = "dirt";

		character = "Empty";

		soundHit = "soft_ground";

		};



class CRField2 : Default {

		access = ReadOnly;

		files = "cr_strniste_*";

		rough = 0.13;

		dust = 0.3;

		soundEnviron = "dirt";

		character = "CRStubbleClutter";

		soundHit = "soft_ground";

		};



class CRGrit1 : Default {

		access = ReadOnly;

		files = "cr_sterk_*";

		rough = 0.1;

		dust = 0.25;

		soundEnviron = "gravel";

		character = "Empty";

		soundHit = "hard_ground";

		};



class CRHeather : Default {

		access = ReadOnly;

		files = "cr_vres_*";

		rough = 0.14;

		dust = 0.1;

		soundEnviron = "forest";

		character = "CRHeatherClutter";

		soundHit = "soft_ground";

		};



class CRRock : Default {

		access = ReadOnly;

		files = "cr_skala_*";

		rough = 0.2;

		dust = 0.07;

		soundEnviron = "rock";

		character = "Empty";

		soundHit = "hard_ground";

		};



class CRTarmac : Default {

		access = ReadOnly;

		files = "cr_asfalt_*";

		rough = 0.08;

		dust = 0.05;

		soundEnviron = "road";

		character = "Empty";

		soundHit = "hard_ground";

		};



class CRConcrete : Default {

		access = ReadOnly;

		files = "cr_beton_*";

		rough = 0.08;

		dust = 0.05;

		soundEnviron = "concrete_ext";

		character = "Empty";

		soundHit = "concrete";

		};

};

Some of the surfaces are the same as ARMA1, but there are also some new ones. It's the new ones like "vres" or "sterk" I need to know what colours to use.

Share this post


Link to post
Share on other sites

My understanding from ArmA1 was that your chosen mask colours were just that, whatever you chose for each surface type.

If you chose 'Deep Pink' for grass that was fine, and maybe 'Light Pink' for lighter grass ... and so on.

In other words there was no set colours to use as far as I can see, however, in ArmA1 the number of colours allowed in any one terrain cell was 4.

I'm not sure if this still applies to ArmA2.

This means that you could only denote 4 seperate surface types per cell on the mask.

Planck

Share this post


Link to post
Share on other sites

Ok manged to find the mask images for chenerus which confuses me more as there is only 5 colours used that I can tell:

RGB: 0,0,0

RGB: 255,0,0

RGB: 0,255,0

RGB: 0,0,255

RGB: 104,73,107

Could someone explain to me what the mask is for, because as far as I can tell by playing ingame and comparing to the mask images, each colour can have more than 1 kind of texture and sound (when you run on it). My head hurts.

EDIT

My understanding from ArmA1 was that your chosen mask colours were just that, whatever you chose for each surface type.

If you chose 'Deep Pink' for grass that was fine, and maybe 'Light Pink' for lighter grass ... and so on.

In other words there was no set colours to use as far as I can see, however, in ArmA1 the number of colours allowed in any one terrain cell was 4.

I'm not sure if this still applies to ArmA2.

This means that you could only denote 4 seperate surface types per cell on the mask.

Planck

Sorry never saw your post before posting mine.

Thanks Planck. It would appear the maximum number of colours allowing in a terrian cell is now 5? Here is a single image from the mask for Chenerus (click thumbnail for larger version):

3784136701_d35a19201e_t.jpg

Is my understanding correct?

Edited by Waterman

Share this post


Link to post
Share on other sites

A2 supports 6 colors per cell.

The color system is to be found in the rvmat.

Not sure how to read it. Maybe its simple RGB.

Just take a look.

Share this post


Link to post
Share on other sites
A2 supports 6 colors per cell.

The color system is to be found in the rvmat.

Not sure how to read it. Maybe its simple RGB.

Just take a look.

How did you find out it supports 6 colours?

Also the RVMAT files (in the Chenerus_Data_Layers.pbo, not the Chenerus_Data.pbo) wont open using the BIS material editor which came as park of the tool pack. I did manage to use Kegetys unRAP programme to open one which gives me these files:

p_000-000_l04_l07_l10.cpp

Stage0.hpp

Stage1.hpp

Stage2.hpp

Stage3.hpp

Stage4.hpp

Stage5.hpp

Stage6.hpp

Stage7.hpp

Stage8.hpp

TexGen1.hpp

TexGen2.hpp

TexGen3.hpp

TexGen4.hpp

Inside p_000-000_l04_l07_l10.cpp:

// p_000-000_l04_l07_l10.rvmat - 14:35:33 08/03/09, generated in 0.04 seconds
// Generated by unRap v1.06 by Kegetys
// Separate rootclasses: Enabled, Automatic comments: Enabled

ambient[] = {0.9, 0.9, 0.9, 1.0};
diffuse[] = {0.9, 0.9, 0.9, 1.0};
forcedDiffuse[] = {0.02, 0.02, 0.02, 1.0};
emmisive[] = {0.0, 0.0, 0.0, 0.0};
specular[] = {0.0, 0.0, 0.0, 0.0};
specularPower = 0.0;
#include "Stage0.hpp"
#include "Stage1.hpp"
#include "TexGen3.hpp"
#include "TexGen4.hpp"
#include "TexGen0.hpp"
#include "TexGen1.hpp"
#include "TexGen2.hpp"
PixelShaderID = "TerrainX";
VertexShaderID = "Terrain";
#include "Stage2.hpp"
#include "Stage3.hpp"
#include "Stage4.hpp"
#include "Stage5.hpp"
#include "Stage6.hpp"
#include "Stage7.hpp"
#include "Stage8.hpp"

???

Also still need to find rvmat files for chenerus textures (ie. trava1, trava2 etc), there are only ones for the chenerus mask images. This is the only way to get the correct values to use apart from guessing.

---------- Post added at 02:08 PM ---------- Previous post was at 12:55 PM ----------

BTW, has nobody else tried to use ARMA2 detail textures yet?

Edited by Waterman

Share this post


Link to post
Share on other sites

Actually the mask tells you the color code, doesn't it? :P

Check the stages. They assign the ground textures.

Best to find areas of only one/few colors and check the terrain.

in the ca config (or all in one) you can check all existing cfgClutterTypes (or similar name)

Share this post


Link to post
Share on other sites

I did check the stages but the only one that hints at RGB is Stage 2.

Stage0:

class Stage0 {
texture = "ca\chernarus\data\layers\s_003_028_lco.paa";
texGen = 3;
};

Stage1:

class Stage1 {
texture = "ca\chernarus\data\layers\m_003_028_lca.paa";
texGen = 4;
};

Stage 2:

class Stage2 {
texture = "#(rgb,1,1,1)color(0.5,0.5,0.5,1,cdt)";
texGen = 0;
};

Stage3:

class Stage3 {
texture = "ca\chernarus\data\cr_sterk_detail_nopx.paa";
texGen = 1;
};

Stage4:

class Stage4 {
texture = "ca\chernarus\data\cr_sterk_detail_co.paa";
texGen = 2;
};

Stage5:

class Stage5 {
texture = "ca\chernarus\data\cr_les2_detail_nopx.paa";
texGen = 1;
};

Stage6:

class Stage6 {
texture = "ca\chernarus\data\cr_les2_detail_co.paa";
texGen = 2;
};

Stage7:

class Stage7 {
texture = "ca\chernarus\data\cr_vres_detail_nopx.paa";
texGen = 1;
};

Stage8:

class Stage8 {
texture = "ca\chernarus\data\cr_vres_detail_co.paa";
texGen = 2;
};

I can post the TexGen too if it helps?

Share this post


Link to post
Share on other sites

Well this is a complicated example.

If you start with a mask part that has only one color on it, it should have only one

stage / or one unique texture defined in the given rvmat. That way you can see:

color X = texture Y (defined in the stage).

This way you can work you way up, step by step.

Share this post


Link to post
Share on other sites

OK think I got it worked out. Seems to be working I think after making some rvmat files for the detail textures:

3806987959_060e18f10a_o.jpg

The problem is now with the Satellite textures in the distance not displaying properly, at least in Buldozer:

3807804276_35393140e1_o.jpg

Any idea why this would be? How can I fix this?

Here is a picture of my project parameters if it helps:

3806987887_97da2da7a7_o.jpg

Text reads:

Terrain grid size: 4096 x 4096

Terrian cell size (meters): 5.0

Terrain size (meters): 20480.0 x 20480.0

Satellite image details:

Image size: 20480 x 20480

Image resolution (m/pixel): 1.0

Segment size (pixels): 512

Segment size (meters): 512.000

Segment overlap (pixels): 16

Segment overlap (meters): 16.000

Then Satellite Segment for Game is 96.

Edited by Waterman

Share this post


Link to post
Share on other sites

Tried it ingame and textures are the same? Could it be the file size or just something like the config.cpp?

Also noticed that all the sea areas have lots of triangles, like a small grid with diagonal lines when when on the map?

Share this post


Link to post
Share on other sites

Unfortunately, Like the thread about trying to use 'new' shaders in material files the same applies here. (Well, with twists of course)

In a rush so don't have time to explain every detail, but suffice to say you really need the 'new' tools if you want to use 'new' features.

You could get away with using the same 'A1' island setup with the A1 tools as if you were producing the content for A1 and have it work resonably in A2, but not optimally.

You should really hang-fire till the A2 tools come out I'd suggest.

Share this post


Link to post
Share on other sites

I having same problem with a new terain, but did not have same problem with my test terrain, will look at what is different and report back if I get any luck

Share this post


Link to post
Share on other sites

Made quite a number of changes today.

My 6.4k test island has no problems like this yet my 10km has the problem...

Share this post


Link to post
Share on other sites

Have installed new BI Tools now, but still have all the same problems. :(

Did they actually change anything in Visitor? It looks exactly the same. Only difference I have noticed is when importing satellite and mask images... it asks for the config first now rather than in the middle.

Share this post


Link to post
Share on other sites

Did you use the new binarize yet?

(textures, rvmat, etc)

Share this post


Link to post
Share on other sites

I am totaly confused about the handling of A2 Textures, how does it work? Can I go the same way known of ArmA1 and get the same RVMAT (ArmA1) files together with the new ArmA2 Textures in one produktfolder like this: Islandname/Data/Texturename and its RVMAT file? Some better explanations about how to get it worked would be apriciated, would it also be possible to get an example here in this form, which represents how to get an Island ingame? I made such an example for ArmA1 and that helped many peoples.

Share this post


Link to post
Share on other sites

In terms of textures for worlds, the paa are just far better compressed.

Anything else - doesn't seem changed much, if at all.

Of course you have six layers / different colors per mask cell, as well as the midRangeTexture.

If your textures are tga, v3 should convert them correctly anyway.

If you already have paa, use pal2pace to convert them.

Very easy to do via command line:

Pal2PacE x:\Test\*.paa

Make sure to backup your paa first and this will overwrite the source files.

Just check the readme of tex view 2. It is all in there. :)

WRP and rvmat files should be binarized. BinPBO makes this a child's play,

as long as you have a proper P:\ setup.

Here is some advanced details on this topic:

CMB: DevelopmentSetup

And/or read Sy's tut.

More good info at the Community Modding Bible.

Edited by kju

Share this post


Link to post
Share on other sites

I managed to fix all my problems I think now. Just need to do some tweeking.

Ingame picture of my island:

3823324521_bf55827743_o.jpg

I started again from scratch.

Terrain grid size: 4096x4096
Terrain cell size (meters): 10
Terrain size (meters): 40960 x 40960

Then in satellite grid calulator:

[u]Satellite Image[/u]
Image size (pixels): 20480
Image resolution (m/pixel): 2
Segment size (pixels): 512
Segment size (meters): 1024
Segment overlap (pixels): 16
Segment overlap (meters): 32

[u]Satellite Grid[/u]
Calculated: 99.2
Proposed: 96

Segment overlap proposed: 32.0

Then in the texture layers dialogue, clicked "Base (active)" then "edit". Then changed texture size from 10.0x10.0 to 40.0x40.0. This is what solved the previous problem with placing objects and also made the satellite and mask images load a lot quicker. It might be what fixed the texture problem as well in the pictures I showed.

However it makes the detail textures too large ingame, so I think I need to make it 20.0x20.0 maybe or adjust the rvmat files or something.

I also pointed buldozer to load from buldozer.exe in the p:\ drive rather than arma2.exe

The road builder seems to work for me using the new road files too.:)

Share this post


Link to post
Share on other sites

Good to hear Waterman!

Cheers for the guide.

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  

×