Array Modifier Problem

**Hey Blender community - you guys have helped me so much in the past and I hope you will help me this time too (really stuck here :frowning: **
So, how do I change colors of meshes that have an array modifier attached to it. Basically, i made roof shingles that were combined with different “shades” of the same color. However, after I made an array modifier, the color became the same. Also, I need to add an array modifier or something because I am using these roof shingles in a game, and I don’t want around 128 shingles per house (there will be like 150ish houses). Basically, is there any way to have different colors of roof shingles (at random) while also using the array modifier?

Any help is greatly appreciated. Thanks everyone :slight_smile:

Seems not to work without applying the array. There are changes planned for it but there are currently not in master.

If you want to export it you also need to apply the modifier since unity or unreal cant work with a blender modifier. You can look up if unreal has some sort of array system with variations and try to array it there.

In the Blender 3.0 alpha, you can do the following:

  1. build an array modifier with geometry nodes
  2. use the object info node in the shader editor to create color variation

But as @3DArtGuy said, you will have to apply everything in the end anyway.

colored_array.blend (103.1 KB)

I appreciate the help, but I have like a texture attached to the shingles and I want to keep the texture and make different colors. Is there a way to do this? Also, I haven’t even tried exporting this at all, its not working in blender itself :sob:

You cant export it to an engine without applying the modifier to it… At least from what i know.

If you want to use the same basic texture for all tiles and just add some random variation per tile, you can use something like this:

In the end, you will probably have to generate new UVs, bake the whole setup into a new texture and apply the modifier if you want to export it.

2 Likes

yes you can. Ok, so what happened was - I made a procedural shingle texture that already allowed the tiles to have different/random colors when I duplicated each shingle. But when I tried to just apply an array modifier to one shingle and increased the count, the new shingles didnt have different colors, it was the same color :frowning:
So, basically, I am not even thinking about exporting it right now. I want to fix this problem in blender first if that makes sense/

But i don’t want to use mix shader (i dont want random colors - i have a few specific colors that i have already made using color ramp)…i also used the random node to make those colors applicable to different roofing shingles, but the array modifier is not letting the random node work…which is weird. is there a way to just do something about it?

you can use instances instead of arrays:

Here I instanced the cube on the grid; the shader setup has to be on the cube.

instance_shader.blend (128.6 KB)

hmmm…so this works just like an array modifier right?

I am pretty sure the array modifier works differently. For example, with an array modifier, you can stack additional modifiers on top that work on the geometry created by the array modifier. As far as I know, this is not possible with instances, as no new geometry is created by instancing.

Give the elements you want a different color, combine them all with Ctrl+J and then apply array.