Tutorial Tip how to create a mask effect in doom 3
I stumbled on this little masking trick when after I had created a model of a ornate cross and textured it and then make a 2d picture of it
I saved it as a trasparent tga so only the cross would show up
I then had the bright Idea to try to make blood flow around and over it by simply adding the stages of flowing blood to my surprise the cross acted like a mask and the blood only appeared on the cross itself nowhere else
so I tested this masking technique as a true mask I made a ring shape and made it black and then the light black as well so that the texture was absolutly black but still had a trasparent background
then I added this mtr
Code:
textures/exhale2/mask_test3
{
twosided
noshadows
noselfshadow
DECAL_MACRO
{
forceHighQuality
blend diffusemap
map textures/learning/tst3.tga
alphatest 0.5
}
{
blend add
map textures/decals/blood_drip1
translate 1,time*-0.1
rgba 0.2
}
{
blend add
map textures/decals/blood_drip1a
translate 1,time*-0.02
rgba 0.2
}
}
and it works I had blood flowing ounly in the ring the rest of the square texture has nothing in it
I then made a series of rivulets (vein structures) the same way and made them tileable and then added a translate parm so they scrolled and it worked I had rivulets of blood flowing in this manner quite nice effect now I the onlything to do is modify the blood so that the whit is hidden
still havnt quite worked that one out yet but its a nice start
anyone else know how to create masks like this Alternative methods would be apprecieated
forgot to mention for stages that you want to ignore the alphatest stage its preaty simple i allready said how the stage parm
ignoreAlphaTest
and magic its ignored
works well with blend filter stages