I figured I'd ask this, because it's still bugging me.
A while ago, I tried to make a $selfillum 1 texture for a character's eyes, so they could glow in the dark, even if the whole face was in complete darkness.
The closest I could get was making the "whites" of the eyes glow, but that would look silly if the pupil texture wasn't on there.
I made the textures and tried MANY different things, but to no avail. Would a new shader have to be developed to allow self-illuminated pupils? Or am I just missing something stupid?
This is what I have so far... Looks neat, but it still needs to actually glow:
Alyx ala' Riddick.
"eyes" Shader
-
- Obsidian Premium
- Posts: 1624
- Joined: Mon May 29, 2006 12:06 pm
-
- Forum Moderator
- Posts: 291
- Joined: Sat Sep 30, 2006 4:27 am
- Location: Manchester, UK
- Contact:
Not sure if this will help as you've tried a $selfillum 1 already, but you might have missed something else?
From (with other information on model materials) here: http://developer.valvesoftware.com/wiki ... for_modelsValve Developer Community Wiki wrote:VMT material definitions
Each Material for the Source engine needs a .VMT file. The .VMT file defines the lighting model, the base texture, and any other additional channels you may have like: specularity, self-illumination, normal mapping, transparency, translucency, and proxy shaders. Here’s an example .VMT file from HL2:
"VertexLitGeneric"
{
"$baseTexture" "Models/Combine_soldier/Combine_elite"
"$envmap" "env_cubemap"
"$bumpmap" "models/combine_soldier/combine_elite_normal"
"$normalmapalphaenvmapmask" 1
"$envmapcontrast" 1
"$model" 1
"$selfillum" 1
}
This example is a material used on a polygonal model, using the "VertexLitGenric" material. The basetexture, or diffuse map is defined, "$baseTexture" "Models/Combine_soldier/Combine_elite" along with the environment map "$envmap" "env_cubemap", (env_cubemap refers to cubemap entities placed in the level, the specular reflections of this character will always reflect the world around it, assuming you have cubemap entities placed approprirately in you level. You can use a custom cubemap instead, of you choose. The normalmap is defined next with "$bumpmap". The next line "$normalmapalphaenvmapmask" 1 tells the renderer that this material has a mask for the specularity, so only some areas of the model will reflect the env_cubemap information, as defined in this case by the alpha channel of the normal map, the specual mask can be here, in the alpha of the basetexture "$basealphaenvmapmask 1" or in a separate mask file "$envmapmask" "models/modelname/mymask". For this model, the environment mask is multiplied by itself one time to create more contrasy reflections, the "$envmapcontrast" 1 command controls this. All models need to also contain the command, "$model" 1 which tells the renderer that this material is being used on a polygonal model created from StudioMDL. The last line "$selfillum" 1 tells the renderer that the alpha channel of the basematerial contains self illuminated areas, these areas of the alpha channel show up as glowing areas of the model.