200
editsMore actions
Modding:Creating and Exporting Meshes in Blender (edit)
Revision as of 12:35, 30 December 2023
, 30 December 2023no edit summary
(Created page with " In this tutorial I will assume you are generally knowledgable about how to put meshes together, so this will focus on things specific to Baldur’s Gate 3 exporter. ==Setup== modder’s multitool First you need Blender 3.6 and to install Norbyte’s Blender installer. https://github.com/Norbyte/dos2de_collada_exporter Make sure you install it correctly- this video is quite out of date but should give you some example of how to install it. You should also install Padme...") |
No edit summary |
||
Line 3: | Line 3: | ||
==Setup== | ==Setup== | ||
[[Modding:Tools Check here for a list of tools.]] | |||
Here we are using Modder's Multitool, Blender 3.6, and [[https://github.com/Norbyte/dos2de_collada_exporter Norbyte’s Blender installer.]] | |||
https://github.com/Norbyte/dos2de_collada_exporter | |||
Make sure you install it correctly- this video is quite out of date but should give you some example of how to install it. | Make sure you install it correctly- this video is quite out of date but should give you some example of how to install it. | ||
You should also install | You should also install [[https://www.nexusmods.com/baldursgate3/mods/346 Padme’s Addon, ‘Create LODs’]]. | ||
https://www.nexusmods.com/baldursgate3/mods/346 | |||
==Extracting a model to work with== | ==Extracting a model to work with== | ||
Now open your | 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 | |||
You should at least extract HUM_F_NKD_Body_A (or whatever nude you are basing your outfit on) to fit your new outfit around. | |||
When you have found a t-posing model to your liking. Click the extract file/open folder. You should find the mesh in .GR2 and .dae form on your computer. Use the .dae- the Blender importer likes .dae format a lot more than it likes .gr2. | When you have found a t-posing model to your liking. Click the extract file/open folder. You should find the mesh in .GR2 and .dae form on your computer. Use the .dae- the Blender importer likes .dae format a lot more than it likes .gr2. | ||
You generally cannot import a modded-in mesh without the plugin crashing Blender. Hopefully you save your own work often and can re-export it from there, and have obtained permission to edit all the modded items you want to import | '''You generally cannot import a modded-in mesh without the plugin crashing Blender.''' Hopefully are sensible and you save your own work often and can re-export it from there, and have obtained permission to edit all the modded items you want to import anyway. | ||
==Importing== | ==Importing== | ||
Your armatures will import in at 90 degrees. This will cause it to export flat to the floor and follow a naked character around like a | Your armatures will import in at 90 degrees. This will cause it to export flat to the floor and follow a naked character around like a weird windsock, so you need to fix it. '''[Object Mode] Object > Apply> All Transforms''' on the armature, until the coordinates for its location all read '''0, 0, 0'''. You may need to do the same thing on the mesh as well. | ||
The mesh will import in with 1 or more LODS. These are level of detail meshes, intended to be viewed at a distance so they are lower poly. You only need the best quality one as we are making new LODs later, so delete anything that has LOD in the name. | The mesh will import in with 1 or more LODS. These are level of detail meshes, intended to be viewed at a distance so they are lower poly. You only need the best quality one as we are making new LODs later, so delete anything that has LOD in the name. | ||
Line 27: | Line 27: | ||
==Vertex Paint== | ==Vertex Paint== | ||
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. 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. You can use existing meshes as a reference for this. [[Modding:VertexColorMaskSlots Check here for a resource and Hex codes for the vertex paint.]] | ||
The HUM_F_NKD_Body_A is useful as reference here. For example if you set an upper arm to be hidden for some gloves, you may wish to fit it around these seams to ensure there is no gap in the body showing. | The HUM_F_NKD_Body_A is useful as reference here. For example, if you set an upper arm to be hidden for some gloves, you may wish to fit it around these seams to ensure there is no gap in the body showing. | ||
You can turn on the vertex paint to look at it in non-Vertex Paint modes by touching the Blender attributes menu. | You can turn on the vertex paint to look at it in non-Vertex Paint modes by touching the Blender attributes menu. | ||
Line 36: | Line 36: | ||
==Fixing meshes that import in wrong== | ==Fixing meshes that import in wrong== | ||
See this video https://www.youtube.com/watch?v=NCDGhz3RSr8 | See this video https://www.youtube.com/watch?v=NCDGhz3RSr8 | ||
Sometimes, | Sometimes meshes will import in stuck together, usually on skirt meshes. This is because the verts were too close together and the importer made a hiccup. You can also fix with '''[Edit Mode] Mesh> Clean Up> Merge By Distance''', and then put a solidify modifier at 00.1 thickness. | ||
Line 53: | Line 52: | ||
Using Padme’s addon tool, click the button to generate LOD and you will have your nice set of LODs. | Using Padme’s addon tool, click the button to generate LOD and you will have your nice set of LODs. | ||
You may need to edit | You may need to edit the LOD0 it’s a new mesh as it won't know what settings a should have. | ||
-LOD | |||
-Lod Distance is the distance from which your mesh swaps to the next LOD. For this reason your high quality should probably be something like 9-15 metres, while your last LOD always needs to be set to 0. 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. | '''LOD Level''' is what level of LOD it is. Meshes generally have no more than 4-5 LODS, usually depending on how 'common' an asset it is. (A common peasant shirt will have many LODS while an armour intended only for the player may have only 1 LOD.) | ||
-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 export order, the mesh will refuse to export. If you get this wrong in the code some meshes may end up with the wrong material assigned to them, but no other consequences. | '''-Lod Distance is the distance from which your mesh swaps to the next LOD.''' For this reason your high quality should probably be something like 9-15 metres, while your last LOD always needs to be set to 0. 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 export order, the mesh will refuse to export. If you get this wrong in the code some meshes may end up with the wrong material assigned to them, but no other consequences. | |||
==Exporting== | ==Exporting== | ||
Line 68: | Line 68: | ||
==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.]] |