Jump to content
mindstorm

Unable to get model setObjectTexture to work on custom model

Recommended Posts

So with the help of a realy nice guy called Alduric (from http://arma3coop.pl) I was able to finally get some of the models I have into Arma. 

 

I made my self familiar with blender and also managed to port a model myself (the same as Alduric did), also giving the model some colors. 

 

Now I would like to be able to change the object's color with setObjectTexutre.

Thus far I have been unable to achieve this. The model has the orignal colors I've set with blender, but they wont change when I use setObjectTexture.

 

This is my model

I made a selection called "pod", which I thought would make me able to change the colors.

 

This is my models config:

class CfgPatches
{
	class ref_entity
	{
		units[] = {"ref_droppod"};
		weapons[] = {};
		requiredVersion = 0.1;
		requiredAddons[] = {"A3_Characters_F"};
	};
};
class CfgVehicleClasses
{
	class r_ent
	{
		displayName = "Entity";
	};
};
class CfgVehicles
{
	class Land_DuctTape_F;
	class Helper_Base_F;
	class ref_droppod: Helper_Base_F
	{
		mapSize = 1;
		author = "";
		scope = 2;
		displayName = "DropPod";
		//simulation="thing";
		destrType = "destructNo";
		vehicleClass = "r_ent";
		hiddenSelections[] = {"pod"};
		hiddenSelectionsTextures[] = {"#(argb,1,1,1)color(0,0,0,0.1,ca)"};
		model = "ref_entity\droppod\droppod";
		accuracy = 1000;
	};	
};

At first I inherrited from Land_DuctTape_F, but after inspecting the spheres from A3_Misc_F_helpers I thought Helper_Base_F would do the trick. Without luck.

 

Could anyone point me in the right direction as to what I'm doing wrong, and why I am unable to apply different colors the the whole pod?

 

I'm fairly new at this, kind of proud I actually managed to get objects from blender in Arma myself. Now I'm only stuck at this part and I would really appreciate the help!

 

 

 

Share this post


Link to post
Share on other sites

You also need a model.cfg file with the name of your hiddenselections ('pod') written in the sections[] array of the CfgModels class.

 

At its most basic, I think this would work:

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

	class droppod: Default
	{
		sections[] =
		{
			"pod"
		};
	};
};

Share this post


Link to post
Share on other sites

 

You also need a model.cfg file with the name of your hiddenselections ('pod') written in the sections[] array of the CfgModels class.

 

At its most basic, I think this would work:

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

	class droppod: Default
	{
		sections[] =
		{
			"pod"
		};
	};
};

 

You are my hero! Thank you so much man. So happy right now :D.

 

One more question, any idea on how to get the material to shine through, like the spheres? It seems like the original spheres don't use an rvmat so I suppose I need to change something in the object builder, but I have no clue what that would be.

Share this post


Link to post
Share on other sites

Never tried to do it without a .rvmat but maybe one of the Lighting & Shadows options in the Face Properties window will do it (select faces/verts and press [E]) or the Lighting options in the Vertex Properties window (select faces/verts and press [Shift+E]), though the header vertex properties window suggests that the lighting settings there are "obsolete".

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

×