"eyes" Shader

Discuss Certain Aspects of Mapping, Modeling, and Coding.
Post Reply
Hickadam
prop_physics
prop_physics
Posts: 130
Joined: Tue Aug 08, 2006 2:53 am

"eyes" Shader

Post by Hickadam »

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:


Image

Alyx ala' Riddick.
[JSC][GU]PREDATOR
Obsidian Premium
Obsidian Premium
Posts: 1624
Joined: Mon May 29, 2006 12:06 pm

Post by [JSC][GU]PREDATOR »

A glow would be like an env i think... and what is that red dot on her jacket?
Hickadam
prop_physics
prop_physics
Posts: 130
Joined: Tue Aug 08, 2006 2:53 am

Post by Hickadam »

Well, a glow would be nice, but I would prefer a self-illuminated texture. I'm open to suggestions.

And you know, I really have no idea where that dot came from... I think I was doing some other texturing on her at the time, and wanted to see exactly where that spot was...
unconnected
Forum Moderator
Forum Moderator
Posts: 291
Joined: Sat Sep 30, 2006 4:27 am
Location: Manchester, UK
Contact:

Post by unconnected »

Not sure if this will help as you've tried a $selfillum 1 already, but you might have missed something else?
Valve 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.
From (with other information on model materials) here: http://developer.valvesoftware.com/wiki ... for_models
Hickadam
prop_physics
prop_physics
Posts: 130
Joined: Tue Aug 08, 2006 2:53 am

Post by Hickadam »

I think the problem lies in the fact that the pupil has an alpha layer to make it round, and if the alpha layer is used for transparencies, the shader can't apply a self illuminating texture...

Maybe there is a way to specify this as well...


Or maybe I should go with square pupils :P
tomgreen
prop_physics
prop_physics
Posts: 148
Joined: Fri Sep 29, 2006 7:08 am

Post by tomgreen »

I got the solution just attach 2 flashlights to her eyes lol....
Image
Post Reply