Jump to content
Sign in to follow this  
allarvendla

hiddenSelectionsMaterials screws up backpack model

Recommended Posts

Hello guys!

I have created a custom texture for a backpack (B_Kitbag_Base). New texture Works fine, but I also want to change NOHQ map. This means I need to change RVMAT.

I created custom RVMAT and made a change in my config.cpp to point at it. But as I added the line

hiddenSelectionsMaterials[] = {"edf\Data\edf_kitbag_medic_nohq.paa"};

It screwed up the models materials. Model lost shadow and seems to be half transparent:

http://i.gyazo.com/297e4dfffd3c02815327366969d6bc87.png (216 kB)

At first I thought there is something wrong with my RVMAT file and tried using original RVMAT (in its original direction). That gave same result.

config.cpp:

class B_Kitbag_Base;
class Bacpack_Medic_Forest_retexture: B_Kitbag_Base {
scope = 2;
displayName = "EDF Kitbag Medic [Forest]";
picture="\edf\data\ui\edf_kitbag_medic_icon_co.paa";
hiddenSelections[] = {"Camo"};
hiddenSelectionsTextures[] = {"\edf\data\forest\edf_kitbag_forest_medic_co.paa"};
hiddenSelectionsMaterials[] = {"\edf\data\edf_kitbag_medic.rvmat"};
};

RVMAT code:

class StageTI
{
texture="a3\data_f\default_ti_ca.paa";
};
ambient[]={1,1,1,1};
diffuse[]={1,1,1,1};
forcedDiffuse[]={0,0,0,0};
emmisive[]={0,0,0,1};
specular[]={1,1,1,1};
specularPower=100;
PixelShaderID="Super";
VertexShaderID="Super";
class Stage1
{
texture="edf\Data\edf_kitbag_medic_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="a3\weapons_f\ammoboxes\bags\data\backpack_fast_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="a3\weapons_f\ammoboxes\bags\data\backpack_fast_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(1,0.7)";
uvSource="none";
};
class Stage7
{
texture="a3\data_f\env_land_co.paa";
uvSource="tex";
class uvTransform
{
	aside[]={1,0,0};
	up[]={0,1,0};
	dir[]={0,0,0};
	pos[]={0,0,0};
};
};

Any thoughts and suggestions are more then welcome :)

Share this post


Link to post
Share on other sites
RVMAT code:

class StageTI
{
texture="a3\data_f\default_ti_ca.paa";
};
ambient[]={1,1,1,1};
diffuse[]={1,1,1,1};
[b][color="#FF0000"]forcedDiffuse[]={0,0,0,1};[/color][/b]
emmisive[]={0,0,0,1};
specular[]={1,1,1,1};
specularPower=100;
PixelShaderID="Super";
VertexShaderID="Super";
class Stage1
{
texture="edf\Data\edf_kitbag_medic_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};
};
};
[color="#FF0000"]class Stage4
{
texture="#(argb,8,8,3)color(1,1,1,1,AS)";
uvSource="tex";
class uvTransform
{
	aside[]={1,0,0};
	up[]={0,1,0};
	dir[]={0,0,0};
	pos[]={0,0,0};
};
};[/color]
class Stage5
{
texture="a3\weapons_f\ammoboxes\bags\data\backpack_fast_smdi.paa";
uvSource="tex";
class uvTransform
{
	aside[]={1,0,0};
	up[]={0,1,0};
	dir[]={0,0,0};
	pos[]={0,0,0};
};
};
[color="#FF0000"]class Stage6
{
texture="#(ai,64,64,1)fresnelGlass()";
uvSource="none";
};[/color]
class Stage7
{
texture="a3\data_f\env_land_co.paa";
uvSource="tex";
class uvTransform
{
	aside[]={1,0,0};
	up[]={0,1,0};
	dir[]={0,0,0};
	pos[]={0,0,0};
};
};

The parts highlighted in red are the areas I changed. My main guess its stage6 with the fresnel glass stuff. So change that (and only that first. If that doesn't work try the other two changes. If they still don't work I have no idea...

Also, it may sound simple but check your texture paths and filenames are correct. Its amazing what difference a missing normal map can make to a model.

Share this post


Link to post
Share on other sites

Jackal326, thanks for the suggestions. Tried all of your ideas, but still no joy :/

Share this post


Link to post
Share on other sites

Hmm, strange.

How are you converting the texture? I assume you're saving it as a 32bit TGA/PNG and then using TexView to save as a _co.paa?

Share this post


Link to post
Share on other sites
I assume you're saving it as a 32bit TGA/PNG and then using TexView to save as a _co.paa?

Yes, exactly like that :)

And I know that custom RVMAT is being used, because I can see that my custom NOHQ map is there. Also, I tried using only hiddenSelectionsMaterials without hiddenSelectionsTextures and still got the same result. And as I stated in OP that I even tried using original RVMAT file. I did it like this:

hiddenSelectionsMaterials[] = {"A3\weapons_f\ammoboxes\bags\data\backpack_fast.rvmat"};

Did not change a thing.

Only way to have normal backpack is if I don't add hiddenSelectionsMaterials.

But then it does not look exactly how I want it to look :'(

Share this post


Link to post
Share on other sites

Made a small video of the problem I am having. Maybe this will spark new ideas :)

Share this post


Link to post
Share on other sites

It happens to me too changing the Heli helmet materials and really can't get it working so finally I decided to not change the material maps.. But I'm curious what It's causing this..

Share this post


Link to post
Share on other sites

Ok, as a last resort I turned to Hex editing (not the most "legal" way of doing things, I know), but that fixed it.

So, my question now is, should I submit a ticket for the issue? Or is there still a mistake in my code (rvmat or config - maybe I am using hiddenSelectionsMaterials wrong??)?

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  

×