Better management of third-part materials for core assets

Works in progress and technical screen shots.

Moderator: joepal

Better management of third-part materials for core assets

Postby joepal » Fri Nov 30, 2018 10:04 am

With a commit (https://github.com/makehumancommunity/m ... c9690d3de4) to master, mh will now also scan user dirs for extra materials for core assets.

For example, if an asset installation_path/data/hair/long01 is set on the toon, then when you go to the material chooser, MH will also scan the dir user_path/data/hair/long01 for additional materials.

From my cursory testing, this makes at least MargaretToigos materials for the long01 hair work when placed correctly in the appropriate path under the user dir.

I have not yet adapted the asset downloader to take this into account, but I have prepared the asset repo to accept the necessary hints. If you take a look at my example http://www.makehumancommunity.org/content/jp_blond.html, you can see that there is a new field "belongs to core asset". This is what I will use in the asset downloader to determine where the material should be placed.

Thus: if you want your third-part materials for core assets to be placed automatically (once the asset downloader has been adapted), it would be helpful if you edited your uploaded materials and set this field to an appropriate value.

Also, as a warning for future uploads: This will cause third-part materials for the same core asset to be saved in the same dir. So if two third-part materials use the same file name (for exampel "long01_diffuse_blond.png"), the second material will overwrite the first. It might make sense to take this into consideration when naming new materials. But for now, there are few enough materials that I don't think there are naming conflicts.
Joel Palmius (LinkedIn)
MakeHuman Infrastructure Manager
http://www.palmius.com/joel
joepal
 
Posts: 4465
Joined: Wed Jun 04, 2008 11:20 am

Re: Better management of third-part materials for core asset

Postby MargaretToigo » Fri Nov 30, 2018 1:24 pm

joepal wrote:Thus: if you want your third-part materials for core assets to be placed automatically (once the asset downloader has been adapted), it would be helpful if you edited your uploaded materials and set this field to an appropriate value.


I think I got all of them done. If someone notices any that I may have missed, please let me know.

joepal wrote:Also, as a warning for future uploads: This will cause third-part materials for the same core asset to be saved in the same dir. So if two third-part materials use the same file name (for exampel "long01_diffuse_blond.png"), the second material will overwrite the first. It might make sense to take this into consideration when naming new materials. But for now, there are few enough materials that I don't think there are naming conflicts.


I am usually quite specific when naming files -- although I have no set convention for doing so. At the very least, for different materials, I try include the name of the color/pattern somewhere in there, and I usually put "spec" and/or "norm" in the filenames of specular and/or normal maps. If anyone notices any lazy file naming on my part, please let me know as it's pretty simple to correct.
MargaretToigo
 
Posts: 175
Joined: Thu Feb 16, 2017 6:46 pm
Location: Tampa Bay Florida, USA

Re: Better management of third-part materials for core asset

Postby joepal » Thu Dec 06, 2018 9:43 am

Well, now I think the whole chain works. Belonging is correctly fetched from the server, and there's a new filter option for only showing materials that belong to core assets. The few items I downloaded now shows up correctly as materials in the material chooser when having equipped the relevant core asset.

for_core_asset.png
Joel Palmius (LinkedIn)
MakeHuman Infrastructure Manager
http://www.palmius.com/joel
joepal
 
Posts: 4465
Joined: Wed Jun 04, 2008 11:20 am


Return to WIP (Work In Progress)

Who is online

Users browsing this forum: No registered users and 1 guest