Jump to content
TCGM

(SOLVED) class CfgGlasses: how can I make more textures for the same model?

Recommended Posts

Hello everyone:
I need help deciphering what I am doing wrong when setting up my new balaclava.
I already made several new textures for the vanilla arma3 balaclavas previously without problems.
 

class CfgPatches
{
	class TCGM_BanBal01
	{
		units[]={};
		weapons[]=
		{
			"TCGM_BalaclavaTI_JapR",
			"TCGM_BalaclavaTI_Skul",
			"TCGM_BalaclavaTI_SkulArdiDig"
		};
		requiredVersion=0.1;
		requiredAddons[]={"A3_Characters_F"};
		author="TCGM";
	};
};
class CfgGlasses
{
	class None;
	class TCGM_BalaclavaTI_JapR: None
	{
		author="TCGM";
		_generalMacro="TCGM_BalaclavaTI_JapR";
		scope=2;
		scopeCurator=2;
		scopeArsenal=2;
		displayName="$STR_TCGM_BB1SBHanRed";
		faction="TCGM_SF";
		model="\A3\Characters_F_Exp\BLUFOR\G_Balaclava_TI_F.p3d";
		picture="\TCGM_BanBal01\Textures\ui\TCGM_icon_G_Balaclava_TI_M_blk_F_ca.paa";
		hiddenSelections[]=
		{
			"camo"
		};
		hiddenSelectionsTextures[]=
		{
			"\TCGM_BanBal01\Textures\BtiTCGM\TCGM_Balaclava_TI_JapR_co.paa"
		};
		identityTypes[]={};
		mass=6;
	};
	class TCGM_BalaclavaTI_Skul: TCGM_BalaclavaTI_JapR
	{
		author="TCGM";
		_generalMacro="TCGM_BalaclavaTI_Skul";
		displayName="$STR_TCGM_BB1SBSkBlk";
		faction="TCGM_SF";
		picture="\TCGM_BanBal01\Textures\ui\TCGM_icon_G_Balaclava_TI_M_blk_F_ca.paa";
		hiddenSelections[]=
		{
			"camo"
		};
		hiddenSelectionsTextures[]=
		{
			"\TCGM_BanBal01\Textures\BtiTCGM\TCGM_Balaclava_TI_Skul_co.paa"
		};
	};
	class TCGM_BalaclavaTI_SkulArdiDig: TCGM_BalaclavaTI_JapR
	{
		author="TCGM";
		_generalMacro="TCGM_BalaclavaTI_SkulAridDig";
		displayName="$STR_TCGM_BB1SBSkDigAr";
		faction="TCGM_SF";
		picture="\TCGM_BanBal01\Textures\ui\TCGM_icon_G_Balaclava_TI_M_hex_F_ca.paa";
		hiddenSelections[]=
		{
			"camo"
		};
		hiddenSelectionsTextures[]=
		{
			"\TCGM_BanBal01\Textures\BtiTCGM\TCGM_Balaclava_TI_SkulHex_co.paa"
		};
	};
};

 

Now I am starting to make my own models and have been successful in virtually the entire process... I have the new balaclava in the game working properly, with the default texture that I have embedded in the model. But I could not add a second texture as I did with vanilla balaclavas before. A second balaclava appears in the game but with the same texture as the first.
 

class CfgPatches
{
	class TCGM_BanBal02
	{
		units[]={};
		weapons[]=
		{
			"TCGM_Balaclava_Blk_Scrp"
			"TCGM_Balaclava_Blk_NoMask",
		};
		requiredVersion=0.1;
		requiredAddons[]={"A3_Characters_F"};
		author="TCGM";
	};
};

class CfgGlasses
{
	class None;
	class TCGM_Balaclava_Blk_Scrp: None
	{
		author="TCGM";
		_generalMacro="TCGM_Balaclava_Blk_Scrp";
		scope=2;
		scopeCurator=2;
		scopeArsenal=2;
		displayName="$STR_TCGM_BB1SBBlkScrp";
		model="\TCGM_BanBal01\Models\TCGM_Balaclava_Blk_Scrp.p3d";
		picture="\TCGM_BanBal01\Textures\ui\TCGM_icon_G_Balaclava_TI_M_blk_F_ca.paa";
		hiddenSelections[]=
		{
			"camo"
		};
		hiddenSelectionsTextures[]=
		{
			"\TCGM_BanBal01\Textures\BalTCGM\TCGM_Balaclava_Blk_Scrp_co.paa"
		};
		identityTypes[]={};
		mass = 7;
		faction="TCGM_SF";
	};

	class TCGM_Balaclava_Blk_NoMask: TCGM_Balaclava_Blk_Scrp
	{
		author="TCGM";
		_generalMacro="TCGM_Balaclava_Blk_NoMask";
		displayName="$STR_TCGM_BB1SBBlk";
		picture="\TCGM_BanBal01\Textures\ui\TCGM_icon_G_Balaclava_TI_M_blk_F_ca.paa";
		hiddenSelectionsTextures[]=
		{
			"\TCGM_BanBal01\Textures\BalTCGM\TCGM_Balaclava_Blk_co.paa"
		};
		identityTypes[]={};
		mass = 7;
	};
};

 

I made my model in blender from scratch, configured the texture and materials there and exported the work to the p3d format.


https://imgur.com/RjPv1Za

In Object Builder I added some LOD (level of detail) layers, like "Geometry" and I add the property "autocenter" with value "0"

https://imgur.com/vfWnuKh

I am sure there has to be a way to add a new balaclava using the same model with a new texture... Because I did it with the vanilla ones.

Here is my file of model materials.
TCGM_Balaclava_Blk_Scrp.rvmat

class StageTI
{
	texture="#(argb,8,8,3)color(0,0,0,0)";
};
ambient[]={1,1,1,1};
diffuse[]={1,1,1,1};
forcedDiffuse[]={0,0,0,0};
emmisive[]={0,0,0,1};
specular[]={0.1,0.1,0.1,1};
specularPower=20;
PixelShaderID="Super";
VertexShaderID="Super";
class Stage1
{
	texture="TCGM_BanBal01\Textures\BalTCGM\TCGM_Balaclava_Blk_Scrp_nohq.paa";
	uvSource="tex";
	class uvTransform
	{
		aside[]={1,0,0};
		up[]={0,1,0};
		dir[]={0,0,0};
		pos[]={0,0,0};
	};
};
class Stage2
{
	texture="#(argb,8,8,3)color(0.5,0.5,0.5,1,DT)";
	uvSource="tex";
	class uvTransform
	{
		aside[]={1,0,0};
		up[]={0,1,0};
		dir[]={0,0,0};
		pos[]={0,0,0};
	};
};
class Stage3
{
	texture="#(argb,8,8,3)color(0,0,0,0,MC)";
	uvSource="tex";
	class uvTransform
	{
		aside[]={1,0,0};
		up[]={0,1,0};
		dir[]={0,0,0};
		pos[]={0,0,0};
	};
};
class Stage4
{
	texture="TCGM_BanBal01\Textures\BalTCGM\TCGM_Balaclava_Blk_Scrp_as.paa";
	uvSource="tex";
	class uvTransform
	{
		aside[]={1,0,0};
		up[]={0,1,0};
		dir[]={0,0,0};
		pos[]={0,0,0};
	};
};
class Stage5
{
	texture="TCGM_BanBal01\Textures\BalTCGM\TCGM_Balaclava_Blk_Scrp_smdi.paa";
	uvSource="tex";
	class uvTransform
	{
		aside[]={1,0,0};
		up[]={0,1,0};
		dir[]={0,0,0};
		pos[]={0,0,0};
	};
};
class Stage6
{
	texture="#(ai,64,64,1)fresnel(2,0.5)";
	uvSource="none";
};
class Stage7
{
	texture="a3\data_f\env_land_ca.paa";
	uvSource="tex";
	class uvTransform
	{
		aside[]={1,0,0};
		up[]={0,1,0};
		dir[]={0,0,0};
		pos[]={0,0,0};
	};
};


Here is my "model.cfg" file

 

 

class CfgSkeletons
{
	class Default
	{
		isDiscrete = 1;
		skeletonInherit = "";
		skeletonBones[] = {};
	};
	class OFP2_ManSkeleton
	{
		isDiscrete = 0;
		skeletonInherit = "";
		skeletonBones[] =
		{
			"Pelvis","",
			"Spine","Pelvis",
			"Spine1","Spine",
			"Spine2","Spine1",
			"Spine3","Spine2",
			"Camera","Pelvis",
			"weapon","Spine1",
			"launcher","Spine1",
			
			// Head skeleton in hierarchy
			"neck","Spine3",
			"neck1","neck",
			"head","neck1",
			
			// New facial features
			"Face_Hub","head",
			"Face_Jawbone","Face_Hub",
			"Face_Jowl","Face_Jawbone",
			"Face_chopRight","Face_Jawbone",
			"Face_chopLeft","Face_Jawbone",
			"Face_LipLowerMiddle","Face_Jawbone",
			"Face_LipLowerLeft","Face_Jawbone",
			"Face_LipLowerRight","Face_Jawbone",
			"Face_Chin","Face_Jawbone",
			"Face_Tongue","Face_Jawbone",
			"Face_CornerRight","Face_Hub",
			"Face_CheekSideRight","Face_CornerRight",
			"Face_CornerLeft","Face_Hub",
			"Face_CheekSideLeft","Face_CornerLeft",
			"Face_CheekFrontRight","Face_Hub",
			"Face_CheekFrontLeft","Face_Hub",
			"Face_CheekUpperRight","Face_Hub",
			"Face_CheekUpperLeft","Face_Hub",
			"Face_LipUpperMiddle","Face_Hub",
			"Face_LipUpperRight","Face_Hub",
			"Face_LipUpperLeft","Face_Hub",
			"Face_NostrilRight","Face_Hub",
			"Face_NostrilLeft","Face_Hub",
			"Face_Forehead","Face_Hub",
			"Face_BrowFrontRight","Face_Forehead",
			"Face_BrowFrontLeft","Face_Forehead",
			"Face_BrowMiddle","Face_Forehead",
			"Face_BrowSideRight","Face_Forehead",
			"Face_BrowSideLeft","Face_Forehead",
			"Face_Eyelids","Face_Hub",
			"Face_EyelidUpperRight","Face_Hub",
			"Face_EyelidUpperLeft","Face_Hub",
			"Face_EyelidLowerRight","Face_Hub",
			"Face_EyelidLowerLeft","Face_Hub",
			"EyeLeft","Face_Hub",
			"EyeRight","Face_Hub",			
			
			// Left upper side
			"LeftShoulder","Spine3",
			"LeftArm","LeftShoulder",
			"LeftArmRoll","LeftArm",
			"LeftForeArm","LeftArmRoll",
			"LeftForeArmRoll","LeftForeArm",
			"LeftHand","LeftForeArmRoll",
			"LeftHandRing","LeftHand",
			"LeftHandRing1","LeftHandRing",
			"LeftHandRing2","LeftHandRing1",
			"LeftHandRing3","LeftHandRing2",
			"LeftHandPinky1","LeftHandRing",
			"LeftHandPinky2","LeftHandPinky1",
			"LeftHandPinky3","LeftHandPinky2",
			"LeftHandMiddle1","LeftHand",
			"LeftHandMiddle2","LeftHandMiddle1",
			"LeftHandMiddle3","LeftHandMiddle2",
			"LeftHandIndex1","LeftHand",
			"LeftHandIndex2","LeftHandIndex1",
			"LeftHandIndex3","LeftHandIndex2",
			"LeftHandThumb1","LeftHand",
			"LeftHandThumb2","LeftHandThumb1",
			"LeftHandThumb3","LeftHandThumb2",
			
			// Right upper side
			"RightShoulder","Spine3",
			"RightArm","RightShoulder",
			"RightArmRoll","RightArm",
			"RightForeArm","RightArmRoll",
			"RightForeArmRoll","RightForeArm",
			"RightHand","RightForeArmRoll",
			"RightHandRing","RightHand",
			"RightHandRing1","RightHandRing",
			"RightHandRing2","RightHandRing1",
			"RightHandRing3","RightHandRing2",
			"RightHandPinky1","RightHandRing",
			"RightHandPinky2","RightHandPinky1",
			"RightHandPinky3","RightHandPinky2",
			"RightHandMiddle1","RightHand",
			"RightHandMiddle2","RightHandMiddle1",
			"RightHandMiddle3","RightHandMiddle2",
			"RightHandIndex1","RightHand",
			"RightHandIndex2","RightHandIndex1",
			"RightHandIndex3","RightHandIndex2",
			"RightHandThumb1","RightHand",
			"RightHandThumb2","RightHandThumb1",
			"RightHandThumb3","RightHandThumb2",
			
			// Left lower side
			"LeftUpLeg","Pelvis",
			"LeftUpLegRoll","LeftUpLeg",
			"LeftLeg","LeftUpLegRoll",
			"LeftLegRoll","LeftLeg",
			"LeftFoot","LeftLegRoll",
			"LeftToeBase","LeftFoot",
			
			// Right lower side
			"RightUpLeg","Pelvis",
			"RightUpLegRoll","RightUpLeg",
			"RightLeg","RightUpLegRoll",
			"RightLegRoll","RightLeg",
			"RightFoot","RightLegRoll",
			"RightToeBase","RightFoot"
		};
		// location of pivot points (local axes) for hierarchical animation
		pivotsModel="A3\anims_f\data\skeleton\SkeletonPivots.p3d";
	};
};

class CfgModels
{
	class Default
	{
		sectionsInherit="";
		sections[] = {};
		skeletonName = "";
	};

	class ArmaMan: Default
	{
		htMin = 60;          // Minimum half-cooling time (in seconds)
		htMax = 1800;        // Maximum half-cooling time (in seconds)
		afMax = 30;          // Maximum temperature in case the model is alive (in celsius)
		mfMax = 0;           // Maximum temperature when the model is moving (in celsius)
		mFact = 1;           // Metabolism factor - number from interval <0, 1> (0 - metabolism has no influence, 1 - metabolism has full influence (no other temperature source will be considered)).
		tBody = 37;  // Metabolism temperature of the model (in celsius)

		sections[] =
		{
			"osobnost","Head_Injury","Body_Injury","l_leg_injury","l_arm_injury","r_arm_injury","r_leg_injury", "injury_body", "injury_legs", "injury_hands",
			"clan","clan_sign","Camo","CamoB","Camo1","Camo2","personality","hl", "injury_head", "insignia", "ghillie_hide"
		};
		skeletonName = "OFP2_ManSkeleton";
	};

	class TCGM_Balaclava_Blk_Scrp: ArmaMan
	{
		sections[] = 
		{		
		 "camo"
		};
	};	
};

 


Please Help me to find the solution.
Thanks.

https://imgur.com/bIXaasm

 

Share this post


Link to post
Share on other sites

Do you have the "camo" selection in your model.cfg?

  • Thanks 1

Share this post


Link to post
Share on other sites

Can you helpme with that??

I add my "model.cfg" file on the post... And I add the "camo" on "sections" Then I test it again but I still  see two balaclavas with the same texture on the game.


What should I add? What am i missing?

 

Share this post


Link to post
Share on other sites

I can't help you any further beyond this point, my question just seemed the most obvious considering your balaclava is not picking up a new texture through hiddenselections.

Have you asked on the Arma 3 Discord, you might get more immediate help there. :icon_biggrin:  

  • Thanks 1

Share this post


Link to post
Share on other sites

Does your model itself have a camo selection? Should be the entire model

 

  • Thanks 1

Share this post


Link to post
Share on other sites
39 minutes ago, Mr H. said:

Does your model itself have a camo selection? Should be the entire model 

Maybe not... Do you see all the pictures on the links I post?
 

If the Arma 3 plug-in for Blender did not do so automatically at some time. Then I don't have it. Do you know how to do it? Or should it be done with the Object Builder?

 

Share this post


Link to post
Share on other sites

you can do it in both, in blender its the vertex groups, go to object edit mode and select the whole mesh, got to the vertex groups tab and create a new vertex group called camo (google it if you don't know how too),if you use the blender to p3d export tool it will export your vertex groups as selections.
OR
In object builder, select your whole LOD and create a new selection that you name camo (same, google it if you don't know how).
This has too be done on every resolution lod if you have several.

  • Like 1
  • Thanks 2

Share this post


Link to post
Share on other sites
41 minutes ago, Mr H. said:

you can do it in both, in blender its the vertex groups, go to object edit mode and select the whole mesh, got to the vertex groups tab and create a new vertex group called camo (google it if you don't know how too),if you use the blender to p3d export tool it will export your vertex groups as selections.
OR
In object builder, select your whole LOD and create a new selection that you name camo (same, google it if you don't know how).
This has too be done on every resolution lod if you have several.


Thanks... Thank you so much gentleman @Mr H.. That was exactly what I was missing. Now I can add as many additional textures as I want....  You have given me the final piece of the puzzle.
And Mr @EO You give me another important piece too.

This is SOLVED!!!  

  • Like 2

Share this post


Link to post
Share on other sites
Quote

you can do it in both, in blender its the vertex groups, go to object edit mode and select the whole mesh, got to the vertex groups tab and create a new vertex group called camo (google it if you don't know how too),if you use the blender to p3d export tool it will export your vertex groups as selections.
OR
In object builder, select your whole LOD and create a new selection that you name camo (same, google it if you don't know how).
This has too be done on every resolution lod if you have several.

 

I've been searching for this for days now. I'm new to modding and was desperately trying to figure out hiddenSelections to get my model to work as intended. Thank you so much for this.

(don't revive dead threads yeah yeah)

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

×