How to use the Character Editor
Introduction
The Character Editor is responsible for the visual data of each character in the game, be it controllable or not.
It utilizes both Animation Rig data, 3D assets and textures. More about this later.
For this guide, Vemperen's Heads Repaired has been used for resource imports.
Preparation
Before we get to the Character Editor, a few preparations have to be made:
- Anything custom which will be imported has to be under the data path of "Baldur's Gate 3/Data/Public". Either use the Multitool to unpack a mod's pack and move its content there or make a new folder in Public, with your own creations copied there.
- Very Important: In the menu bar on top, under Preferences -> Global Settings -> Source Asset Data Path, set it to e.g. "C:/Program Files (x86)/Steam/.../Baldurs Gate 3/Data/". The exact path differs slightly, of course.
Importing Character Visuals and Models/Textures
- Before anything can be edited, the Character Visuals have to be overridden in the active mod, under the right-click menu on a resource. Go to the Resource Manager. Have "All" selected, above "Recents". Type in the character name in its search bar. Mind you, some NPCs have different file names from their in-game ones. To better find them only have the icon of two teapots (Character Visuals) checked/framed. 5th from right. For Astarion, it should look like in the example.
- In this case, Astarion has to use a custom head armature. Click on the "Add Resource" button. The following window pops up afterwards:
- With the preparations from above, and since Astarion will use one of Vemperen's heads, click on Model to import a head armature. A File Explorer window will pop up for it, navigate to where the specific head's .GR2 files are located, it should be two of them. Once selected, the window appears. Feel free to give it a name which makes it easy to distinguish and find. Click on Ok. A new window appears next:
- It is a non-textured head model. Click on Import. Once it is finished and back to the Resource Manager, the custom resource will appear in the list of resources of the active mod. In the Baldur's Gate 3 Data folder, it appears both under Processed and Public/ProjectName/HeadName.
- For Textures it is a similar process, so follow the same steps but select the texture after having clicked on the Texture button in the Resource Wizard. This applies to any kind of texture, not only CLEA, HMVY, BM, or at least any that is utilized for character models.
Using the Character Editor
- When everything has been imported, double-click on the Character Visual resource to be edited. A new window pops up and it looks like this:
- Let's go over the menu bar first. Under File: Open Character Visual, Close, Save, Save All, Load Preset, Save Preset. One small remark, a character's visual data can be saved as a preset and loaded in other files. Makes it easier for mass-editing. Under Edit: Undo, Redo, Remove Unused Resources. The last one is particularly good for removing any deleted imports not accessible anymore. Under View: Properties Explorer, Body Editor. These two are of utmost importance. In the middle of the screen is the Character Preview.
- Now, for anyone familiar with changing NPC Visuals, things will be easier to handle. Otherwise, this tutorial here is a recommended read.
- The Body Editor contains both the BaseVisuals as Rig Type and BodySetVisuals as Visuals. The Editor itself handles it well in that only certain Visuals are available to a Rig Type, so it is sorted already. No NPC has either of them set in stone, so they can be freely changed. Beneath those two, anything what is listed under "Slot" nodes in the .lsx code, is available. An important distinction: Body doesn't mean a character's body, but equipment slots for it, be it a chest armor or some kind of pants. They are also limited by the Rig Type and Visuals, so female armor cannot be selected for male characters under All Visuals, under the search bar. Here are the available Slots:
- As for the Properties Explorer, meshes and textures are found under "Override Parameters". Any materials selected in the Body Editor can be found here. So Head, Body (not Equipment!), Armor pieces, Wings, Hair, it can be found here. Each texture can be modified with various parameters and textures can be chosen for each mesh. The former can be seen in the image under key point 1 of this paragraph, the latter with this image:
- As an example, two more images will be provided, but first some information. If any material is missing a texture it will show up as what is names as "Engine_Default_Mesh_Lit_Opaque". There are also textures which can be defined as "global" textures, meaning they aren't sparsely used on just one character, but widely. SHARED_LashShadow and the other three SHARED_ textures in one of the next two images are such. Play around with them, but not every texture will apply well on each type of material/model. Anyway:
- Under Presets are all the MaterialPresets from the code and the Parameters. There are only Scalar, Vector2, Vector3, Vector (technically Vector4), Texture and VirtualTexture parameters which can be found here. The latter two are of no importance here. Every other parameter has one to four float (decimal) values, with Scalar having one and Vector having four. As with the Override Parameters, play around with the Presets. A tip, there are presets available under each Preset. To give an example, 06Eyes and the various eye colors in the Character Creation menu.
- When all is done, do not forget to save under File! The Toolkit should ask if you if you want to save if you didn't, though.
Root Templates
- To get the new Character Visual working, the mod requires a RootTemplate file. Even more data with imported resources, but more about this below. The Root Templates follow the same procedure as other resources under the resource manager, but this time Root Templates window below the Manager is utilized. All of them can be found under these four: Gustav, GustavDev, Shared, SharedDev. Use the window's search bar to find the right file. Right-click on it and click on "Override in Active Mod".
- Navigate to the Resource Manager, select the RootTemplate in the mod. In the sidebar to the left, is all the information necessary. Of most importance are EquipmentClass and ParentTemplateID. They have to be the correct ones for the new Rig Type and Visuals. So, for example, if it is an elf, it has to be the equipment class for elves and, in case of Astarion, Elves_Female_Players or something like this for ParentTemplateID.
- Small remark again: I did this manually and haven't utilized the Toolkit for RootTemplates. So this may or may not work. A UUID should be provided with the RootTemplate in the Toolkit so it can be looked up via the Multitool search feature and be created manually, then moved to the mods RootTemplate folder. Which should be under Data/Public/ProjectName.
Further Requirements for Custom Heads
In case of custom resources, there is often more data which has to be imported to the mod. In the case with my mod of Astaria, SkeletonBank, MaterialBank, AnimationBank, AnimationSetBank, AnimationBlueprintBank. TextureBank in case for any imported textures. A quick rundown of the purpose of them. And a disclaimer again, I did this manually and haven't utilized the Toolkits features for these banks. In case of Vemperen's Heads, the .lsx file was found under Data/Public/vemperens_heads/Content/[PAK]_vemperens_heads, as it has been moved to the Baldur's Gate 3 folder. Which is necessary, to my knowledge. The banks copied from it are in green:
- SkeletonBank: Anyone who has taken a look at i.e. a head armature in Blender has noticed its bones aka skeleton. They are responsible for the correct form of the model.
- MaterialBank: Forgot what it is again for, but it it uses common files.
- AnimationBank: Facial Expressions.
- AnimationSetBank: Contains IDs of the AnimationBank resources and then corresponding Mapkeys for Blueprints and Head Assets.
- AnimationBlueprintBank: Genomes. IK nodes and their rigging. Foundational code stuff. It can be accessed via the Genome Editor in the Toolkit, but this is for another guide in the future.
Setting up the Banks
While the Toolkit allows to access these banks, I haven't tried out using the option. So, for the manual method, along with trouble-shooting, here are a few things that require to be done before the mod shows the custom head properly in-game:
- SkeletonBank ID from the custom head has to be the UUID for SkeletonResource in both VisualBank and AnimationBank.
- Bounds Min and Bounds Max have to be copied from the mod the head armature is from. Found under VisualBank.
- Same with AnimationSetOverrides and AnimationWaterfall nodes. Copy them from the head armature mod to the VisualBank.
- BlueprintInstanceResourceID under VisualBank has to be taken from the AnimationBlueprintBankID of the head it replaces. In case of Astaria, to give an example, it is from ELF_M_Head_Astarion, or something similar. Found under either Gustav or Shared and their Content folder.
FAQ
- Help! The eye mesh disappears when zooming towards the character's head in the Character Editor! - Just an issue of the Toolkit, it displays normally in-game if everything else has been done properly.
- Help! The head is stretched and deformed! The eyes and face is set in front of the head! - SkeletonBank issue.
- Help! The head is shown and animated, but looks deformed or has wrong proportions! - Do not use AnimationWaterfall nodes from other heads. Only the custom/imported one.
- Help! The had is floating above the body, with empty space between the chest and neck! - I forgot the exact reason, but it may be AnimationBluepringBank or Min/Max bounds under VisualBank.
To-Do List
- Import models for other slots and see how it differs from using a custom head for a mod.