VertexLitGeneric Textures On Brush Faces: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Category fix)
m (good idea, bit of a fixup)
Line 1: Line 1:
Materials that use the [[VertexLitGeneric]] shader may render incorrectly when applied to brush faces. If your lightmaps flicker or are displayed full black, you may have used one of these. They are listed in Hammer in the <code>props/</code> or <code>models/</code> directory. Look for equivalent materials with the same name that are not in these directories. These materials will render correctly.
==Issue==
Materials that use the [[VertexLitGeneric]] as thier [[Shader Types and Parameters|shader]] may render incorrectly when applied to brush faces. If the [[Lightmap|lightmaps]] flicker, the brightness changes relative to where the player views the texture, or the face is displayed full black, a vertex lit texture may of been used. They are usually listed in Hammer in the <code>props/</code> or <code>models/</code> directory, but may not be the only textures with this symptom.
 
==Fix==
The easiest fix is to look for equivalent materials with the same name that are not in these directories. These materials will render correctly as they use the correct shader. Another approach is to write a new [[VMT]] that changes the shader to [[LightMappedGeneric]], the vmt will need to be copied out of the [[GCF]] file first and given a new name. Further instructions on writing and editing a .vmt can be found in the[[Creating a Material]] tutorial, the .vtf is already made by valve so the first part of the tutorial may be skipped.
{{tip|Remember to distribute the vmt with the map as without the vmt file the texture is invalid and will appear as pink black checkers.}}
 
==Examples==
{{todo|Get some pictures of classic examples}}


[[Category:Level Design FAQ]][[Category:Material System]]
[[Category:Level Design FAQ]][[Category:Material System]]

Revision as of 14:17, 28 August 2006

Issue

Materials that use the VertexLitGeneric as thier shader may render incorrectly when applied to brush faces. If the lightmaps flicker, the brightness changes relative to where the player views the texture, or the face is displayed full black, a vertex lit texture may of been used. They are usually listed in Hammer in the props/ or models/ directory, but may not be the only textures with this symptom.

Fix

The easiest fix is to look for equivalent materials with the same name that are not in these directories. These materials will render correctly as they use the correct shader. Another approach is to write a new VMT that changes the shader to LightMappedGeneric, the vmt will need to be copied out of the GCF file first and given a new name. Further instructions on writing and editing a .vmt can be found in theCreating a Material tutorial, the .vtf is already made by valve so the first part of the tutorial may be skipped.

Tip.pngTip:Remember to distribute the vmt with the map as without the vmt file the texture is invalid and will appear as pink black checkers.

Examples

Todo: Get some pictures of classic examples