You are here

Need some help with custom hairstyle

6 posts / 0 new
Last post
Vermillion
Need some help with custom hairstyle

I already know how to convert, tweak and import into the game rigid meshes into NWN2, so now i'he decided to make something a little bit complex - a hairstyle. I've dowload some custom hairstyles to look how it's done, extract some cool hair model from one of my favorite games and original NWN2 head mesh.

 
Result looks great in 3DS Max:
 
 
But when I've tried to export (3DS Max 8 + NWN2 MDB Utilities plugin) hairstyle to .mdb the game didn't accept it. When I began to dig in and found some differences with other custom models:
 
 
1) Mesh is marked as "SKIN". This option isn't highlighted (in 3ds Max) in my case...
2) Mesh attached to skeleton. Looks like I need just to enter proper name in the "MDB Skeleton" field, right?
3) I know C2,C3 collision, but how can I make sphere collision?
4) As I understand "Dummy" is a just properly named and placed "Point Helper"?
 
Can somebody help me with this stuff? Or maybe there is a tutorial on this topic...

 

  • up
    50%
  • down
    50%
krighaur

1 - mesh is marked skin because you must  add a skin modifier in 3DS Max. Without skin modifier the hairs won't work.. As these are short hair you can weight all vertices 100% to the head bone of the skeleton.

2 - P_HHF_Skel is good for an elfe haircut, it works for human, 1/2 elves, Aasimar and all elves.

3 - Hairs have one COL mesh. Load an existing and working haircut in 3DS, delete all except the helper, the skel and the COL, then import your haircut. That way helper, skel and cols have the right format and are at the right position. Then rename the helpers according to your hair, don't change the COLS and skel names.

4 - Dummy is used by NWn2 engine to define what part of hairs must be concealed by a helmet.

 

Some reasons why hairs don't show in character creation screen :

- no skin modifier

- no affected normal map

- wrong coordinates, for example you work in inch units, and import a mesh file in .obj format which is in meters.

- no corresponding .gr2 file in your override. For all non-human haircut you must have a skeleton corresponding to your hair. For example you create P_EEF_Hair45.mdb, you must have with it a P_EEF_skel42.gr2  file. How to create this ? Just copy/paste/rename an existing P_XXF_skelxx.gr2. Why did I put X and x ? Because you can copy P_HHF_skel01.gr2, and rename it P_EEF_skel42.gr2

I wrote a complete tutorial here (in French, sorry) https://krighaur.wordpress.com/category/creation-de-contenu-pour-nwn-2-t...

Search for chapter 4 of this tuto which is specifically related to Hair creation.

 


  • up
    100%
  • down
    0%
Vermillion

Thx, for answer krighaur - many things became clearer! Now i have new problem - when I import standart skeleton (P_HHF_skel.GR2 from lod-merged.zip) and any original or custom hairstyle (P_HHF_Hair01.MDB from NWN2_Models.zip) there is is a size mismatch. Skeleton is much bigger (exactly 100 times bigger) than hair model, and there is no option for scaling during importing. Have you encountered such a problem?

  • up
    50%
  • down
    50%
krighaur

If you import with mdbutilities, the skeleton should be imported when you import the original hairstyle. You don't need to import the skeleton separetely.

here is how I proceed :

- Import an existing mdb head, for example P_HHF_head01 if you create a waman hairstyle. Delete all except the mesh of the head. This head wil be used as a reference to scale/rotate/move your custom hair mesh

- Import your custom hairmesh and scale/rotate/move it so it fit on the head mesh. When importing, beware of any pop up window about units of the mesh differents from units of 3DS. If it happens, keep your 3DS unit.

- When you're satisfied with how your hairs fit with the head, delete the head mesh and export your hair mesh as a .obj file.

- Reset 3DS and Import a working hairstyle mdb.

- Import in your scene your .obj mesh : your mesh should be at the same location, and of a similar size than the mesh imported with the mdb. If it is not the case you did something wrong before and return to scale/rotate/move.

- Delete the hair mesh included in your imported mdb.

- Add a skin modifier to your mesh. As it is a short hair you only need the bone head, so add the bone head to your skin modifier. Verify that ALL vertices are weighted 100 % to this bone.

- rename your hair mesh, and rename the hair dummy from the OC mdb.

- save as a maxfile as an insurance for later modifications, and export as an mdb.

- use mdbconfig to verify that your mdb is correct and has every needed textures and parts.

- Done

 

 

  • up
    100%
  • down
    0%
Vermillion

After a lot of attempts, I finally managed to get the model to work properly in the game. Thanks for the help and great tutorial, krighaur!

 

  • up
    50%
  • down
    50%
krighaur

Good job Vermillion.

  • up
    50%
  • down
    50%