How to render / texture 11,000 bricks

I created a brick wall in grasshopper and baked it into my Rhino model. It looks nice, but I want to render it now. I’d like the bricks to be one of a couple colors, randomly distributed across the bricks. This is to give the wall the natural variation that occurs with brick.

I would really rather avoid texturing 11,000 bricks individually for obvious reasons.

Any thoughts?

Create various brick materials in your 3dm file using the Rhino Material editor. Give them names, “brick 1”, “brick 2” etc.

Generate an array of these names in GH with the same length as your brick list. Randomly shuffle it. Use the Custom Display component with your bricks as shapes and your names as materials, then bake that component. I think that should work…

2 Likes

Neat that we can assign materials to many objects this way.
Is it possible to attach Box Texture Mapping to each element which will rotate along with geometry?

Nope, grasshopper doesn’t really deal with texture images, or texture coordinates, or texture mappings at all I’m afraid. It’s a pretty big gap in the feature set.

@DavidRutten,

Thank you very much for your help; I followed your advice, but am struggling to get the texture to appear. I’ve attached a .gh and .a 3dm file, as well as a screenshot of the portion of the grasshopper that should be controlling the texture, and a screenshot of my material editor. Do you spot any glaring mistakes I’m making?

Thank you!

textured-brick.3dm (2.5 MB) textured-brick.gh (379.4 KB)

Oh I don’t know if this works on Mac. Linking materials by name is a somewhat recent feature which may not yet have been ported. @dan is GH on mac capable of previewing/baking textured materials by name?

Works fine for me in Rhino for Mac (6.20.19310.02452, 2019-11-06)! You don’t even have to tag the material. Naming it should be fine.

Neat feature to know about! :smiley:

You’re 3DM doesn’t include any materials.

What about this?

@DavidRutten
thank you for the info, I was wondering about that. The component I used seemed to have the right I/O but it has a different name.

@diff-arch
I made a new 3dm file for the purposes of uploading but neglected to carry over my materials…I am also running Rhino 5, not sure if that makes a difference.

I will try this later today on a PC running Rhino 6 and see how that goes.

@ERahjes script looks quite promising actually, I will give that a try as well.

Thanks all!

@ERahjes

Thanks so much for the link! The script was perfect.

I was never able to get the GH to work, the preview component wasn’t bakeable and I was unable to find an alternative. Thanks for the advice anyways.

Hey @sbhill. It looks like you are working in Grasshopper in Rhino 5 for Mac. Give it a try in Rhino 6 for Mac. Any better there?