Jump to content

Problem creating new hair


raughnut

Recommended Posts

Hello everyone! Im somewhat new to the modding world, and im trying to do a custom hair mod. I already have the mesh modeled and textured. but i dont know how to merge the individual textures into a single .dds texture. I tried render to texture in 3d max but it lowered the quality of the texture, and i also dont know how to add the hair as an additional hair for the character generator... i only go as far as exporting the hair into the mmh msh dds and such, because of a very useful tutorial i found on the internet and Tazpn Tools... If anyone can, please help!
Link to comment
Share on other sites

I used a image editor to merge the textures (The GIMP).

Create a new image the size of your textures and decompose the colors into separate layers. Now you just have to move the right texture (in grayscale) in each component.

 

Red contains the bump map. You can use your normal map to generate one.

Green contains the diffuse map. Turn your diffuse texture to grayscale, remove the alpha, and put it in this channel.

Blue contains the transparency map. Copy the alpha channel of your original diffuse texture.

Alpha contains the specular map. Turn your specular texture to grayscale, remove the alpha, and put it in this channel. If you don't have a specular texture, you can use the diffuse map with a bit of noise and reduced brightness.

 

Recompose the colors, and save it in .dds.

 

You'll also need to edit your material object, because I don't think tazpn's tool exports them correctly for hair models. I took the one for vanilla models (pn_har_all.mao), renamed it and changed the texture path for the packed texture.

 

 

To make it selectable in the Character Creator you need to edit the file "chargenmorphcfg.xml" (packed in "misc.erf" or in your override directory if you have any mods), and add a line in the appropriate section.

Link to comment
Share on other sites

Thank you, I'm going to try that. i'll download the GIMP and try. I usually use photoshop, maybe I can try there as well, but I could never get the dds plugin from nvidia working there... maybe is because of my ati graphics card... maybe Im just out of luck hehe.

 

..............................................................

 

well, after a lot of tinkering with all these tools, i've seen a little improvement... i can now succesfully see the hair in the character generator screen... however there are still 3 issues that i still have to fix..

 

 

 

i used a spoiler code to put the link to the picture... the attachment didnt work here...

 

first, as you can see in the image attached, the hair is there, but it is transparent... i used gimp with the texture. added an alpha map, decomposed it, edited each layer according to kzelsama's advice, then recomposed the layers and saved the texture with a plugin for gimp that i found in gimp plugin registry. i dont know if it counts, but i think that i may have also forgot to change the hair color wich is originally black...

 

second, apparently, the hair is not attached to the body. i can see the character moving idly but the hair remains stationary. i figure it has something to do with rigging but i pray to the gods that it doesn't...

 

third, it also seems that the hair should include the portion of the head that is missing in the image... does this means that i have to take it from another hair and then merge it into the hair mesh that im trying to do?... and then merge the texturemap from that hair into the other one? i gues that when i said that i was new to this... i really meant it haha!

Link to comment
Share on other sites

Looks like the model is being displayed with the wrong method. Did you have a look at your .mao ? It must look like this :

 

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<MaterialObject Name="PN_HAR_REN2">													<!-- change the Name to match your .mao file name -->
<Material Name="HairAlpha.mat"></Material>
<DefaultSemantic Name="Default"></DefaultSemantic>
<Texture Name="mml_tPackedTexture" ResName="pn_har_ren2.dds"></Texture>			<!-- change the ResName to point to your texture -->
<Texture Name="mml_tTintMask" ResName="Default_White.dds"></Texture>
<Texture Name="mml_tTintNoise" ResName="uh_har_0t.dds"></Texture>
<Vector4f Name="mml_vHairParameters" value="0.01 60 62 7.32"></Vector4f>
</MaterialObject>

 

The back of the head is needed too if your hair doesn't cover it completely. You can find it in all vanilla hair models (it's one of the two mesh parts). Hair models usually contain it in a separate mesh part, so depending on your export tool's ability to export multiple mesh parts in a single .msh or not, you may or may not have to merge the texture maps. I don't know the capabilities of tazpn's tools, I use the Blender IO scripts.

 

And the model does need rigging. If your hair moves only with the head, you can just attach every vertex to bone 13 with a weight of 1.0. Again, I don't know how tazpn's tool exports bone weights, so you may have to do things differently, but they're needed.

Link to comment
Share on other sites

Hey thank you so much for you help! i'll go and edit the .mao file. I use 3d studio max for modeling and then I export the mesh to obj and convert them to the mmh and msh and etc. with the tazpn tools, but im going to give blender a try with those scripts you mentioned... I guess that I should have figured earlier about the rigging hehe.

 

Again thank you for your help! I'll keep on working on this, hopefully I'll have something to show soon...

 

.......................................................................

 

 

 

another image in spoiler code

 

Well, at least it is not transparent as before... but the colors look a little weird haha. im going to try to fix it... im still figuring out blender, its a little different from 3dmax. ill post any update i can come up with!

Link to comment
Share on other sites

Well, i've seen another "improvement"... i re-exported the dds texture in a rgba8 format from gimp, i didnt know what specific options to use but i couldnt compress the image because it said that images that werent multiples of 4 could be compressed... im still figuring how to edit the .mao file to make the hair look propperly but at least it now has the transparency working almost as it should...

 

 

I couldnt figure out blender. is a lot more complicated than 3dmax to me. maybe because Im used to max, but everything was like in another language!

anyhow, I had to update my fbx plugin for max and used it, along with a tool called fbxcmd to transform those dragonage mmh.xml files to fbx and then imported them into 3dmax. at least they came with bones and the skin modifier applied to them, so I just copied the modifier from a vanilla hair to the new hair mesh, after that, I exported the whole file into another fbx together with the separate mesh for the back of the head and the bones and all. It all went a little well because as I opened the character generator, I could see that the hair is now attached to the neck bone. however, it seems that it is not attached to another bone and that causes the hair not to move along propperly with the head.

 

well, this is really driving me crazy, but i hope it will work soon. If anyone has any advice, I'll really apreciate it!!!

 

 

 

 

Ps: By the way, I never mentioned it before, but english is not my native language, so please forgive my spelling...

Link to comment
Share on other sites

Last I checked, tazpn's export tools (incl. fbxcmd) were still bugged concerning bones weights, not exporting them correctly.

 

About your other image in spoiler tags (sorry, didn't see the edit), it looks like the material is still wrong. Check in the .mmh that the mesh parts are using the right material object. Or you could skip the hair shader altogether and just use the default material with diffuse/normal/specular/tint textures. Seems to work alright for J1nx's hair mod.

Link to comment
Share on other sites

Yeah, I guess Ill have to keep on learning blender, Im going to check J1nx's hair mod to see how the materials are handled there. this is a lot of trial and error for me hehe. if anything comes up, Ill edit this post to show the advances.... if there is any hehe.

 

EDIT

 

hey Good news about the rigging. i managed to attach all vertex into the head bone, so I exported the mesh again and tested it in the game and it now moves propperly. from 3d max hehe (i couldn't help it :P) so now i have to figure out the material and I guess that soon it will be ready for testing.

Link to comment
Share on other sites

Well, I managed to find a way to export tha hair without having to learn blender from scratch hehe. but now, there is a tiny issue concerning the way the hair looks. as you can see in the attached image, there are some parts in the hair that look as if it was not propperly triangulated. i wonder what is wrong, could it be, as you can see in the other image attached, that the layers of the hair mesh that fall on top of other layers of hair cause that problem? Please help! hehe.
Link to comment
Share on other sites

Your problem is face sorting.

 

What you need to do is make sure the layers of hair closest to the face are drawn first, and only then draw the outer layers. To do this, you need to organize the face data so that the first faces correspond to the first layers of hair. In Blender, you can do this by using the face sorting tools (Ctrl-F in Object Mode). I imagine there's something similar in 3DsMax. I sort faces by their relative distance to the center of the head, and it worked quite well.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...