Template:Archived Page History/Warning model lightmaps: Difference between revisions
m (some improvement) |
SirYodaJedi (talk | contribs) m (note about lightmap seams) |
||
Line 2: | Line 2: | ||
<onlyinclude><!-- | <onlyinclude><!-- | ||
-->{{warning|Models use the same UVs for lightmaps as [[$basetexture]]; as such, lightmapping on models with overlapping or tiling UVs may not appear as intended!}}<!-- | -->{{warning|Models use the same UVs for lightmaps as [[$basetexture]]; as such, lightmapping on models with overlapping or tiling UVs may not appear as intended!<br>Additionally, lighting seams may appear on edges with non-contiguous texture UVs; this is more noticeable on lower-resolution lightmaps.}}<!-- | ||
-->{{ | -->{{bug|Lightmaps for models with multiple materials do not compile properly in [[VRAD]]! A lightmap will only be compiled for the first material on the model, that is a combined version of all the UV's used by all materials.<!-- | ||
-->{{workaround|Define a pre-baked {{ent|$lightmap}} in the [[VMT]] of the [[VertexLitGeneric]] material (can be obtained using {{code|-dumppropmaps}} in [[VRAD]]).}}<!-- | -->{{workaround|Define a pre-baked {{ent|$lightmap}} in the [[VMT]] of the [[VertexLitGeneric]] material (can be obtained using {{code|-dumppropmaps}} in [[VRAD]]).}}<!-- | ||
-->}}<!-- | -->}}<!-- | ||
Line 13: | Line 13: | ||
{{Expand|noborder=1|title=Technical| | {{Expand|noborder=1|title=Technical| | ||
If {{ent|$bumpmap}} or {{ent|$phong}} is defined, the engine will not send the lightmap data to the shader.<br> | If {{ent|$bumpmap}}, {{ent|$normalmap}}, or {{ent|$phong}} is defined, the engine will not send the lightmap data to the shader.<br> | ||
For $bumpmap, a workaround for this is to use a differently named parameter. ($NormalTexture) to get the normal map and undefining $bumpmap.<br> | For $bumpmap, a workaround for this is to use a differently named parameter. ($NormalTexture) to get the normal map and undefining $bumpmap.<br> | ||
However no static lighting data can be received by the shader, if the $bumpmap parameter is not set to anything. This refers to lights that are not named and are not inherently dynamic.<br> | However no static lighting data can be received by the shader, if the $bumpmap parameter is not set to anything. This refers to lights that are not named and are not inherently dynamic.<br> |
Revision as of 14:09, 4 March 2024
Shows the following warnings:

Additionally, lighting seams may appear on edges with non-contiguous texture UVs; this is more noticeable on lower-resolution lightmaps.




- Define a pre-baked RGBA16161616f $lightmap in the VMT of the VertexLitGeneric material. A custom-coded compiler would be required to this accurately.
- Increase lightmap resolution (results may vary).
- Move light source further away from the lit surface.


If $bumpmap, $normalmap, or $phong is defined, the engine will not send the lightmap data to the shader. This in-engine check also exists for $phong, however getting around the issue is more tricky. The default value of the integer parameter will be 0 even if not set in the vmt. Thus making $phong always be defined in a way. |