4
$\begingroup$

I have a Geometry Nodes setup which distributes a cube on an icosphere. I want each of those cubes to have a different material and so on the original cube I created several materials (images of a cat, football, and a tree) and then added an Attribute Randomizer node and set the attribute to material_index.

enter image description here

However when I do this a new material is assigned to each face on the cube.

enter image description here

Is there any way to randomise the material of the whole object using Geometry Nodes?

$\endgroup$

3 Answers 3

4
$\begingroup$

A way around this. Instead of using one cube and multiple materials, you could try to use a collection of cubes with a material for each one and use point instances's collection option to get the random seed for the distribution. Make sure that "Whole collection" is off insiside the point instance. Hope that helps

enter image description here

$\endgroup$
3
$\begingroup$

enter image description here This works for me. Input geometry and set MTRL for each of them, then instead of using join geometry, use geometry to instance to merge everything together, then use a grid to generate a single vertex and input instances as you do with a collection. The post above that uses attribute randomize seems to be a cleaner way to do it but I haven't tried it.

$\endgroup$
-3
$\begingroup$

Give both objects the same material slots and materials in them. Use the geometry nodes for the material randomization in the same node setup as the one that distributes the geometry over the icosphere: randomize the material from the sphere’s geometry nodes, not the cube’s (probably can delete the cube’s geometry nodes). Here is my geometry node setup, on the icosphere. node setup

Note that after the material setup, I had to disconnect and reconnect the nodes to make the system refresh.

Here is my blend file (sorry it’s not on blend-exchange: I’m running on mobile) Randomized Materials - OneDrive

$\endgroup$
5
  • $\begingroup$ Can you share your blender file or screenshot your node setup? I've tried your suggestion but it doesn't work $\endgroup$ Commented Jun 9, 2021 at 13:40
  • $\begingroup$ Can you share your node setup as a screenshot and which object you applied it to? $\endgroup$ Commented Jun 9, 2021 at 13:57
  • $\begingroup$ Can you update your answer with all of this information? Please also share your blend file. $\endgroup$ Commented Jun 9, 2021 at 13:58
  • $\begingroup$ Let us continue this discussion in chat. $\endgroup$ Commented Jun 9, 2021 at 14:05
  • $\begingroup$ @hellocatfood The answer is updated with a system that work, sorry I didn’t test the first one. However, my cubes are not oriented to the sphere’s surface since I’m not sure how you did that. I have very little experience in geometry nodes. 😋 $\endgroup$
    – TheLabCat
    Commented Jun 9, 2021 at 15:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .