Modding:Armor/Clothing Texture Maps: Difference between revisions

Jump to navigation Jump to search
Line 81: Line 81:
== Armor/Clothing Texture Maps (Advanced) ==
== Armor/Clothing Texture Maps (Advanced) ==
One can read [[Modding:Creating Outfit Textures|here]] to learn about the actual creation of textures for your custom armor/clothing, and check out [[Modding:Coding An Item|here]] for more in-depth explanations on inserting your textures into a mod.
One can read [[Modding:Creating Outfit Textures|here]] to learn about the actual creation of textures for your custom armor/clothing, and check out [[Modding:Coding An Item|here]] for more in-depth explanations on inserting your textures into a mod.
This section is only meant to expand on the previous one with some images and the occasional code example, and with only brief mentions of texture editing.  
This section is only meant to expand on the previous one with some images and the occasional code example, and with only brief mentions of texture editing.


=== Shader (Configs) ===
=== Shader (Configs) ===
Line 87: Line 87:


A lot of the shaders used in the game are VT-only (short for Virtual Textures), meaning their textures can only be loaded via specially encoded .gtp files. Currently we can unpack and edit these but not re-insert them back into the game as VT’s or create custom ones without the setup and use of Script Extender (see guide [https://github.com/Norbyte/bg3se/blob/main/Docs/VirtualTextures.md here] if interested).
A lot of the shaders used in the game are VT-only (short for Virtual Textures), meaning their textures can only be loaded via specially encoded .gtp files. Currently we can unpack and edit these but not re-insert them back into the game as VT’s or create custom ones without the setup and use of Script Extender (see guide [https://github.com/Norbyte/bg3se/blob/main/Docs/VirtualTextures.md here] if interested).
'''Shader configs are inserted as paths leading to the file into the SourceFile section of your material entry:'''<syntaxhighlight lang="xml">
'''Shader configs are inserted as paths leading to the file into the SourceFile section of your material entry:'''<syntaxhighlight lang="xml">
<node id="Resource">
<node id="Resource">
Line 103: Line 101:
</syntaxhighlight>
</syntaxhighlight>


 
This is the standard shader config you can use to insert your own Normal Maps, Physical Maps, Base Color Maps and MSKColor maps for your custom armor/clothing:<blockquote>Public/Shared/Assets/Materials/Characters/CHAR_BASE.lsf</blockquote>'''And these are the basic code entries needed to insert said texture maps:'''<syntaxhighlight lang="xml">
This is the standard shader config you can use to insert your own Normal Maps, Physical Maps, Base Color Maps and MSKColor maps for your custom armor/clothing:
 
* ''Public/Shared/Assets/Materials/Characters/CHAR_BASE.lsf''
 
'''And these are the basic code entries needed to insert said texture maps:'''<syntaxhighlight lang="xml">
<node id="Texture2DParameters"> _BM
<node id="Texture2DParameters"> _BM
     <attribute id="Enabled" type="bool" value="True" />
     <attribute id="Enabled" type="bool" value="True" />
Line 140: Line 133:
     <attribute id="ParameterName" type="FixedString" value="MSKColor" />
     <attribute id="ParameterName" type="FixedString" value="MSKColor" />
</node>
</node>
</syntaxhighlight>Some shaders allow for additional maps or features to be used for armor/clothing, such as:
</syntaxhighlight>
 
 
Some shaders allow for additional maps or features to be used for armor/clothing, such as:


=== Glow Maps ===
=== Glow Maps ===
As their name implies, these allow for glowing sections to be added to armor/clothing. You’d need to swap to a shader config that allows for Glow Maps to be able to use insert them. There's a few non-VT possibilities for this, depending on what look you’re trying to achieve. Some standard ones are:
As their name implies, these allow for glowing sections to be added to armor/clothing. You’d need to swap to a shader config that allows for Glow Maps to be able to use insert them. There's a few non-VT possibilities for this, depending on what look you’re trying to achieve. Some standard ones are:


<blockquote>Public/Shared/Assets/Materials/Characters/CHAR_BASE_GM.lsf</blockquote>Basic, this one only lets you set glowmap color via an overlaid GlowColor. Supports MSKcolor maps!
<blockquote>Public/Shared/Assets/Materials/Characters/CHAR_BASE_GM.lsf</blockquote>^ Basic, this one only lets you set glowmap color via an overlaid GlowColor. Supports MSKcolor maps!
 
<blockquote>Public/Shared/Assets/Materials/Base/Base_GM_Pulse_FX.lsf</blockquote>A little more advanced, as it lets you set Glow Map color via either an overlaid GlowColor OR you can insert the colors directly into the Glow Map depending on your chosen settings, and also lets you set a pulse animation on the glow. Does not support MSKcolor maps!


<blockquote>Public/Shared/Assets/Materials/Base/Base_GM_Pulse_FX.lsf</blockquote>^ A little more advanced, as it lets you set Glow Map color via either an overlaid GlowColor OR you can insert the colors directly into the Glow Map depending on your chosen settings, and also lets you set a pulse animation on the glow. Does not support MSKcolor maps!


[image here]
[image here]


'''To insert a Glow Map once you’ve switched to a _GM shader and have a Glow Map ready:'''<syntaxhighlight lang="xml+velocity">
'''To insert a Glow Map once you’ve switched to a _GM shader and have a Glow Map ready:'''<syntaxhighlight lang="xml+velocity">
Line 162: Line 156:
</node>
</node>
</syntaxhighlight>
</syntaxhighlight>


'''And the GlowColor setting for both shader configs:'''<syntaxhighlight lang="xml">
'''And the GlowColor setting for both shader configs:'''<syntaxhighlight lang="xml">
Line 175: Line 168:
</node>
</node>
</syntaxhighlight>
</syntaxhighlight>


'''These settings are for Base_GM_Pulse_FX specifically:''' <syntaxhighlight lang="xml">
'''These settings are for Base_GM_Pulse_FX specifically:''' <syntaxhighlight lang="xml">
Line 203: Line 195:
=== Alpha (aka Transparancy) ===
=== Alpha (aka Transparancy) ===
Some shader configs allow you to create completely (or partially) transparent parts on armor/clothing without needing to edit the mesh. A standard one is:<blockquote>Materials\Public\Shared\Assets\Materials\Characters\CHAR_BASE_AlphaTest.lsf</blockquote>[some images for illustration]
Some shader configs allow you to create completely (or partially) transparent parts on armor/clothing without needing to edit the mesh. A standard one is:<blockquote>Materials\Public\Shared\Assets\Materials\Characters\CHAR_BASE_AlphaTest.lsf</blockquote>[some images for illustration]




Line 211: Line 204:
=== Backfaces (Two-sided textures) ===
=== Backfaces (Two-sided textures) ===
A way to make your model appear double-sided without editing the mesh, is to use a shader config that allows for Backfaces. A standard one is:<blockquote>Materials\Public\Shared\Assets\Materials\Characters\CHAR_BASE_AlphaTest_2S.lsf</blockquote>[some images for illustration]
A way to make your model appear double-sided without editing the mesh, is to use a shader config that allows for Backfaces. A standard one is:<blockquote>Materials\Public\Shared\Assets\Materials\Characters\CHAR_BASE_AlphaTest_2S.lsf</blockquote>[some images for illustration]




Line 216: Line 210:


=== VertCut ===
=== VertCut ===
Shaders with this term in their name allow for using vertex colors to mask parts of clothing. For example, a pair of boots are too long and clip through pants - a VertCut shader will allow you (with an appropriately set up model) to hide the part of the pants the boot overlays and avoid clipping. You can read more about them in general here [link]. A standard one is:<blockquote>Materials\Public\Shared\Assets\Materials\Characters\CHAR_BASE_VertCut.lsf</blockquote>
Shaders with this term in their name allow for using vertex colors to mask parts of clothing. For example, a pair of boots are too long and clip through pants - a VertCut shader will allow you (with an appropriately set up model) to hide the part of the pants the boot overlays and avoid clipping. You can read more about them in general [[Modding:VertexColorMaskSlots|here]]. A standard one is:<blockquote>Materials\Public\Shared\Assets\Materials\Characters\CHAR_BASE_VertCut.lsf</blockquote>
 
 
 
Some combinations of the above are also possible, though again, we are limited by the amount of non-VT ones that allow for them:
 
shader (allows for x + x)
 
etc


Many more shader configs with specific purposes exist, you can always check within the shader config .lsf file to see what texture maps + parameters it allows.
=== What if I want to use x and x? ===
Some combinations of the above are also possible, though again, we are limited by the amount of non-VT ones that allow for them:<blockquote>shader (allows for x + x)</blockquote><blockquote>etc</blockquote>Many more shader configs with specific purposes exist, you can always check within the shader config .lsf file to see what texture maps + parameters it allows.


<br>
<br>
[https://substance3d.adobe.com/magazine/bringing-life-to-legends-character-art-in-baldurs-gate-3/ Source]
[https://substance3d.adobe.com/magazine/bringing-life-to-legends-character-art-in-baldurs-gate-3/ Source]
[[Category:Modding resources]]
[[Category:Modding resources]]
69
edits

Navigation menu