Jump to content

Matching virtual textures to their respective models


MjrSpieler

Recommended Posts

Hey guys!

 

So that Virtual Texture folder makes me crazy. First of all, I don't really understand what's their difference from the regular textures. But that's not super-important. Secondly, and this is basically the main question here: how could one match a BG3's model to its set of virtual textures? I mean, with VTs' names unconnected to anything and their non-structured placement.

Link to comment
Share on other sites

If you know the name of the model/mesh, for example HUM_M_ARM_Druid_A_Body (druid armor for a standard human male/elf/half-elf body), you can use the modders multitool for search for .lsx files where that model is mentioned. In the lsx file (you may have to look through several) you look for the resource node in which the item name appears with "GTexFileName", like this (colors are added by me):

 

<node id="Resource">
<attribute id="GTexFileName" type="FixedString" value="800453f54dc5f9aaccc3f41f5fd1f177" />
<attribute id="ID" type="FixedString" value="21d1b23e-f56f-c4e9-8401-21284dee0c94" />
<attribute id="Name" type="LSString" value="HUM_M_ARM_Druid_A_Body" />
<attribute id="Prefetch" type="bool" value="False" />
<attribute id="PrefetchMipLevel" type="int8" value="-1" />
<attribute id="ReferencedColorSpaces" type="uint32" value="6" />
<attribute id="SourceFile" type="LSString" value="" />
<attribute id="VirtualTextureLayerConfig" type="uint32" value="3" />
<attribute id="_OriginalFileVersion_" type="int64" value="144115207403208907" />
</node>

The value after GTexFileName - in this case 800453f54dc5f9aaccc3f41f5fd1f177 - marked in white above, matches the file name of the .dds file which is the virtual texture for that item, the druid's armor for standard male human bodies.

Dds files with a name beginning with 0 are in the Albedo_Normal_Physical_0.gts virtual textures file, those beginning with 1 are in the Albedo_Normal_Physical_1.gts file, and so on. You can upack the .gts files into textures (.dds files) using the lslib toolkit.

I have seen that there are several versions of these virtual textures, with filenames ending in _1, _2, etc. I don't understand the difference between them or how they are used together to create the final look for the item, so if anyone knows, please share.

Edited by Berliner10405
Link to comment
Share on other sites

  • 3 weeks later...

@Berliner10405

Dude! I literally missed your reply here. Thank you for explaining it!

Now, about those _0, _1, and _2 versions of textures. I'm sure you have found the answer already, but just in case you have not...
_0 is your regular albedo/color map. Just apply it as usual.
_1 is a normal map in weird BG3 format. You have to convert it into a regular DX one. Here's a Photoshop action that helps: https://www.nexusmods.com/baldursgate3/mods/504
_2 is a kinda PBR map file. Every color channel, red, green, and blue, represents a specific map. Red being metallicity, green being roughness, blue being... I'm not sure, ambient occlusion maybe. Just save each channel separately and get your maps ready for use.

 

 

If you know the name of the model/mesh, for example HUM_M_ARM_Druid_A_Body (druid armor for a standard human male/elf/half-elf body), you can use the modders multitool for search for .lsx files where that model is mentioned. In the lsx file (you may have to look through several) you look for the resource node in which the item name appears with "GTexFileName", like this (colors are added by me):

 

<node id="Resource">
<attribute id="GTexFileName" type="FixedString" value="800453f54dc5f9aaccc3f41f5fd1f177" />
<attribute id="ID" type="FixedString" value="21d1b23e-f56f-c4e9-8401-21284dee0c94" />
<attribute id="Name" type="LSString" value="HUM_M_ARM_Druid_A_Body" />
<attribute id="Prefetch" type="bool" value="False" />
<attribute id="PrefetchMipLevel" type="int8" value="-1" />
<attribute id="ReferencedColorSpaces" type="uint32" value="6" />
<attribute id="SourceFile" type="LSString" value="" />
<attribute id="VirtualTextureLayerConfig" type="uint32" value="3" />
<attribute id="_OriginalFileVersion_" type="int64" value="144115207403208907" />
</node>

The value after GTexFileName - in this case 800453f54dc5f9aaccc3f41f5fd1f177 - marked in white above, matches the file name of the .dds file which is the virtual texture for that item, the druid's armor for standard male human bodies.

Dds files with a name beginning with 0 are in the Albedo_Normal_Physical_0.gts virtual textures file, those beginning with 1 are in the Albedo_Normal_Physical_1.gts file, and so on. You can upack the .gts files into textures (.dds files) using the lslib toolkit.

I have seen that there are several versions of these virtual textures, with filenames ending in _1, _2, etc. I don't understand the difference between them or how they are used together to create the final look for the item, so if anyone knows, please share.

 

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...