How to automate creating materials in Human

In Human I would like to map 40 different materials to 40 different solids or surfaces.

In this project the client salvaged mosaic murals measuring 18 by 25 inches from a demolished housing project. We are involved in arranging them in an outdoor public space where they will become part of the environment. We will also add new mosaics and involve the community as part of the public art outreach program.

Ideally I would like in GH to
Open the directory with where the mosaic images are located
Have my Gh definition using human place images/materials on each or the forty objects created in GH.

I know how to add one material to an object or objects, but not in dealing with lists and importing file names, nor how to do the following

How to automate opening the directory,
How to auto create the materials with names and use the images from the directory

I haven’t used GH in a long time, I’m impressed with it’s abilities though I struggle with it’s interface. I have to thank Andrew for adding his hard work, frankly it was lack of these exact texturing abilities which kept me from using GH, I really think at some point Human should become native to GH the way Kangaroo did.

Thanks for any help or tips.

You can read in all the images in a folder with the Directory Contents component from human. Then you can create a material from each image with create/modify materials. Then you can use create attributes to assign the materials to each object. If you post your definition I can produce a more complete example!

Hi Andrew,
Thanks for getting back to me so quickly.
I did find that directory component really cool I like that I can hook it to an object and scroll textures on the object with the slider.

One problem is the texture mapping part since I’m using a brep and need to add one mosaic texture to each of the 2, brep’s faces. I would just use a group with the faces srf extracted but that doesn’t survive the flow command for me with the geometry unaltered.

Love what you’re doing with human at some point McNeel, you and the other Andrew should begin to craft a material editor for Cycles for V7. I think that the current material editor will not expose the power of cycles materials without a GH like environment which is more like blenders This is a hope of mine for the future.

I’ve attached the file any hints you or anybody can give will be most welcome. I didn’t include any bitmaps as they are not my property just add your own for a test all else should be internalized.

Roland M (280.9 KB)