Break a cube into 8 smaller cubes and assign unique materials automatically

Hi there,

Very basic question but I wasn’t able to find an answer to this.
I want to break a cube into smaller cubes that are actually objects so that i can apply a unique material to them. How to do this?

Also I feel like there should be a way to select all the objects and then “add unique material” and blender will add 8 new materials 1…8 to the scene and apply them to the 8 selected objects.

Is this possible?

Manny thanks in advance!
Screech

Welcome to BA :slight_smile:
Why not use the array modifier? 3 arrays modifiers- fixed count of 2, offset of 1.1- gives you 8 cubes, you can then apply the modifiers and do P > By Loose Part in Edit mode

Yess! haha “Loose part” that’s the one! thanks a lot Joseph!!

Now is there a way to automatically apply unique materials to those loose parts?

so for instance if i split the cube into 64 parts, i don’t want to manually create 64 unique materials and apply each of them one by one.

1 Like

Geonodes ? you can procedurally apply different materials, provided you’ve already created them. You just need an attribute to control the material index. You could try with the duplicate geometry node : pipe the duplicate index output into the material index input of the set material node.

2 Likes

Hi Hadriscus, I will try this, thanks a lot!
Very helpful this community :slight_smile: