Change the color of an asset by using the material editor

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

Moderator: joepal

Change the color of an asset by using the material editor

Postby Anstrah » Sat Jun 24, 2023 1:30 pm

Hello,

I would like to know if it's possible to totally change the color of an asset by using MakeHuman's material editor. For exemple, is it possible to turn the color of eyebrows into blue or red with the material editor? If it's possible, I didn't find how to do it... Could you help me, please?

Thank you in advance!
Anstrah
 
Posts: 34
Joined: Thu May 11, 2023 9:31 am

Re: Change the color of an asset by using the material edito

Postby Ricardo2020 » Sat Jun 24, 2023 6:42 pm

Greetings, fellow human maker.

Some things to know about editing assets.

The Material Editor lets you choose various elements of the asset such as textures, shaders, and transparency/glossiness/etc.. Although you can dial some settings within a light sphere or phong environment to arrive at a color change, it is not always effective and might not give you the desired result. A better way to do this is by editing the diffuse or ambient textures in a graphics program such as the GIMP.

Let's assume you want a hair asset to be a color other than the one included with said asset. Here is what I do when the need arises to do this.

I find the texture by locating it in the folder where the asset lives, usually in the home folder for MakeHuman. In Windows, it will be in your users/username/documents/makehuman community/v3py/data/asset type/asset name. In Linux, it will be in your home/username/documents/makehuman community/v3py/data/asset type/asset name.

Once you locate the texture, load it into your graphics editor. I use the GIMP, but the process is similar in any such program.

With the texture loaded, use the color setting to dial in the shade you want.

Export the texture (uncompressed) to the folder containing the asset, but give it a different name so that it does not overwrite the original. This name and its extension should be the same as the original name plus an underscore and then the new name, such as asset name_color name.

If the asset has a material folder, put the new texture in there. If not, create said folder and put the new texture in it.

Now go into the Material Editor and look at the diffuse texture box. Click the button that lets you load a texture and find your new file. You will see it change the diffuse color of the asset. You can do this for any texture, including the ambient and normal textures as well, provided you have made these and placed them accordingly.

Once you have the new textures the way you want, go to the bottom of the right pane and click save. Save the new MAT file in the Material folder with the name of the asset_new texture.

Now go into the materials tab at the top of MakeHuman and select the asset you want to change in the left pane. A list of textures will appear in the right pane. Choose your new texture. BINGO! There it is, ready to grace your toon. To make the change permanent, save your toon.

I hope this helps. Feel free to ask any questions to gain a better understanding of how this works. We are here to serve and always glad to do so.
Paddle faster. I hear charango music!
User avatar
Ricardo2020
 
Posts: 143
Joined: Sat Apr 18, 2020 4:17 pm
Location: Tennessee

Re: Change the color of an asset by using the material edito

Postby Anstrah » Sun Jun 25, 2023 9:07 am

Thank you very much! It works perfectly! :D

I also want to create a deep dark black color for the eyebrows. Even if the default color is already quite dark, I am trying to create something deeper and more intense...
I used the colorize tool of gimp, and selected the black color, with the maximal saturation and minimal lightness. The difference between the original image and the new image is visible, but very subtil, and the final image is not as deep and intense as I would wish...
Would you have some idea to create very deep intense dark black eyebrows?

Thank you in avance!
Anstrah
 
Posts: 34
Joined: Thu May 11, 2023 9:31 am

Re: Change the color of an asset by using the material edito

Postby Ricardo2020 » Sun Jun 25, 2023 3:44 pm

You are most welcome.

About choosing the color and how dark it can be...

To get a true black, the dials must be set for minimum saturation and luminescence in the GIMP, even if the shade is completely black. Sheen will cause it to appear lighter within a lightshere environment depending on how much added luminescence the lightsphere is set for in the MakeHuman material editor.

If you create a black texture and do not add any luminescence in the GIMP or MakeHuman, the asset will appear to be completely black. Note that doing this will also cause any bumps to not show. The texture will look completely flat. Detail will go away. Thus, you must decide how black you want it to be verses how much surface detail it shows during the render.

In short, consider three values when creating textures:

1. Hue - the actual frequency of the light, mixing red, green and blue.

2. Saturation - the white level of the hue, from black to white. Black will yield less color, white will give more.

3. Luminescence - how bright the color is regardless of saturation, again going from black to white.

You can see how this works when dialing in the value within the color space palette inside the GIMP.

I hope this helps.
Paddle faster. I hear charango music!
User avatar
Ricardo2020
 
Posts: 143
Joined: Sat Apr 18, 2020 4:17 pm
Location: Tennessee

Re: Change the color of an asset by using the material edito

Postby Anstrah » Mon Jun 26, 2023 11:01 am

Thank you very much! When I choose the black value for the color parameter of the colorize tool in GIMP, and I try to change the saturation and the lightness, I don't really see the difference between maximal and minimal value... Perhaps because it's too subtil with the black color?
Anstrah
 
Posts: 34
Joined: Thu May 11, 2023 9:31 am

Re: Change the color of an asset by using the material edito

Postby Ricardo2020 » Tue Jun 27, 2023 3:58 am

Many welcomes.

You will not see much difference in the GIMP. However, you will under a lightshere in MakeHuman using the advanced render options.
Paddle faster. I hear charango music!
User avatar
Ricardo2020
 
Posts: 143
Joined: Sat Apr 18, 2020 4:17 pm
Location: Tennessee


Return to User contributions

Who is online

Users browsing this forum: No registered users and 1 guest

cron