Ad placeholder

Modding:Creating and Exporting Meshes in Blender: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
 
(7 intermediate revisions by 2 users not shown)
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
}}{{NavModding}}
}}<div column-width: "60em2;>{{Modding box}}{{Modding sidebar}}[[File:ScreenshotHowToImportIt.webp|thumb|This should show up in your File> Import menu if you have the addon installed correctly.|306x306px]]
 
<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 22: Line 19:


==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. 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)
[[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 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 90: Line 87:
[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. Recalculate Normals> Average Face Area may also help.
 
Alternately, select all, alt+n to average face area. If any blue lines on the edges appear, select edges, then 'clear sharp' and alt+n average face areas again.
[[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==
[https://www.nexusmods.com/baldursgate3/articles/311 Here is a tutorial about how to add physics to your mesh by ReallyLazyIcarus.]
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 vertex paint counterbalances the physics.
Physics are set with red vertex paint. Hot pink and blue vertex paint counterbalances the physics.
 
If a mesh is 100% weighted to a single bone, adding physics will cause it to crash the game. If you are making a helmet item and therefore need it to be entirely static, weight some of it to the piercing bones as they also do not move.
 
A mesh cannot be entirely vertex painted red or it will bounce around, it needs some black vertex paint left to keep it in place.
 
If your mesh is creasing up at the back, you may want to lower the vertex paint to be lower down.


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.
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. [https://docs.google.com/document/d/1nb_B2uz8Xlakhoa7XNf4IRU8mMisGPZyQEkydlZQdD0/edit?usp=sharing A tutorial can be found for this here.]  
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. [https://docs.google.com/document/d/1nb_B2uz8Xlakhoa7XNf4IRU8mMisGPZyQEkydlZQdD0/edit?usp=sharing A tutorial can be found for this here.]  
[[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)]]
Some people have also experimented with not exporting the mesh and setting non-skirt parts of the original mesh to use an invisible material, then combining it with their own torso in a roottemplate.
If you learn anything new, add it here!
If you learn anything new, add it here!


Line 122: Line 129:


=== '''Using No LODs''' ===
=== '''Using No LODs''' ===
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.
If you don’t particularly care about it performing well on bad computers, you can have no LOD meshes and just set your high quality mesh to have a LOD distance of 0.
 
== Weight Painting ==
If you hand edited the weight paints and now your outfit is squiggling, you may need to limit the total amount of vertices affected by the weight.
 
''Weight Painting Mode> Weights > Limit Total''
 
Usually the default '4' will work, but you may wish to try '2' if it persists.


==Exporting==
==Exporting==
Line 144: Line 158:
==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.]]
Although it has to have the same mesh order as the thing you are replacing.


== General Blender tutorials ==
== General Blender tutorials ==
If you don't understand how to use Blender, start with [https://www.youtube.com/@blenderguru Donut tutorial by BlenderGuru].
If you don't understand how to use Blender, start
[[Category:Modding guides]]
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 157: Line 175:
[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]]
{{Modding navbox}}
[[Category:Armor modding]]

Navigation menu