For one, I don't have lighting at all in my level. Models are practically unaffected by them. I've played with some of the values but didn't get anywhere. Here's what I have it at this moment:
Code:
var detail_size=4;
bmap detailmap = <roughnessstep2.tga>;
function BG_roughness()
{
bmap_to_mipmap(mtl.Skin1);
// Adjust the scale of the textures
mtl.matrix11 = float(18); // default u scale
mtl.matrix22 = float(18); // default v scale
}
material roughness
{
/*
ambient_blue = 255;
ambient_green = 255;
ambient_red = 255;
emissive_blue = 0;
emissive_green = 0;
emissive_red = 0;
diffuse_blue = 0;
diffuse_green = 0;
diffuse_red = 0;
albedo = 50;
alpha = 100;
specular_blue = 0;
specular_green = 0;
specular_red = 0;
power = 0;
*/
skin1=detailmap;
event = BG_roughness;
effect =
"
matrix matMtl;
texture entSkin1; // Your big skin tex
texture mtlSkin1; // A detailmap
technique add_roughness
{
pass P0
{
lighting=false;//false;
ditherenable=true;
zwriteenable=true;
zenable=true;
alphablendenable=true;
Texture[0] = <entSkin1>;
magFilter[0]=linear;
minFilter[0]=linear;
mipFilter[0]=linear;
TextureTransformflags[0] = disable;
texcoordindex[0]=0;
ColorArg1[0] = Texture;
ColorOp[0] = modulate;//2x;
ColorArg2[0]=Diffuse;
Texture[1] = <mtlSkin1>;
magFilter[1]=linear;
minFilter[1]=linear;
mipFilter[1]=linear;
ColorOp[1]=addsigned;
ColorArg1[1]=Texture;
ColorArg2[1]=Current;
// AlphaOp[1] = Disable; // this might be the cause to the problem
TextureTransformFlags[1] = Count2;
TextureTransform[1] = <matMtl>;
texcoordindex[1]=1;
// colorop[2]=disable;
// alphaop[2]=disable; // as well as this
}
}
";
}
Having it like this gives the half transparent effect, but no detail or anything.