I dont know if someone has already submit something similar, but since someone already mentioned about predator game, here is something that can be used when the cloaking in progress(not when it in cloaking mode, use glass shader or something similar for that).
The process is similar with monsters' death sequence in doom, but instead of red/orange inner layer, I use blue-ish one
Here's the video :
http://www.youtube.com/watch?v=xAEaq6-zf3EAnd here's the code
MATERIAL* mtl_cloak =
{
power = 10;
effect =
"
texture mtlSkin1;
texture entSkin1;
float entSkill41; // the light vector
float entSkill42; // the light vector
technique proj_tex
{
pass p0
{
zwriteenable = true;
alphablendenable=false;
alphatestenable=true;
alpharef=<entSkill41>; //Reference Value for the first skin, should be lower than the second skin
alphafunc=Greater; //Compare the alpha with the Reference Value, if it Greater then show the pixel
Texture[0] = <mtlSkin1>;
ColorArg1[0] = Texture;
ColorArg2[0] = Diffuse;
ColorOp[0] = Modulate2X;
ALPHAARG1[0] = TEXTURE | ALPHAREPLICATE;
ALPHAOP[0] = SELECTARG1;
}
pass p1
{
zwriteenable = true;
alphablendenable=false;
alphatestenable=true;
alpharef=<entSkill42>; //Reference Value for the second skin, should be higher than the first skin
alphafunc=Greater; //Compare the alpha with the Reference Value, if it Greater then show the pixel
Texture[0] = <mtlSkin1>; // Just to copy the alpha channel
ColorArg1[0] = Texture;
ColorOp[0] = SelectArg1;
Texture[1] = <entSkin1>;
ColorArg2[1] = Texture;
ColorArg1[1] = Diffuse;
ColorOp[1] = Modulate2X;
ALPHAARG1[1] = Current | ALPHAREPLICATE; //Use the alpha channel from the 1st texture
ALPHAOP[1] = SELECTARG1; //so we dont have to change the model texture manually
}
}
";
}
Here's where to download the demo:
http://www.mediafire.com/?zqyjzhzy30mTo use it, you must assign a BMAP with random alpha channel as mtl_cloak.skin1. You can check mine in the full demo. Then to cloak/uncloak, you must change the entity's skill41(for 1st texture) and skill 42(2nd texture) with range of 0 to 0.24(I don;t know why it must be 0.24(any idea guys?).
Have fun