5
$\begingroup$

Let's say I have a grid of small cubes 20 x 20. I want to be able to make some amount of them 'grow' over one axis. The closest I had to this was use displacement with a cloud texture matched to an empty object that moves across the screen, but because it affects vertices instead of faces it doesn't look like cuboids anymore. Is there a way around this? enter image description here

(to further complicate things I'd like to be able to then assign different materials to sides so would be much better if starting point is cubes rather than plane)

$\endgroup$
9
$\begingroup$

I would keep the displace modifier but start from a single vertex that way it doesn't deform the meshes.

Start with a single vertex and add 2 Array modifiers

enter image description here

Add a Displace modifier, setup a cloud texture, direction to Z, and set the coordinates to object, and add an Empty in the scene.

enter image description here

Add 2 Screw modifiers along X and Y, set the steps to 1 and the angle to 0°

enter image description here

Add a new vertex group to the object

enter image description here

Add a Solidify modifier. Set the thickness to 0, the rim material to 1 and the output vertex group to the group you just created.

enter image description here

Add a very large plane in your scene, set it to not render and set the viewport display to Bounds

enter image description here

Add a Shrinkwrap modifier, target the large plane, set the wrap method to Project along Negative Z, and limit it only to the vertex group. I also added a Bevel modifier.

enter image description here

Add 2 Materials, one for the Top & Bottom, and one for the Sides.

enter image description here

Move the empty :

enter image description here

$\endgroup$
8
  • 2
    $\begingroup$ That looks incredible! Would this allow to assign different materials to the faces? I.e. rather than just one material to the side and one to the top, with this method would I be able to assign a certain material to only say 3% of faces? thanks! appreciated $\endgroup$
    – zergkills
    Mar 19 '21 at 14:10
  • 1
    $\begingroup$ Should be able to use Geometry -> Random Per Island to get random values for each $\endgroup$ Mar 19 '21 at 15:05
  • 1
    $\begingroup$ @zergkills Sure there are several options. Are you using Eevee or cycles for rendering ? $\endgroup$
    – Gorgious
    Mar 19 '21 at 15:18
  • 1
    $\begingroup$ Problem: displace modifier has no visible effect. Solution: make sure the empty and the initial vertex are not in the same location (specifically, move the empty so that it is not the scaling factor of the cloud texture (default: .25 unit vectors) away from the vertex). $\endgroup$
    – xgjxcxzk
    Mar 21 '21 at 1:23
  • $\begingroup$ thanks for your responses guys, I'm using Eevee currently but I can change if it helps $\endgroup$
    – zergkills
    Mar 21 '21 at 23:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.