Modding:Hair Mod Mesh Setup: Difference between revisions

Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
<div class="nomobile" column-width: "60em2;>
{{PageSeo
{| class="nomobile" style="text-align:center; margin: auto; border:1px solid #785000; font-size:83%; background-color:#1B1B1B; width: 60;" ;
|title=Modding Resources
|- style="font-weight:bold; background-color:#281C14; color:#c27736; border:0px none;"
|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.
| colspan="2" |
|image=Modding_resources.webp
[[File:bgwiii.png|30px|link=Template:NavWiki]] [[BG3Wiki:Community|Community]] • [[Guide:Guides|Guides]] • [[Modding: Modding resources|Modding]]
}}{{NavModding}}
|-
| style="background-color:#28201B; color:#c27736; width: 15%;" |[[:Category:Modding|Modding guides]]
| style="text-align:left; padding:0 4px;" |<div class="navcat" ;>
<categorytree hideprefix="1" hideroot="1" mode="pages">Modding guides</categorytree>
</div>
|}</div>Welcome to the mesh creation portion of making a hair mod. For the file setup portion, see [[Guide:Hair Creation]].<div class="noexcerpt navigation-not-searchable" style="text-align:center"><span class="nodesktop"> [[Modding:Index|Modding index]] </span></div>So, you wanna make a hair mod for Baldur’s Gate 3. How do you do that, though? This guide will show you how.


=== Essential Tools ===
Welcome to the mesh creation portion of making a hair mod. For the file setup portion, see [[Guide:Hair Creation]].<div class="noexcerpt navigation-not-searchable" style="text-align:center"><span class="nodesktop"> [[Modding:Index|Modding index]] </span></div>So, you wanna make a hair mod for Baldur’s Gate 3. How do you do that, though? This guide will show you how.
 
===Essential Tools===
First off, get yourself these tools.
First off, get yourself these tools.


* [https://www.blender.org/download/lts/3-6/ Blender] (version 3.6 recommended)
*[https://www.blender.org/download/lts/3-6/ Blender] (version 3.6 recommended)
* [https://github.com/Norbyte/lslib Lslib] by Norbyte
* [https://github.com/Norbyte/lslib Lslib] by Norbyte
* [https://github.com/ShinyHobo/BG3-Modders-Multitool BG3 Multi-Tool] by ShinyHobo
*[https://github.com/ShinyHobo/BG3-Modders-Multitool BG3 Multi-Tool] by ShinyHobo
* [https://github.com/Norbyte/dos2de_collada_exporter Collada/GR2 import/export Blender plugin] by Norbyte
*[https://github.com/Norbyte/dos2de_collada_exporter Collada/GR2 import/export Blender plugin] by Norbyte


Because we’ll be using Blender to make the mesh for our hair mod, we recommend at least having a cursory knowledge of how to use Blender before attempting to follow this guide. If you don’t have that, we recommend [https://youtube.com/playlist?list=PLjEaoINr3zgEPv5y--4MKpciLaoQYZB1Z&si=GqdmSXxoU6_-RorW Blender Guru’s Donut tutorial series]. But any tutorial that teaches you the basics of how to move around, shape the mesh, create objects, etc, should be fine.
Because we’ll be using Blender to make the mesh for our hair mod, we recommend at least having a cursory knowledge of how to use Blender before attempting to follow this guide. If you don’t have that, we recommend [https://youtube.com/playlist?list=PLjEaoINr3zgEPv5y--4MKpciLaoQYZB1Z&si=GqdmSXxoU6_-RorW Blender Guru’s Donut tutorial series]. But any tutorial that teaches you the basics of how to move around, shape the mesh, create objects, etc, should be fine.
Line 27: Line 23:
We recommend creating a project folder to hold your various hair mod files.
We recommend creating a project folder to hold your various hair mod files.


=== Loading a Mesh ===
===Loading a Mesh===
Let’s load a hair mesh into Blender! Go to the [[Modding:Hair Meshes]] page and pick a mesh that you like. Take note of the Asset Name—that’s what it’s called in the game files. Open the Multitool and search the index for this Asset Name. It should have a .GR2 extension, e.g.  Hair_GTY_F_GithyankiCut_Short_A_Spring.GR2. Once you find it, copy it to your project folder to make it easier to find. Then go into Blender, go to File, and Import the .GR2.
Let’s load a hair mesh into Blender! Go to the [[Modding:Hair Meshes]] page and pick a mesh that you like. Take note of the Asset Name—that’s what it’s called in the game files. Open the Multitool and search the index for this Asset Name. It should have a .GR2 extension, e.g.  Hair_GTY_F_GithyankiCut_Short_A_Spring.GR2. Once you find it, copy it to your project folder to make it easier to find. Then go into Blender, go to File, and Import the .GR2.


Line 42: Line 38:
If you want to see how the hair looks on a head, you can import a head model into Blender too using the exact same method you used for the hair. Just make sure the race of the [[Modding:Head Models|Head Model]] you choose matches the hair you’re working with—so if you’re editing HAIR_HUM_F_Afro_Long_A, choose a human or humanlike head.
If you want to see how the hair looks on a head, you can import a head model into Blender too using the exact same method you used for the hair. Just make sure the race of the [[Modding:Head Models|Head Model]] you choose matches the hair you’re working with—so if you’re editing HAIR_HUM_F_Afro_Long_A, choose a human or humanlike head.


=== Editing the Mesh in Blender ===
=== Editing the Mesh in Blender===
Now comes the fun part—playing with the hair in Blender. Make it longer or shorter, remove some parts, add some parts. There’s a lot you can do even without making any custom hair parts from scratch, so get creative!
Now comes the fun part—playing with the hair in Blender. Make it longer or shorter, remove some parts, add some parts. There’s a lot you can do even without making any custom hair parts from scratch, so get creative!


==== Mesh Editing FAQ ====
====Mesh Editing FAQ====
Here are some common issues you might run into while editing the hair in Blender:
Here are some common issues you might run into while editing the hair in Blender:


Line 60: Line 56:
'''None of the vanilla hairs seem to have the part I want. Can I make my own custom hair for BG3?''' Tutorial for this coming soon(TM)!
'''None of the vanilla hairs seem to have the part I want. Can I make my own custom hair for BG3?''' Tutorial for this coming soon(TM)!


==== Autosnapping Weights ====
====Autosnapping Weights====
Padme has [https://youtu.be/siC6fak9zDM?si=vFQBBiLNV79kUVkt&t=298 a great video here] that explains how to use a vanilla mesh to transfer weights to your new hair. It's recommended to find the vanilla hair that looks most similar to your hair, and use that.
Padme has [https://youtu.be/siC6fak9zDM?si=vFQBBiLNV79kUVkt&t=298 a great video here] that explains how to use a vanilla mesh to transfer weights to your new hair. It's recommended to find the vanilla hair that looks most similar to your hair, and use that.


==== Non-Autosnapping Weights ====
====Non-Autosnapping Weights====
If your hair is crunching really badly with autosnap, you might want to re-weight it to be non-autosnap. How do you do that? It's fairly simple: wipe out all of the existing vertex groups on your hair. Create a new vertex group and name it Head_M (mind the capitalization). Assign your hair mesh to that vertex group. If your hair is shorter than the character's shoulders, you're done! If it's longer and you want it to move somewhat with the upper body, create another vertex group called Chest_M, and use the gradient tool in Weight Paint mode to weight from the bottom up. Test in game and adjust as necessary. Those two vertex groups are probably all you need for non-autosnapping. Make sure when you're setting up the files later that you turn off autosnapping in there, too, otherwise your hair won't behave properly. Remember that turning off autosnap means you have to manually refit the hair for every body type that you want it to be available for... which is a pain.
If your hair is crunching really badly with autosnap, you might want to re-weight it to be non-autosnap. How do you do that? It's fairly simple: wipe out all of the existing vertex groups on your hair. Create a new vertex group and name it Head_M (mind the capitalization). Assign your hair mesh to that vertex group. If your hair is shorter than the character's shoulders, you're done! If it's longer and you want it to move somewhat with the upper body, create another vertex group called Chest_M, and use the gradient tool in Weight Paint mode to weight from the bottom up. Test in game and adjust as necessary. Those two vertex groups are probably all you need for non-autosnapping. Make sure when you're setting up the files later that you turn off autosnapping in there, too, otherwise your hair won't behave properly. Remember that turning off autosnap means you have to manually refit the hair for every body type that you want it to be available for... which is a pain.


=== Exporting the Mesh ===
===Exporting the Mesh===
If using the GR2 plugin, you want to first make sure you have your export order set up, which you can find in the Object Properties tab:
If using the GR2 plugin, you want to first make sure you have your export order set up, which you can find in the Object Properties tab:
[[File:Exportorder.webp|none|frame]]
[[File:Exportorder.webp|none|frame]]
Line 79: Line 75:
The settings below this cutoff remain as they are by default. If you don't apply transforms, turn back on the Convert to Y-Up.
The settings below this cutoff remain as they are by default. If you don't apply transforms, turn back on the Convert to Y-Up.


=== Conforming with LSLib ===
=== Conforming with LSLib===
After exporting the mesh from Blender, there's one more step you need to follow: conforming to a vanilla skeleton with LSLib. Why? We're not totally sure, but we do know that hair gets very wacky in game if you don't do this.
After exporting the mesh from Blender, there's one more step you need to follow: conforming to a vanilla skeleton with LSLib. Why? We're not totally sure, but we do know that hair gets very wacky in game if you don't do this.