Jump to content
Sign in to follow this  
mossman1223

Model appears black

Recommended Posts

My character model appears a matte, shaded black in-game or in the Buldozer. After extensive googling, I'm given to understand that this may have something to do with my rvmat and specifically the nohq (normal) texture.

I went through my rvmat, can't seem to get it to fix... posting its contents here.

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 = 150;
PixelShaderID = "Super";
VertexShaderID = "Super";

class Stage1
{
texture = "hlunits\data\combinesoldier_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 = "#(argb,8,8,3)color(0,0,0,0,AS)";
uvSource = "tex";
class uvTransform
{
	aside[] = {1,0,0};
	up[] = {0,1,0};
	dir[] = {0,0,0};
	pos[] = {0,0,0};
};
};

class Stage5
{
texture = "hlunits\data\combinesoldiersheet_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 = "#(argb,8,8,3)color(0,0,0,0,CO)";
useWorldEnvMap = "true";
uvSource = "tex";
class uvTransform
{
	aside[] = {1,0,0};
	up[] = {0,1,0};
	dir[] = {0,0,0};
	pos[] = {0,0,0};
};
};

I'm fairly sure that I've gotten all the paths for the textures etc set up correctly; and Arma doesn't give me any missing texture errors when I try to load it.

if this is a nohq issue how should I be setting it up?

simply put: how do I get my texture to show up properly on my model?

Edited by mossman1223

Share this post


Link to post
Share on other sites

Need to be absolutely certain the file paths are correct. Sounds like the uv mapping is messed up. Your normal doesn't match your model. Or your color values are off. I'll cross check your values when I get to my comp

Share this post


Link to post
Share on other sites

If i were you i would take a RVMAT from the game and use that first. Then, one by one, modify only the 2 paths to your normal and specular maps:

texture = "hlunits\data\combinesoldier_nohq.paa";

texture = "hlunits\data\combinesoldiersheet_smdi.paa";

It seems like you're trying to make a soldier, so take a RVMAT used on a BIS soldier, and use that as a base. See if your color/diffuse texture shows up ok, with obviously the wrong specular/normal. Then add your stuff to it. That way you can trace what's causing the blackness, it could be a number of things: either one of your textures is messed up (e.g. specular map has shininess info in Red channel instead of Green) or maybe one of the procedural textures in the RVMAT are wrong (i notice in Stage4 the blank AS texture is all black, while in most RVMAT's i've seen, it's white like this: #(argb,8,8,3)color(1,1,1,1,AS)).

Like WarLord554 says, it's also worth looking at the UVs, see if they got imported ok. Normals are unlikely to be causing all black shading.

If you can't debug it yourself, might want to post the files, someone could take a look for you.

Share this post


Link to post
Share on other sites
Need to be absolutely certain the file paths are correct. Sounds like the uv mapping is messed up. Your normal doesn't match your model. Or your color values are off. I'll cross check your values when I get to my comp

Well, the UVMapping seems to be fine, as when I open the UV editor in ObjectBuilder I see the same groupings I set up in blender.

If i were you i would take a RVMAT from the game and use that first. Then, one by one, modify only the 2 paths to your normal and specular maps:

texture = "hlunits\data\combinesoldier_nohq.paa";

texture = "hlunits\data\combinesoldiersheet_smdi.paa";

It seems like you're trying to make a soldier, so take a RVMAT used on a BIS soldier, and use that as a base. See if your color/diffuse texture shows up ok, with obviously the wrong specular/normal. Then add your stuff to it. That way you can trace what's causing the blackness, it could be a number of things: either one of your textures is messed up (e.g. specular map has shininess info in Red channel instead of Green) or maybe one of the procedural textures in the RVMAT are wrong (i notice in Stage4 the blank AS texture is all black, while in most RVMAT's i've seen, it's white like this: #(argb,8,8,3)color(1,1,1,1,AS)).

Like WarLord554 says, it's also worth looking at the UVs, see if they got imported ok. Normals are unlikely to be causing all black shading.

If you can't debug it yourself, might want to post the files, someone could take a look for you.

I tried using the rvmat from an example addon that's known to work, and I still get all black shading even when I use the diffuse texture from that addon.

Interestingly, the diffuse texture for my guy shows up fine on the example soldier I'm using, just not vice versa.

Also, I should note that when using the rvmat from the example addon, my model appears black, but with no shading, so it appears as a silhouette.

So obviously it's something specific to my mesh that's gone wrong?

---------- Post added at 10:50 ---------- Previous post was at 10:26 ----------

Ah! Just got it to work!

I had multiple UV sets on my mesh, leftover from merging stuff in blender, and changing the id of set 1 (the real one) to replace set 0 (empty one) in objectbuilder seems to get it to work, thanks for the tips guys.

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  

×