KatsBits Community

[blender] Hair mesh too shiny

boodrl · 22 · 31946

0 Members and 1 Guest are viewing this topic.

Offline boodrl

  • Newbie
    • Posts: 10
Hello everyone,

Recently I've been using blender to edit and export a hair mesh that can be usable in another game. So far what I only do to the hair mesh is

1.)I import the mesh as a .obj file
2.)I scale, rotate and move the mesh file where I want it to go.
3.)Then I click on the "set smooth" button located in the "links and materials" tab. "Double sided" is also selected  in the mesh tab.
4.)Then I click on the "shading" button and  go to the "texture" tab I click add new. Then under the "Map input" tab I click on "UV"
5.) Then I click on the "texture" button and in the "Texture type" drop down list i select image. Then I load the texture I want on my mesh. The texture file is a .dds file.
6.) I click on the "editing" button and go back to the "Links and Materials" tab. I add a new vertex group, go into edit mode and select the hair mesh. I name the group BONE-0 and assign all the vertices to it.
7.) Then I select a .msh file and replace it with the new hair I've just edited.

For my mod to work I need a .mao file, .msh file, .mmh file and a .dds file. I put these files this into my override folder so I can view them in the game. The hair loads and the texture looks fine but the hair is too glossy and shiny.

Where did I go wrong? is this a problem related to the texture file or the mesh file? Does anyone know how I can fix this.


Offline kat

  • Administrator
  • Hero Member
  • *
    • Posts: 2692
    • KatsBits
This 'effect' is usually referred to as "Specular highlighting" and at a guess it's going to be one of two things;

1) If the exporter you're using is reading and interpreting Blender shaders then you need to play around with the "Spec" and "Hard" settings in the "Shaders" panel of the "Shading" buttons (F5); just reduce those values until you get something that approximates the look you need.

2) It's going to be a setting or value in the game itself. Depending on how they have their materials set up there should be a way to set the "Specular" value of the material applied to the models so you can reduce or increase the specular levels.

What game is this for? It helps if that is known, along with Blender version.



Offline boodrl

  • Newbie
    • Posts: 10
I'm using blender 2.49.

<<kat>> Thank you for the advice I'll try it out. This is for Dragonage: origins
Here is a picture of my problem.


Offline kat

  • Administrator
  • Hero Member
  • *
    • Posts: 2692
    • KatsBits
Ah right.. with that additional info (the game you're editing), your texture set is incomplete by the looks of things. I had a look through the Dragon Age toolset wiki and according to that it looks like you need a diffuse (the hair you've done), a normal map, and a specular map by default. If you have one or more of those missing it'll cause rendering issues. So, I'm guessing that you've got that 'full' specular problem with the hair because the material settings for that object aren't complete - it can't find the DDS or TGA texture it needs.

I don't have any tutorials up yet on making simple specular maps but if you don't know what they are you can make one quickly and easily by just de-saturating your diffuse and making it into a gray-scale image; to do one properly you'd ideally need to take a bit of time with it to make sure your highlights are placed correctly.


Offline boodrl

  • Newbie
    • Posts: 10
I created a diffuse, specular and normal map as well as added the alpha map as this tutorial has told me to do

http://social.bioware.com/1079/blog/4097/

I will edit my specular map and see if that makes a difference. Originally I made two layers for my specular map in gimp. first I would have a black background as my layer then the hair texture that was desaturated (with the levels altered a bit) would go on top of my background layer and I would merge the layers together. With the tips you've given me I'll change my black background layer.



Offline kat

  • Administrator
  • Hero Member
  • *
    • Posts: 2692
    • KatsBits
Ah ok, looking at that, Dragon Age is pulling all the data it needs for the material from different colour channels in the texture ("R/G/B/A"), specular being the alpha-channel. Doing what it is, there's going to be an issue with your alpha - either its not there or there's some other problem with it, so check you do indeed have one - it should show up in whatever photoediting app you're using in the "Channels" panel.

I tested the process with CorelDraw and using the images from that link you posted managed to produce what looks like a correct image by splitting the channels into separate images using "Image >> Split Channels to >> RGB". I then dropped an actual normal map into the Red channel image, the Diffuse into the Green channel image and Alpha Mask into the Blue channel image. I then have to recombine the RGB channels back into a single image with "Image >> Combine Channels..." and then 'load' in the actual Alpha Channel image as a separate object over the top (from the "Mask" menu). Seems to work ok doing that.


Offline boodrl

  • Newbie
    • Posts: 10
I checked my .dds file and you were right my alpha channel wasn't there. My red, blue and green channels had the normal, diffuse, and alpha map respectively. I use Gimp instead of coreldraw so I added a layer mask and pasted my specular map in then applied the layer mask. I'm still getting shiny glossy hair. Besides desaturating my diffuse layer like you said is there anything else I can do to the specular map?


Offline boodrl

  • Newbie
    • Posts: 10
So I made a new texture and everything worked out the hair is a bit shiny but a vast improvement to what it was. Here is an image of what it looks now. It's not the same mesh but it had the same problems and I was working on this one. It looks great and I couldn't have done it without you kat. Thank you so much for your help!





Offline kat

  • Administrator
  • Hero Member
  • *
    • Posts: 2692
    • KatsBits
Yeah, you'll need to play with the alpha channel mask but at least you know where the problem was happening now. Good Job.


Offline boodrl

  • Newbie
    • Posts: 10
Hello again kat and fellow katsbits forum's community, I've mad another hairstyle but this texture has weird patches in it. Do you know what I can do to fix it?





Offline silicone_milk

  • VIP
  • Full Member
  • *
    • Posts: 172
    • My Portfolio
Do those patches flicker while you move around or are they solid, non-changing patches that look like color stains on the texture?



Offline kat

  • Administrator
  • Hero Member
  • *
    • Posts: 2692
    • KatsBits
In addition to silicone's comment, if you used DDS textures try using TGA's (or vice-versa if you can), that looks suspiciously like a compression artifact issue. Who would have thought hair would be so much trouble!


Offline boodrl

  • Newbie
    • Posts: 10
<<silicone_milk>> the patches are solid, non changing patches. They do look like color stains with square edges as the picture shows.

<<kat>> I will try TGA's but I believe this game only uses .dds files. However I'm not 100% sure about that. 


Offline kat

  • Administrator
  • Hero Member
  • *
    • Posts: 2692
    • KatsBits
According to the modWiki it should as there's references to both TGA and DDS in the material information, you'll be able to test it to double check whilst you sort out this issue. If you can change format it'll be an easy way to initially test if it's compression issue (the problem will dissappear - unless the game utomatically converts TGA into properly formatted DDS files on import/use?) or something related to what silicone was quizzing you on (z-fight).