The Witcher 3
0 of 0

File information

Last updated

Original upload

Created by

bathsebah

Uploaded by

bathsebah

Virus scan

Safe to use

Tags for this mod

35 comments

  1. bathsebah
    bathsebah
    • premium
    • 206 kudos
    Locked
    Sticky
    FAQ for common issues related to hair modding

    Hair textures don't load / have no transparency
    Spoiler:  
    Show
    Yes, transparency flag tends to be lost on import sometimes. You can try using different import software (switching to other ModKit UI/using newer version of WolvenKit) and see if it works, but it is more convenient to enable the flag manually.

    To do that, you need WolvenKit (any version) and a cooked mesh to edit.
    > import and cook your mesh using any software you like
    > copy it's .w2mesh AND .w2mesh.buffer files from Cooked directory
    > create a mod project in WolvenKit
    > add folder structure leading to your mesh in Cooked directory (WolvenKit v0.7+) or Bundle directory (WolvenKit v0.6 and older)
    > paste .w2mesh and .w2mesh.buffer
    > open .w2mesh file and, in MaterialInstance, tick "EnableMask" flag (WolvenKit v0.7+) or find a source to copy the flag from and past it to your mesh (WolvenKit v0.6 and older); for source w2mesh, use any vanilla hair or lace mesh; make sure the file tree looks similar to vanilla mesh;
    > save the file, pack and install your mod. Enjoy!

    How it should look for
    WolvenKit v0.6 and older
    WolvenKit v0.7 

    Hair mesh is moving weirdly, is stretched at all times or has missing parts of a mesh
    It's most likely due to Weight Paint issues or rig/skeleton/armature issues.

    Some parts of a hairstyle are missing in game:
    Spoiler:  
    Show
    For missing parts, make sure all of the vertices of your mesh are having at least one vertex group weighted. In Blender, you can check if it's fully weighted if you
    > click on your armature and select Pose Mod
    > select all the bones of your armature
    > move it around

    If some parts of your mesh are not moving along the armature and are stretching instead, you should adjust Weight Paints on those areas.

    Weird movement/stretching in game:
    Spoiler:  
    Show
    If you were trying for example to mix two hairstyles, or to exchange npc's hairstyles' meshes between each other by editing/replacing .w2meshes, you could have mismatched bones names and bones placement between your mesh and in game rig for hanging/dangling objects -- dyngset.

    Make sure you are using corresponding vanilla armature in your mesh and dyngset in your hairstyle's w2ent

    Combining two or more hairstyles/pieces together using two or more dyngsets:
    Spoiler:  
    Show
    You can see it in action in Jato's Triss Appearance Overhaul (~3 combined dyngsets) or my Triss Glorified Wardrobe mod (2 dyngsets);
    pros: looks great, flies around pretty, is pleasant to look at
    cons: tiresome to make it work

    To do that, you would have to combine your hairstyle of two or more independent meshes with own armatures linked each to own dyngset, and then enable both meshes on a character in game at the same time. Practically, we have to make character to wear two or more hairstyles at the same time.

    Modelling workflow:
    > find source dyngsets in game (Geralt's Doppler is great for such research)
    > find hairstyle meshes using those dyngsets
    > import the source meshes to 3d software
    > combine, model and edit your hairstyle
    ! do not try to add bones to vanilla armature, do not try to merge armatures, it only leads to game crashes;
    ! keep mesh parts related to different armatures separated, so that you can keep track of weight paint;
    > export each part's mesh from blender to fbx, one mesh & armature per fbx
    > assign material to it in an .xml file
    > import & cook your mesh

    How to enable both or more parts in game:

    There is two ways of doing it: first way is of having two independent items forming one hairstyle enabled on an actor at the same time;
    second: of having an item with 2 or more dyngsets and two or more mesh component, so that you can replace vanilla hair item with it, for example;

    Explanation of a first method:
    part 1 of a hairstyle:
    item w2ent: characters\models\main_npc\triss\c_01_wa__triss.w2ent
          has selected dyngset: characters\models\main_npc\triss\h_01_wa__triss\c_01_wa__triss.w3dyng
              and mesh: characters\models\main_npc\triss\h_01_wa__triss\c_01_wa__triss.w2mesh

    part 2 of a hairstyle:
    item w2ent: characters\models\main_npc\yennefer\c_01_wa__yennefer.w2ent
          dyngset: characters\models\main_npc\yennefer\h_01_wa__yennefer\c_03_wa__yennefer_dyng.w3dyng
              mesh: characters\models\main_npc\yennefer\h_01_wa__yennefer\c_01_wa__yennefer.w2mesh

    actor's w2ent: characters\npc_entities\main_npc\yennefer.w2ent
          has an appearance "yennefer_gown"
                which consists of: torso
                                                head
                                                pendant
                                                part 1 of a hairstyle: characters\models\main_npc\triss\c_01_wa__triss.w2ent
                                                part 2 of a hairstyle: characters\models\main_npc\yennefer\c_01_wa__yennefer.w2ent

    screenshot

    this is easy to make, but the packed mod would be incompatible with any other mod editing the same actor's entity in any way.
    Alternatively, you can make a DLC that only edits one appearance slot, so that it would actually be compatible with other mods besides the appearance(s) you've edited;

    Explanation of a second method:
    you should either find an item entity that has 2 or more dyngsets attached to it, or you have to make one yourself. At this point in time, even the latest public versions of WolvenKit are very buggy and so making such entity from scratch can be a nightmare. You can always borrow some vanilla one and change paths though! For example, Anarietta's traveling torso has two dyngset slots:


    So I can copy this w2ent, disable all the mesh components (by leaving mesh paths empty/leading nowhere OR by deleting them from w2ent entirely), but those connected to CAnimDagnleComponents as I plan to use them, and to update dyngset and w2meshes paths to my mesh parts.

    It would roughly look like so:
    item w2ent: dlc\bob\data\characters\models\main_npc\anna_henrietta\body_03_wa__anna_henrietta_travel.w2ent
           dyngset 1characters\models\main_npc\triss\h_01_wa__triss\c_01_wa__triss.w3dyng
                mesh 1characters\models\main_npc\triss\h_01_wa__triss\c_01_wa__triss.w2mesh
           dyngset 2characters\models\main_npc\yennefer\h_01_wa__yennefer\c_03_wa__yennefer_dyng.w3dyng
                mesh 2characters\models\main_npc\yennefer\h_01_wa__yennefer\c_01_wa__yennefer.w2mesh

    When done, rename and either replace vanilla hair w2ent for the character you need, or edit appearance like in the first method inheriting the same compatibility issues. 
    1. lucassra
      lucassra
      • member
      • 3 kudos
      Hey there!
      First of all thanks for the tips. I did a basic npc hair swap for triss and I'm getting the weird movement you mention in the FAQ. I understand why it's happening but I don't know what you mean by "in game rig for hanging/dangling objects -- dyngset". What software are you using on that screenshot? I exported the entire Triss model folder but didn't found the file you are highlighting in there. Thanks. 

      edit: I figured it out, thanks anyway!
  2. lufusol
    lufusol
    • premium
    • 63 kudos
    Ohmigawsh, bathsebah you are an inspiration and a also like a very cool bug to me.  Thank you for this tutorial!

    I'm still on 3.3.0 but the latest stable version of blender is now 3.4.1...I'm not sure for exactly how long, but it has native FBX import. 
    - Is this sufficient?  Or do we still need to use an older version of Blender along with KoalaNalle's 2.76 plugin to import FBX and then save it and bring it into newer versions of blender?  There are no options given at the time you choose which FBX file to import in 3.3+, but it appears that normals are automatically imported anyway.
  3. Nohuman02
    Nohuman02
    • member
    • 6 kudos
    Hello, i'm willing to make mods by myself for Nexus people, but the thing is that i don't know where to start or what to use exactly. I've been searching and i know that i'll need Modkitchen and Wolvenkit plus Blender, but all seems a little hard and confusing (Yeah, i'm a noob with these things, besides, i just look forward to edit hair, armors, outfits and that things for the moment, until i have enough experience to do some other mods such as Gameplay changes and other things).

    Any suggestions/advices to start?

    TY!
  4. markuswankus
    markuswankus
    • member
    • 0 kudos
    Thank you for this awesome tutorial, however I am having some fundamental problems trying to modify the mesh of a hair model in the game. 

    My problem is that I can edit the mesh, and create a mod that shows my edited mesh, but the hair is completely detached from Geralt in the game and stays in one spot. I am obviously not importing or exporting to/from Blender properly. Any ideas?

    I see you've linked to a tutorial on this (https://www.nexusmods.com/witcher3/mods/3498) but that link seems to have disappeared. Is there any other way to get this old tutorial?
    1. markuswankus
      markuswankus
      • member
      • 0 kudos
      I found my problem. I needed to convert to .dae with Visual Studio first!
    2. bathsebah
      bathsebah
      • premium
      • 206 kudos
      Hello!
      Yeah, Jato left Nexus, and so his beautiful resources are gone 3:
      Still, there is a link to a Blender 2.92 patch that prepares fbx for editing and importing back to game:
      https://discord.com/channels/728022548796801064/747494223703572612/859212491207999508

      Install it so that the Armature is now correct in Blender for fbx meshes. Then, you can skip any dae / visual studio steps.
  5. fidox7
    fidox7
    • member
    • 10 kudos
    Hey! First of all, nice tutorial!

    I'm currently in the making of a hair replacement mod for Geralt that's based on Ragnar Lothbrok's hair from scratch. I'm halfway there with the model, and f I've made Geralt a new face just to get the hang of the procedure of exporting importing cooking and stuff. Now the next step should be to take a peek of the yet-basic model, how it looks ingame. The model's rigged it shows ingame but I just can't get the textures working, it's not 3ds max's fault 'cause the head model was just fine.

    If you can help me out here or in DM I'd be grateful. Thanks in Advance!
    1. bathsebah
      bathsebah
      • premium
      • 206 kudos
      Oh... I.... Forgot I received that comment. Oops! Sorry!

      I saw you releasing it, so I guess it went ok afterwards. Please don't hesitate writing a DM next time, if the help would be needed.
    2. fidox7
      fidox7
      • member
      • 10 kudos
      Yeah I managed it but I had to use a wierd workaround.
      I can only cook with Modkitchen, everything else won't work. But if I use modkitchen the xml info gets broken(I think). In wolven kit I could see that the Cmaterialinstance's Instanceparameters "folder" is empty in the w2mesh file. So I have to copy these parameters from a pre-existing one to the new one, then make the w2mesh file write-protected, then cook it again in ModKitchen. It's kinda annoying. So if you have any idea what is at fault please help me!

      Cheers!
    3. bathsebah
      bathsebah
      • premium
      • 206 kudos
      My reply got a bit long and personal so I wrote you a DM instead of a comment ;^)
    4. SleepingUte47120
      SleepingUte47120
      • member
      • 0 kudos
      Hey guys,

      First off, thank you for this guide! It's been helpful!

      I've been working for a while on trying to create a mod but I'm running into an issue. I am trying to take the "Alternate Olgierd Hairstyle" - from the below two mods on nexus - and make the hair black instead of white. I have two mods that change the hair colors (scalp included) to black to both regular and Hairworks, and these mods work! For ALL the hairstyles EXCEPT this particular one.

      https://www.nexusmods.com/witcher3/mods/4400 (hair name = alternate olgierd hair")

      https://www.nexusmods.com/witcher3/mods/2749 (this mod is just this particular hairstyle)

      I'm not a modder so after weeks of fiddling around and watching videos etc, I finally figured out how to change the hair color and it shows up in the game the color I want it to (I've done this by replacing the original "Spiked Tail" hair in the DLC2 file)

      however... my issue now that I'm stuck on is what seems to be a physics issue? I've attached a picture.
      When you stand up it looks like the tip of the hair is static, and the root moves with the head. If I take a step forward, the roots follow the head like normal but the mesh stretches and the tips of the hair drag behind and only catch up when I stop moving.

      I've tried making sure I have my .reddlc file, my w2ent file, my updated Diff & Norm files. An updated "root color" file. I've changed the specular color and variance color in the w2mesh info via Wolvenkit. I've tried adding the corresponding dyng file and head mesh file. I tried my hand at weight painting in Blender. I've tried importing/exporting FBX/DAE files via other applications in case Blender is messing up the file. I have my buffer file there. I've tried uninstalling ANY mod I have that even touches hair/face/head anything and it still does the same thing.

      I'm out of ideas! I'm using WolvenKit and ModKitchen to tackle this.



      Any advice is appreciated!
    5. bathsebah
      bathsebah
      • premium
      • 206 kudos
      Sounds like an issue with weights or skeleton.
      If you didn't export and edited the .w2mesh, make sure that your w2ent is set up to have matching set of w2mesh and w3dyng.
      If you edited it, make sure all of the vertices are weighted by at least one vertex group. If they are, check the list of vertex groups and make sure they correspond with bones in your armature. Also, make sure your armature corresponds with the w3dyng by comparing bone names between the two.
    6. SleepingUte47120
      SleepingUte47120
      • member
      • 0 kudos
      Thanks for the advice! I have a question:

      The original mods (both of them) work already, so I assume the vertices are weighted and such. I'm only changing the diffuse attached and the shader color in Blender. I'm not touching any of the bones or anything. Does exporting the file to an FBX make it so it has to be re-weighted?

      I'm sorry if I sound like I don't know what I'm talking about because I dont haha. Blender has been a huge learning curve for me.
  6. sabateur12
    sabateur12
    • premium
    • 88 kudos
    hey awsome tutorial i managed to get olgierd beard for geralt i only have 1 problem i tried to replace npc hair for geralts hair its ingame only the hair looks blocky like the hair isnt rendered right any idea how to fix this issue?
    1. bathsebah
      bathsebah
      • premium
      • 206 kudos
      Please pin a screenshot or it's hard to tell exactly what could've happened.
    2. vaderetrome
      vaderetrome
      • member
      • 10 kudos
      I apologize for intervening, but... you've got Olgierd's beard for Geralt?! Really? I've been looking for a mod like this, but no luck. Is there any chance you could share your triumph on Nexus? 
  7. MechaMaker
    MechaMaker
    • member
    • 0 kudos
    Edit: forgot about this tutorial for a minute. it's not really showing how to edit meshes like: making/longer/shorter hairs, or changing/replacing/resizing them all together, it's just explaining how to paint on top of them if you wanted a different color hair. just didn't want anyone to be confused by my last comment. 
  8. onebecamenone
    onebecamenone
    • member
    • 0 kudos
    Hello! this is a great tutorial, first of all.

    i'm running into a weird problem though. the hair is definitely changing colors, but when the character is approached, the hair reverts to its original color. The new hair color only shows up at a certain distance from them.
  9. rrnex
    rrnex
    • member
    • 0 kudos
    Hello. Thank you very much for the comprehensive guide

    I'm having trouble experimenting on inverted hair

    I changed Triss' hair with Corine Tilly's, mirrored in Blender then vertex-painted it red. I cooked the fbx with Triss' xml file in w3oven and packed it with Corine's dyng file

    The result is weird: light mapping seems to be off especially in front of the lighthouse fire. Shadings off front and back seems to have swapped

    Then I cooked another fbx, this time with Corine's xml file but altered to have the instances value similar to Triss'xml. Result is pretty much the same

    Can you help me out?
    1. bathsebah
      bathsebah
      • premium
      • 206 kudos
      When you mirror a mesh, it tends to keep custom normals facing the same way. So while your face now is pointing say to the right, normals are still rendering shading to point to the left.
      You should reset them so now they're corresponding. It can be Normals -> Recalculate Inside/Outside, Normals -> Set from Faces, or applying Weighted Normals modifier.

      Also you may want to make sure your xml is using the same texture set as vanilla Corinne hair do. It may look ok, but at the same time UVs are not uniform and so there may be holes or distortions (or none, too).
    2. rrnex
      rrnex
      • member
      • 0 kudos
      Thanks a lot! Hair looks better now: https://i.imgur.com/dyz2w6F.jpg

      But light mapping is still off, now its uniform regardless of the light source. Looking like Dark Phoenix tho: https://i.imgur.com/TBkvuqz.jpg

      I'm getting there. There are much rooms for improvements and your guidance helped a lot. I'm going to try the modifier as well, once again thanks!
    3. bathsebah
      bathsebah
      • premium
      • 206 kudos
      Either your Vertex color or VarianceColor is too bright, so the lighting/weather settings do not affect it. Try to lower them independently to find the best combo :)
  10. Adnan4444
    Adnan4444
    • supporter
    • 76 kudos
    Thanks, this is great! Was in the middle of a struggle of learning how to do this, wanted to first try figure things out alone, and when I decided to search some lessons, what a surprise was to see this newly made guide.

    UPD: Could you give any tips on the hair normal maps, there is an alpha channel there, with white font and grey hair, unlike diffuses with black one (that makes black parts invisible ingame). I'm trying to make more dense hairs, and I think it looks like mess with artefacts bcz I also had to remake normal maps, not sure how to make them right for hairs, is that grey/white alpha just a displacement of a diffuse that could be automatically generated?
    1. bathsebah
      bathsebah
      • premium
      • 206 kudos
      Aye I'm so happy the article came in handy ! <3

      I know that normal maps for clothing can have gloss/reflectivity map stored in the alpha channel, at least that's how many matal parts are done. Can be totally wrong with terminology though.
      I made a quick test and it looks that black=more reflective and white=non reflective. Should be fine to simply use a diffuse as a base for some filtering to achieve the right effect. Or just leave it white :B
    2. Adnan4444
      Adnan4444
      • supporter
      • 76 kudos
      Thanks! So it's glossiness, interesting.
  11. Kromanjon
    Kromanjon
    • supporter
    • 32 kudos
    Thank you so much for this! T_T
    1. bathsebah
      bathsebah
      • premium
      • 206 kudos
      <3 I look forward to see more mods from you, hope the article was helpful!
    2. Kromanjon
      Kromanjon
      • supporter
      • 32 kudos
      It's very helpful. Thank you :D