$lightmap: Difference between revisions
Jump to navigation
Jump to search
Warning:
Tip:
VRAD has a -dumppropmaps option, which will create external TGA versions of the generated static prop lightmaps which can be converted to VTF and manually defined as a $lightmap.
Note:Archived rest of page history of page template:warning model lightmaps
Important:These pages are linked often from page history logs so Special:WhatLinksHere will not show anything.
SirYodaJedi (talk | contribs) mNo edit summary |
Thunder4ik (talk | contribs) m (clean up) |
||
Line 2: | Line 2: | ||
{{This is a|s2|shader=VertexLitGeneric|name=$lightmap|game=Source 2013 MP|game1=Garry's Mod}} | {{This is a|s2|shader=VertexLitGeneric|name=$lightmap|game=Source 2013 MP|game1=Garry's Mod}} | ||
It defines a lightmap to be used to light the [[MDL (Source 1)|MDL]] model's material, instead of the per-vertex lighting used by [[ | It defines a lightmap to be used to light the [[MDL (Source 1)|MDL]] model's material, instead of the per-vertex lighting used by [[prop static]] or point lighting used by other models. | ||
This parameter does not usually need to be added manually, as [[VRAD]] will generate model lightmaps automatically if {{mono|generatelightmaps}} is enabled for the [[ | This parameter does not usually need to be added manually, as [[VRAD]] will generate model lightmaps automatically if {{mono|generatelightmaps}} is enabled for the [[prop static]] and {{mono|-StaticPropLighting}} is enabled in [[VRAD]]. Nonetheless, it can still be added manually, such as for using a lightmap on a [[prop dynamic]], or if a [[prop static]] has multiple materials (as [[VRAD]] can only generate lightmaps for the first material and skin). | ||
{{tip|{{src13mp}} [[VRAD]] has a {{code|-dumppropmaps}} option, which will create external [[TGA]] versions of the generated static prop lightmaps which can be converted to [[VTF]] and manually defined as a {{mono|$lightmap}}. | {{tip|{{src13mp}} [[VRAD]] has a {{code|-dumppropmaps}} option, which will create external [[TGA]] versions of the generated static prop lightmaps which can be converted to [[VTF]] and manually defined as a {{mono|$lightmap}}. | ||
{{todo|What about converting static prop lightmaps from already-compiled maps? They are stored as [[PPL]] files, which have a slightly different header from VTF or TGA. }} | {{todo|What about converting static prop lightmaps from already-compiled maps? They are stored as [[PPL]] files, which have a slightly different header from VTF or TGA. }} | ||
Line 11: | Line 11: | ||
==VMT syntax== | ==VMT syntax== | ||
$lightmap <[[texture]]> | |||
{{codeblock|lang=vmt|src=models/lightmapped/example.vmt|<!-- | {{codeblock|lang=vmt|src=models/lightmapped/example.vmt|<!-- | ||
Line 17: | Line 17: | ||
{ | { | ||
</nowiki>[[$basetexture]] "models/lightmapped/example_base"<nowiki> | </nowiki>[[$basetexture]] "models/lightmapped/example_base"<nowiki> | ||
</nowiki> | </nowiki>$lightmap "models/lightmapped/example_lightmap"<nowiki> | ||
}</nowiki> }} | }</nowiki> }} | ||
Revision as of 01:35, 6 January 2024
$lightmap
is a s2 available in Source 2013 Multiplayer and
Garry's Mod.

- The {{{game}}} parameter is inconsistent with the name defined by the {{Source 2013 MP}} template. This can most likely be fixed by setting the value of the {{{game}}} parameter to Source 2013 Multiplayer.
If a parameter is consistent but you're still seeing this warning, it may be an issue with the template itself. Please discuss it on the template's talk page.
It defines a lightmap to be used to light the MDL model's material, instead of the per-vertex lighting used by prop static or point lighting used by other models.
This parameter does not usually need to be added manually, as VRAD will generate model lightmaps automatically if generatelightmaps is enabled for the prop static and -StaticPropLighting is enabled in VRAD. Nonetheless, it can still be added manually, such as for using a lightmap on a prop dynamic, or if a prop static has multiple materials (as VRAD can only generate lightmaps for the first material and skin).


Todo: What about converting static prop lightmaps from already-compiled maps? They are stored as PPL files, which have a slightly different header from VTF or TGA.
VMT syntax
$lightmap <texture>
Limitations and caveats

