VertexLitGeneric Textures On Brush Faces: Difference between revisions
Angry Beaver (talk | contribs) m (good idea, bit of a fixup) |
(typos + materials in props/ are not vertex lit) |
||
Line 1: | Line 1: | ||
==Issue== | ==Issue== | ||
Materials that use the [[VertexLitGeneric]] as | Materials that use the [[VertexLitGeneric]] as their [[Shader Types and Parameters|shader]] will render incorrectly when applied to brush faces, which require lightmapped materials. 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 material is likely to have been used. Materials listed in Hammer in the <code>models/</code> directory are all vertex lit, and should not be used on brushes, but they may not be the only textures with this shader. The <code>decals/</code> directory also contains vertex lit materials. | ||
==Fix== | ==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[[ | 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. | ||
{{tip|Remember to distribute the vmt with the map | |||
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 [[Material]] tutorial, the .vtf is already included with the game so the first part of the tutorial may be skipped. | |||
{{tip|Remember to distribute the .vmt with the map. Without the .vmt file, the texture is invalid and will appear as pink black checkers.}} | |||
==Examples== | ==Examples== |
Revision as of 19:36, 28 August 2006
Issue
Materials that use the VertexLitGeneric as their shader will render incorrectly when applied to brush faces, which require lightmapped materials. 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 material is likely to have been used. Materials listed in Hammer in the models/
directory are all vertex lit, and should not be used on brushes, but they may not be the only textures with this shader. The decals/
directory also contains vertex lit materials.
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 Material tutorial, the .vtf is already included with the game so the first part of the tutorial may be skipped.
