Baldur's Gate 3

This just requires Blender and the add-on to import and export models. 
First import the model into blender (load the DAE if there's a choice since the GR2 could break)



Check the number of vertices the model has. If you get instant crash to desktop after equipping it, it's probably because there are too many vertices in the cloth-enabled model. You can check this by toggling Statistics:

It'll show up in the top left. You'll want the cloth enabled model to have fewer than 10k vertices. If there are more, you'll want to split the part you want cloth to be enabled off into a separate object. You can do this by selecting vertices in edit mode then pressing P.


Here, the bottom skirt is split off and is the one with cloth physics enabled. To actually enable cloth physics, first check the Cloth box under BG3 Settings of the orange tab on the right menu:


You then need to vertex paint (enter it by pressing control + tab). First paint all vertices black (0,0,0), then make certain parts red. Every vertex of this blender object must have a vertex color between (0,0,0) black and (1,0,0) red. The more red, the more that part will stretch and be cloth-like (the grey part below is from a different object):



Export as GR2 as usual. Then in the VisualBank definition, you don't actually need to define cloth parameters or a cloth proxy. AFAIK, the game will always use default values for those and ignore whatever you put. What may be important is the material you use as that affects how the game will interpret shader colors. I'm not sure about all the shaders that work, but I use

                    <attribute id="MaterialType" type="uint8" value="13" />
                    <attribute id="Name" type="LSString" value="LI_Sharess_Nightsong" />
                    <attribute id="SourceFile" type="LSString" value="Public/Shared/Assets/Materials/Characters/CHAR_BASE_AlphaTest_VertCut_VT.lsf" />

Article information

Added on

Edited on

Written by

ReallyLazyIcarus

15 comments

  1. VioletLotterman
    VioletLotterman
    • premium
    • 4 kudos
    Hello :D I am trying to edit a mod that has part of the body embeded in th GR2 file. When I add physics to the correct parts of the mesh, the body parts remain tort and don't move with different animations. What am I doing wrong? How do I fix this?
    1. VioletLotterman
      VioletLotterman
      • premium
      • 4 kudos
      I figured it out! To those who may have the same problem, part of the armature (the bit that wasnt moving for me) was not imported correctly. I reimported the armature independently, I added a armature modifier, and I applied all transforms and it worked!
  2. TheSweetLuna
    TheSweetLuna
    • premium
    • 13 kudos
    How does this work with the Underwear slot? Since we can't use green and red as a combination this makes me curious how we can get physics to work on if there are any alternative ways for this to work.
  3. Kimer1990
    Kimer1990
    • member
    • 0 kudos
    Hi! What could be the problem with the cloth on the screenshot? It happens even if I don't edit the model, but just import it into blender and immediately export it back.
  4. husbunny
    husbunny
    • member
    • 0 kudos
    Thank you for the tutorial !! Physics have been one of the most difficult elements about modding in bg3
    On topic, would you happen to know what causes even vanilla armors after being exported through blender to break due to having the cloth modifier?
    This is without editing the mesh, just exporting it and I checked the vertex paint and number of verticles which both look fine by your parameters.
    If I just import &export it turns into a massive jumbled mess, but if I take off the cloth physics tag it suddenly turns into a visible grey mesh.. I'm really at my wit's end with how people preserve physics on armor when editing it


    1. EgaoKage
      EgaoKage
      • member
      • 12 kudos
      My guess would be that, having split an object to create the cloth area of the mesh, you did not assign that new object a texture in your:

      Data\Public\%Mod%\Content\Assets\Characters\%Race%\[PAK]_%Gender%Body-type%_Armor\_merged.lsf
    2. quad98
      quad98
      • member
      • 7 kudos
      Hey, I have the same problem. Have you figured out how to fix it?
      I'm using and replacing with a loose file an outfit that already exists in the game, so it doesn't seem like I need to create a separate material.
      Maybe it's because I'm importing a .GR2 model? I just didn't understand where I could get the original .DAE.
    3. quad98
      quad98
      • member
      • 7 kudos
      Okay, in my case it was a problem with the "additional accessories" that were attached to the skirt mesh. I don't know how to fix this in a normal way, but removing these accessories fixed this bug.

      They have a "cloth" checkbox and an all-red vertex paint. I tried to change the parameters to "cloth + cloth physics / cloth physics / none", but it didn't help. I also tried to paint them in full color of 0,0,0 vertex paint: it helps, but deprives the cloth of physics. 

      If you want to try to fix this, you can use HUM_F_ARM_Barbarian_A_Pants as a sample.
  5. Dovahkiira
    Dovahkiira
    • premium
    • 0 kudos
    AMAZING tutorial!! Do I need to do anything special after I separate/vertex paint? Everything works great once I load the game, except the panty part after separating from the skirt has a grey texture. I think it's having trouble finding the correct texture because now there's 2 separate objects maybe? <3
    1. EgaoKage
      EgaoKage
      • member
      • 12 kudos
      If by "grey texture" you mean that grey grid image that the game puts on things that have no texture then,

      You just have to assign the texture to each Object within the mesh. For example, if you had a mesh which originally consisted of only one Object but you split that one Object into two, it could look something like this:

      (in Data\Public\%Mod%\Content\Assets\Characters\%Race%\[PAK]_%Gender%Body-type%_Armor\_merged.lsf)

      ...
      <node id="Objects">
          <attribute id="LOD" type="uint8" value="0" />
          <attribute id="MaterialID" type="FixedString" value="UUID" />  Any base-game or custom texture.
          <attribute id="ObjectID" type="FixedString" value="%R%_%G%_ARM_%blah%_%Slot%.%R%_%G%_ARM_%blah%_%ObjectOne%.0" />
      </node>
      <node id="Objects">
          <attribute id="LOD" type="uint8" value="0" />
          <attribute id="MaterialID" type="FixedString" value="UUID" />  Any base-game or custom texture.
          <attribute id="ObjectID" type="FixedString" value="%R%_%G%_ARM_%blah%_%Slot%.%R%_%G%_ARM_%blah%_%ObjectTwo%.1" />
      </node>
      <node id="Objects">
          <attribute id="LOD" type="uint8" value="1" />
          <attribute id="MaterialID" type="FixedString" value="UUID" />  Any base-game or custom texture.
          <attribute id="ObjectID" type="FixedString" value="%R%_%G%_ARM_%blah%_%Slot%.%R%_%G%_ARM_%blah%_%ObjectOne%_LOD1.2" />
      </node>
      <node id="Objects">
          <attribute id="LOD" type="uint8" value="1" />
          <attribute id="MaterialID" type="FixedString" value="UUID" />  Any base-game or custom texture.
          <attribute id="ObjectID" type="FixedString" value="%R%_%G%_ARM_%blah%_%Slot%.%R%_%G%_ARM_%blah%_%ObjectTwo%_LOD1.3" />
      </node>

      ...

      Something like that works. The order you list them in will depend on the load-order you set in Blender, of course.

      If that's not the grey texture you're referring to, then I'd check your UV maps in Blender for the Object in question. It could have gotten a little messed up when the 2nd Object was created.

      EDIT: Code-block options, without a horizontal scroll-bar, are freakin' useless. How is this our reality? On a site dedicated to mods (IE: code) why the hell does it still word-wrap when you use the code-block!?  *deep-breaths*  ~_~
    2. Dovahkiira
      Dovahkiira
      • premium
      • 0 kudos
      thankyouthankyouthankyouthankyouthankyou!!!!! yes, the grey texture I was referring to was the grid "no texture". I will see if I can get it to work now!
  6. EgaoKage
    EgaoKage
    • member
    • 12 kudos
    So, do we have to remove weights from these vertex painted areas? Will those conflict? I would think not, but given how much trouble I've had trying to get physics to work right, I've come to just expect the worst.
  7. Bysell107
    Bysell107
    • member
    • 4 kudos
    What if i dont have a Material.lsf file because i use only in Game textures/materials is there a way i can still do it without?
    1. EgaoKage
      EgaoKage
      • member
      • 12 kudos
      Sure. You can use the Modder's Multitool to search for the .lsf files that contain an item that uses the texture you want. Then use one of those .lsf files as a template. This also gets you the UUID of the texture. For example, most textures for armor are found in:

      Data\Public\Shared\Content\Assets\Characters\%Race%\[PAK]_%Gender%Body-type%_Armor\_merged.lsf

      An item's default "color channels" (undyed) are set in its RootTemplate\_merged.lsf entry, which both establishes the item and calls on the above-mentioned files.

      Either way, you certainly can utilize base-game textures and colors, without ever needing to open PhotoShop or GIMP.
  8. deleted161706833
    deleted161706833
    • account closed
    • 27 kudos
    thank you!!