Randomize elements

Hi All,

How could I do something like that? Would I need to create 4 separate panel families in order to have 4 possible directions or is there another way?


Depends on how you build your family. You could use instance parameters to change orientation or just build specific types. You could also use adaptive families with offsetting points in each corner. Besides that, it should be easy enough to generate random values that would dictate orientation.



Further to Nick’s reply

It looks like the panels are identical, with rotation and colour being the only variables ?
The panels on the right-side façade appear to be all the same colour- whereas the left are ~30% beige, 70% grey ?

The rotation appears to be in 90 degree increments- in which case it is probably easier to create family types for this, with colour (material) as an instance parameter.

Once you have the family right, it should be fairly easy to generate in Dynamo.

1 Like

That’s a very interesting facade. I don’t think it would be too too hard to replicate it with Families and a randomized rotation. I’ll have a go at it and post the results here. It’s good practice. What’s the original building?

As @Nick_Boyts said, it depends on how you build the family.
I’d advice creating a singular panel as a family, and then nest that family in another family to rotate it. As Revit is occasionally a bit wonky with rotation, I think it might be more reliable to put 4 different panels with 4 different rotations on top of each other but only let one of them be visible at the time.

This might be more of a Revit issue than a Dynamo issue.

1 Like

Thanks for the suggestions guys, I’ll try doing it and keep you updated.

@PerfectArchCo It’s Cheese grater in Sheffield, UK.

1 Like

I think all the panels are actually the same - aluminium colour, this must be just an illusion. The only tricky thing is the rotation really.

Building the family like this is certainly the route I would go. But the randomization is a textbook dynamo use case. Coming up with a randomized pattern manually is actually very time consuming but in dynamo it is VERY easy.

1 Like

Revit doesn’t have a random function as far as I know.
I’m guessing when you’d create an integer parameter in Revit for which 4 different values would give 4 different orientations it’s as easy as getting the All Elements of Type, Element.SetParameterByName, Math.Random nodes and a simple string with the parameter name.

1 Like

I think in this case, building a better family would benefit quite a lot regarding the freedom of inputs (not just 4 different types).
You should definitely watch this AU class where it doesn’t matter which angle is input, families simply don’t break ever!

A while ago I did and experiment using the same principle on spotlight families, where they simply work no matter the angle.


That’s fab. I’ll have a look and try doing it later today. Thanks :slight_smile:

This is a very old post, maybe it can inspire you

I would make 4 different panels and random where they where set, but it could be one panel with instance based parameters you could set using random.

Interestingly, I find that what people really want is the appearance of random, but not necessarily truly random. In a truly random event, there could be (and often are) clusters of random sameness that, if large, aren’t typically desirable.

1 Like

This is true. There are ways to control this via list iteration and other methods, but for minor changes I the designer can always - reshuffle or manually change a small number as needed.

I once ran 5 versions of a shuffle for elements on desk, saving a csv of values and a rendered view as an image for each. Went to have the designer chose her favorite, and she wound up preferring to remove the inconsistency controls that had taken me awhile to think up. End result came out really nice though.

List iteration? I can think of a couple of methods but I’m sure they’re not elegant – most of my graphs are less than elegant but they get the job done!

That’s the important part!