Need help forming the .mhmat file

This forum is aimed at user contributions, in the form of assets, side projects, code patches and similar.

Moderator: joepal

Need help forming the .mhmat file

Postby learning » Mon Apr 09, 2018 12:52 pm

As you may know, from time to time I take objects from freely (as in "free beer") available game models to convert them into MH assets and post here into my "scavenger" thread viewtopic.php?f=4&t=13316

Recently, I was looking to "scavenge" a haircut that would look natural specifically for Asian female characters. After spending quite some time searching I was able to discover one that seems to work perfectly. It comes from a character named Makoto Makimura from a game called Yakuza 0: https://cunihinx.deviantart.com/art/Mak ... -726015668

The "ripping" process went sufficiently well, and the final look of the asset I found satisfactory:
preview.png

You can find the asset attached so that you can experiment with it as well.

However, correct arrangement of textures is something that I couldn't handle by myself in this case. You see, the original object has 4 textures:

c_aw_makoto_hair_di.png is set up like a normal diffuse texture with alpha influence (the material itself is completely transparent):
c_aw_makoto_hair_di-setup.png
c_aw_makoto_hair_di-setup.png (28.1 KiB) Viewed 8281 times


c_am_tachibana_hair_h2.png is special: it is set similarly to the first one, but its Blend mode parameter has to be set to Multiply rather than Mix. Failing this would lead to disastrous effect on the overall look of the asset. The setup is like this:
c_am_tachibana_hair_h2-setup.png
c_am_tachibana_hair_h2-setup.png (29.04 KiB) Viewed 8281 times


c_aw_makoto_hair_tn.png is a normal map, so it is to be set up as one would expect of the normal map:
c_aw_makoto_hair_tn-setup.png
c_aw_makoto_hair_tn-setup.png (21.94 KiB) Viewed 8281 times


c_am_tachibana_hair_sp.png is a specular map, it should be set up as a specular map texture:
c_am_tachibana_hair_sp-setup.png
c_am_tachibana_hair_sp-setup.png (28.89 KiB) Viewed 8281 times


I listed the textures in the same order they were present in the original file. I am not sure if changing the order is going to change anything, but I always apply them in this order just to be on the safe side.

And so, I find my knowledge of .mhmat format syntax insufficient to be able to form a file that would make such a quirky texture setup understandable for MakeHuman and/or MHX2 exporter. Can anyone help me with this?
Attachments
makotohair.7z
(351.46 KiB) Downloaded 511 times
learning
 
Posts: 317
Joined: Mon Feb 24, 2014 9:36 am

Re: Need help forming the .mhmat file

Postby MTKnife » Thu Apr 12, 2018 2:52 am

You probably need to "bake" the object in Blender to collapse the first two textures into a single one. The normal and specular maps should work just fine, though normal maps don't show up in MH.
MTKnife
 
Posts: 311
Joined: Tue Sep 01, 2015 5:22 am

Re: Need help forming the .mhmat file

Postby learning » Thu Apr 12, 2018 3:09 pm

Could you elaborate? I have seriously no idea how to bake textures and how it can even help.
learning
 
Posts: 317
Joined: Mon Feb 24, 2014 9:36 am

Re: Need help forming the .mhmat file

Postby MTKnife » Sat Apr 14, 2018 1:58 am

You'll find a *bake* option towards the bottom of the render tab of the object menu (in Blender Render--I'm not sure if there's a Cycles equivalent). When you use that option (assuming you have a UV map), Blender renders the object and then maps it into a texture window, from which you can save it. It is going to render using the current lighting and all other settings, so it's not a perfect solution, but it lets you combine textures in MH, or do other useful things, such as storing procedural textures or those created by repeating pictures.
Last edited by MTKnife on Thu Apr 19, 2018 4:39 am, edited 1 time in total.
MTKnife
 
Posts: 311
Joined: Tue Sep 01, 2015 5:22 am

Re: Need help forming the .mhmat file

Postby loki1950 » Sat Apr 14, 2018 3:38 am

And yes the bake option is there with the cycles render engine and for the OP there are lots of blender tutorials on baking either on YouTube or as a general google search.

Enjoy the Choice :)
my box::HP Envy i5-6400 @2Q70GHzx4 8 Gb ram/1 Tb(Win10 64)/3 Tb Mint 19.2/GTX745 4Gb acer S243HL K222HQL
Q8200/Asus P5QDLX/8 Gb ram/WD 2Tb 2-500 G HD/GF GT640 2Gb Mint 17.3 64 bit Win 10 32 bit acer and Lenovo Ideapad 320-15ABR Win 10/Mint 19
User avatar
loki1950
 
Posts: 1219
Joined: Thu Dec 18, 2014 6:27 pm
Location: Ottawa,Ontario

Re: Need help forming the .mhmat file

Postby learning » Sun Apr 22, 2018 9:26 pm

It took some research, but I think I got it. Here I recreated the asset using baked textures (three separate bakes for diffuse, normal and specular). Please look and tell me if it works ok for you.

If the results are satisfactory, this baking stuff can be a really powerful technique. With it I can scavenge also the assets that are more than one object and/or more than one material.
Attachments
makotohair-retex.7z
(3.41 MiB) Downloaded 523 times
learning
 
Posts: 317
Joined: Mon Feb 24, 2014 9:36 am

Re: Need help forming the .mhmat file

Postby MTKnife » Mon Apr 23, 2018 3:53 am

You shouldn't need to bake in specular, since MH handles that one as a separate texture already (I think?). What to do with normal texture depends on what you need it for: if you need it to show up in MH, yes, you need to bake it, but if you only care what it looks like when exported, don't bake it.
MTKnife
 
Posts: 311
Joined: Tue Sep 01, 2015 5:22 am

Re: Need help forming the .mhmat file

Postby learning » Mon Apr 23, 2018 8:25 am

I had to do all three because I had to make a new UV map, and MH can only handle one. Please tell me if the result works for you.
learning
 
Posts: 317
Joined: Mon Feb 24, 2014 9:36 am


Return to User contributions

Who is online

Users browsing this forum: No registered users and 1 guest