Road texturing

ArmA editing, missions, modeling, textures, terrains

Moderators: Lone Wolf, Snake Man

Snake Man
Commander-In-Chief
Posts: 9353
Joined: 2000-07-31 22:01:01
Gaming Interests: ArmA, ArmA 2, Falcon 4.0 and OFP.
Editing Interests: All, I (try) to edit everything.
Location: PMC

Road texturing

Post by Snake Man » 2008-08-05 07:42:20

About road texturing. I wanted to learn how BIS textured and setup their rvmats for roads, so I went into the roads.pbo and in data/ directory.

There we find road types of:
asf = asphalt (clean)
ces = dirt/gravel
kos = cobblestone
sil = asphalt (with white lane paintings)

First in the roads\asf6.p3d model you have the roads\data\asf_new_ca.tga texture with roads\data\asf.rvmat applied. The asf.rvmat looks like this:

Code: Select all

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, 1.0};
specular[] = {1.0, 1.0, 1.0, 0.0};
specularPower = 20.0;
renderFlags[] = {"Road"};
nextPass = "ca\roads\data\road-pass2.rvmat";
PixelShaderID = "NormalMapSpecularMap";
VertexShaderID = "NormalMap";

class Stage1
{
	texture = "ca\roads\data\asf_new_nohq.paa";
	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 Stage2
{
	texture = "ca\roads\data\asf_new_sm.paa";
	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};
	};
};
Now in the ces6.p3d model you have roads\data\ces_hned_ca.tga texture and roads\data\ces.rvmat applied. ces.rvmat looks like this:

Code: Select all

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, 1.0};
specular[] = {1.0, 1.0, 1.0, 0.0};
specularPower = 20.0;
nextPass = "ca\roads\data\road-pass2.rvmat";
PixelShaderID = "NormalMapSpecularMap";
VertexShaderID = "NormalMap";

class Stage1
{
	texture = "ca\roads\data\ces_hned_nohq.paa";
	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 Stage2
{
	texture = "ca\roads\data\ces_hned_sm.paa";
	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};
	};
};
In the kos6.p3d model you have roads\data\sil_kos_ca.tga texture and roads\data\sil_kos.rvmat applied. sil_kos.rvmat looks like this:

Code: Select all

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, 1.0};
specular[] = {1.0, 1.0, 1.0, 0.0};
specularPower = 20.0;
nextPass = "ca\roads\data\road-pass2.rvmat";
PixelShaderID = "NormalMapSpecularMap";
VertexShaderID = "NormalMap";

class Stage1
{
	texture = "ca\roads\data\sil_kos_nohq.paa";
	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 Stage2
{
	texture = "ca\roads\data\sil_kos_sm.paa";
	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};
	};
};
And finally in the sil6.p3d model you have roads\data\sil_new_ara_ca.tga texture and roads\data\sil_new_ara.rvmat applied. The sil_new_ara.rvmat looks like this:

Code: Select all

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, 1.0};
specular[] = {1.0, 1.0, 1.0, 0.0};
specularPower = 20.0;
renderFlags[] = {"Road"};
nextPass = "ca\roads\data\road-pass2.rvmat";
PixelShaderID = "NormalMapSpecularMap";
VertexShaderID = "NormalMap";

class Stage1
{
	texture = "ca\roads\data\sil_nohq.paa";
	uvSource = "tex";
	
	class uvTransform
	{
		aside[] = {5.0, 0.0, 0.0};
		up[] = {0.0, 5.0, 0.0};
		dir[] = {0.0, 0.0, 0.0};
		pos[] = {0.0, 0.0, 0.0};
	};
};

class Stage2
{
	texture = "ca\roads\data\sil_new_ara_sm.paa";
	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};
	};
};
As summary: all four road types have _NOHQ and _SM textures applied. Roads ces and kos are pretty much identical, they dont have the renderFlags[] = {"Road"}; in the rvmat, for reasons I have no clue about. Also asf class stage1 has this:

Code: Select all

		aside[] = {1.0, 0.0, 0.0};
		up[] = {0.0, 1.0, 0.0};
while sil_new_ara has the following values:

Code: Select all

		aside[] = {5.0, 0.0, 0.0};
		up[] = {0.0, 5.0, 0.0};
All this means that for our custom roads we should create _NOHQ normal maps and _SM specular maps (right?), then make RVMAT for the asf and sil roads to be pretty much identical with the stage1 difference and for ces and kos roads leave out the renderflags.

I dont claim to have anykind of experience or knowledge about this matter, this was all what I gathered from BIS example models and from the roads.pbo data directory, anyone can feel free to correct me if there is something wrong in these conclusions.
PMC Tactical Forum New User Registration please read new info here.

PMC since 1984

Editing knowledge, visit PMC Editing Wiki
The leading, most detailed and comprehensive modification made for the Vietnam War - Vietnam: The Experience homepage
View our videos in PMC Youtube channel

PMC Tactical forum Advanced Search is power.

"ALPHA BLACK TO PAPA BEAR. ALL RUSSIANS ARE TOAST. OVER."

Synide
2nd Lt
Posts: 76
Joined: 2003-11-18 19:14:51
Location: Wgtn, New Zealand

Post by Synide » 2008-08-05 13:29:28

All looks sound logic to me... however it's late where I am so I'll have to compare results tomorrow...

Code: Select all

renderFlags[]={"Road"};
bugger me !! i must be going blind & senile... i completely missed this... you may have just found the answer to an outstanding problem I've been having... really nice one matey.
oh, btw, this renderflag is undocumented in the rvmat biki page...

Who is online

Users browsing this forum: ClaudeBot [Bot] and 0 guests