The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 3: | Line 3: | ||
|description=This page is a hub for everything related to Modding Baldur's Gate 3. Check out the following guides to learn how to mod BG3. | |description=This page is a hub for everything related to Modding Baldur's Gate 3. Check out the following guides to learn how to mod BG3. | ||
|image=Modding_resources.webp | |image=Modding_resources.webp | ||
}}<div column-width: "60em2;> | }}{{NavModding}} | ||
<div column-width: "60em2;> | |||
[[File:ScreenshotHowToImportIt.webp|thumb|This should show up in your File> Import menu if you have the addon installed correctly.|306x306px]] | |||
In this tutorial we will assume you are generally knowledgable about how to use 3d software, so this will focus on things specific to Baldur’s Gate 3 exporter made by Norbyte. Remember, there are many general youtube tutorials about how to weight paint and edit meshes in Blender. | In this tutorial we will assume you are generally knowledgable about how to use 3d software, so this will focus on things specific to Baldur’s Gate 3 exporter made by Norbyte. Remember, there are many general youtube tutorials about how to weight paint and edit meshes in Blender. | ||
Line 19: | Line 22: | ||
==Extracting a model to work with== | ==Extracting a model to work with== | ||
[[File:NewBodyBlenderScreenshotImported.webp|thumb|Imported meshes.|187x187px]]Now open your modder’s multitool. Click ‘Search Index’. Filter by .GR2. Search something like HUM_F_ARM_ and browse the in game meshes available to regular size humanlike females. | [[File:NewBodyBlenderScreenshotImported.webp|thumb|Imported meshes.|187x187px]]Now open your modder’s multitool. Click ‘Search Index’. Filter by .GR2. Search something like HUM_F_ARM_ and browse the in game meshes available to regular size humanlike females. You may also wish to consult this table- [https://docs.google.com/spreadsheets/d/16uyC9UIJUmg1ciwsFfjdhsAbJAz320g2ei65BUGrnZg/edit#gid=1726617676 Clothing and Armor models by Saku]. (This lists HUM F only but most outfits fit male and other races as well) | ||
You should at least extract [[Modding:Body Models|HUM_F_NKD_Body_A]] (or whatever nude you are basing your outfit on) to fit your new outfit around. | You should at least extract [[Modding:Body Models|HUM_F_NKD_Body_A]] (or whatever nude you are basing your outfit on) to fit your new outfit around. | ||
Line 47: | Line 50: | ||
==Vertex Paint== | ==Vertex Paint== | ||
[[File:BlenderVertexPaintUnderwearExample.webp|thumb|This underwear has its green vertex paint, which tells it to vanish when a top is equipped.|171x171px]] | [[File:BlenderVertexPaintUnderwearExample.webp|thumb|This underwear has its green vertex paint, which tells it to vanish when a top is equipped.|171x171px]] | ||
Tab into '''Vertex Paint''' mode to look at | Tab into '''Vertex Paint''' mode to look at the naked body. | ||
The game’s armour system works by vertex paint. It uses this, in combination with the .lsx code, to tell it what to hide and what to show. For example, an armour mesh may unload the torso as it will not be shown. The bottom half of a pant leg may not show when boots are equipped. Genitals have their own vertex paint and only load in when nothing with the 'hide genitals' tag is equipped. You can use existing meshes as a reference for this. | The game’s armour system works by vertex paint. It uses this, in combination with the .lsx code, to tell it what to hide and what to show. For example, an armour mesh may unload the torso as it will not be shown. The bottom half of a pant leg may not show when boots are equipped. Genitals have their own vertex paint and only load in when nothing with the 'hide genitals' tag is equipped. You can use existing meshes as a reference for this. | ||
Line 62: | Line 65: | ||
If you intend to use part of an underwear mesh on an outerwear outfit, make sure you paint it black in Vertex Paint or it will hide when it’s not supposed to. | If you intend to use part of an underwear mesh on an outerwear outfit, make sure you paint it black in Vertex Paint or it will hide when it’s not supposed to. | ||
[[File:How2ViewVertyPaint.webp|thumb| | [[File:How2ViewVertyPaint.webp|thumb|How to view Vertex Paint in Object Mode|307x307px]] | ||
== How to Vertex Paint Sleeves and Pant Legs == | == How to Vertex Paint Sleeves and Pant Legs == | ||
Line 87: | Line 90: | ||
[https://www.youtube.com/watch?v=NCDGhz3RSr8 See this video] for how to fix meshes that import in with messed up normals and export looking like see through checkerboards. | [https://www.youtube.com/watch?v=NCDGhz3RSr8 See this video] for how to fix meshes that import in with messed up normals and export looking like see through checkerboards. | ||
You can also fix with '''[Edit Mode] Mesh> Clean Up> Merge By Distance''', and then put a solidify modifier at 00.1 thickness | You can also fix with '''[Edit Mode] Mesh> Clean Up> Merge By Distance''', and then put a solidify modifier at 00.1 thickness. | ||
[[File:How2ViewFaceorientationoverlay.webp|thumb|291x291px|How to view face orientation overlay on Blender. Blue is outside, red is inside. Red will be invisible in-game, unless you set up a 2 sided shader in your LSX code later.]] | [[File:How2ViewFaceorientationoverlay.webp|thumb|291x291px|How to view face orientation overlay on Blender. Blue is outside, red is inside. Red will be invisible in-game, unless you set up a 2 sided shader in your LSX code later.]] | ||
==Physics== | ==Physics== | ||
Unfortunately physics are not quite at game quality yet at this stage. | Unfortunately physics are not quite at game quality yet at this stage. | ||
Physics are set with red vertex paint. Hot pink | Physics are set with red vertex paint. Hot pink vertex paint counterbalances the physics. | ||
A cloth mesh (Generally named something like HUM_F_CLT_Daisy_Dress_A_Cloth_Mesh and will import in) is the collider mesh, which stops it clipping through things. Sadly you may need to delete it as it can cause your mesh to be exported with errors. | |||
[https://www.nexusmods.com/baldursgate3/articles/311 Here is a tutorial about how to add physics to your mesh by ReallyLazyIcarus.] | |||
Some people have had success pasting the code from in game meshes into their lsx mesh code, specifically clothbuffer values, which caused the physics to be less flappy and enabled the collider mesh to be exported without issues. Which is worth a try if you have a lot of patience and experience with coding. | |||
Some people have had success pasting the code from in game meshes into their lsx mesh code, specifically clothbuffer values, which caused the physics to be less flappy and enabled the collider mesh to be exported without issues. Which is worth a try if you have a lot of patience and experience with coding. | |||
[[File:ScreenyExampleOfPhysicsMesh.webp|thumb|134x134px|Example of red vertex paint for Physics. (Daisy Dress Mesh)]] | [[File:ScreenyExampleOfPhysicsMesh.webp|thumb|134x134px|Example of red vertex paint for Physics. (Daisy Dress Mesh)]] | ||
If you learn anything new, add it here! | If you learn anything new, add it here! | ||
== | ==Lods and Load Order== | ||
[https://www.youtube.com/watch?v=5TpdCBxYO1Q Here is a video of Padme’s addons being used.] | [https://www.youtube.com/watch?v=5TpdCBxYO1Q Here is a video of Padme’s addons being used.] | ||
Using Padme’s addon tool, click the button to generate LOD and you will have your nice new set of LODs. You may need to edit the LOD0 it’s a new mesh, as it won't know what settings a BG3 mesh should have. | Using Padme’s addon tool, click the button to generate LOD and you will have your nice new set of LODs. You may need to edit the LOD0 it’s a new mesh, as it won't know what settings a BG3 mesh should have. | ||
Line 123: | Line 114: | ||
'''-Lod Distance''' is the distance from which your mesh swaps to the next LOD. For this reason, your highest quality mesh should probably be something like 9-15 metres, your middle ones 15-20, while your last LOD always needs to be set to 0. Or it will vanish from a distance. There are certain cutscenes in Act 3 and elsewhere where your player character is seen from a very long distance, so this is important! | '''-Lod Distance''' is the distance from which your mesh swaps to the next LOD. For this reason, your highest quality mesh should probably be something like 9-15 metres, your middle ones 15-20, while your last LOD always needs to be set to 0. Or it will vanish from a distance. There are certain cutscenes in Act 3 and elsewhere where your player character is seen from a very long distance, so this is important! | ||
If you don’t particularly care about it performing well on bad computers, you can have no LOD and just set your high quality mesh to have a Lod distance of 0. | |||
'''-Export order.''' Generally all your LOD0 meshes go first, then your LOD1, LOD2, LOD3, assuming you have multiple LOD0 meshes. Look at imported game meshes for reference. If there is not a consistent 1, 2, 3, 4, export order, the mesh will refuse to export. | '''-Export order.''' Generally all your LOD0 meshes go first, then your LOD1, LOD2, LOD3, assuming you have multiple LOD0 meshes. Look at imported game meshes for reference. If there is not a consistent 1, 2, 3, 4, export order, the mesh will refuse to export. | ||
If you get the export order wrong in the code, some meshes may end up with the wrong material assigned to them. | If you get the export order wrong in the code, some meshes may end up with the wrong material assigned to them. | ||
==Exporting== | ==Exporting== | ||
Line 158: | Line 141: | ||
==Hotloading== | ==Hotloading== | ||
It is not only possible but very recommended to hotload meshes, it enables you to fix them in action. [[Modding:Hotloading|See here for how.]] | It is not only possible but very recommended to hotload meshes, it enables you to fix them in action. [[Modding:Hotloading|See here for how.]] | ||
== General Blender tutorials == | == General Blender tutorials == | ||
If you don't understand how to use Blender, start | If you don't understand how to use Blender, start with [https://www.youtube.com/@blenderguru Donut tutorial by BlenderGuru]. | ||
with [https://www.youtube.com/@blenderguru Donut tutorial by BlenderGuru]. | |||
You may also find [https://www.youtube.com/@TheRoyalSkies/playlists TheRoyalSkies short videos on Blender] to be helpful. | You may also find [https://www.youtube.com/@TheRoyalSkies/playlists TheRoyalSkies short videos on Blender] to be helpful. | ||
Line 175: | Line 154: | ||
[https://www.nexusmods.com/baldursgate3/mods/4310 Volno texture toolbox]- for previewing textures on the mesh. | [https://www.nexusmods.com/baldursgate3/mods/4310 Volno texture toolbox]- for previewing textures on the mesh. | ||
[[Category:Modding guides]] | |||
[[Category: |