8
$\begingroup$

Does anyone know if there's a modifier or any other way to "randomize" the location of a number of objects? What I have is about 20 objects positioned next to each other and I want to randomize their Z value, but it's for a still, not for animation. I'd like to know if I can do this other than manually because I may have a lot more objects than just 20...

Thanks!!

EDIT: I've found a way. With all objects selected, I just need to run this script:

import bpy
from random import *

for ob in bpy.context.selected_objects:
  ob.location.z = ob.location.z + random() * 2

I wonder, however, is there's a more "visual" solution to this, other than scripting...

$\endgroup$
1

1 Answer 1

19
$\begingroup$

You can use the Randomize Transform operator with all objects selected in Object mode.

Press the Spacebar (or F3 with default 2.8 keymap)and then begin typing Randomize until the option appears, and adjust the desired axis for location/ rotation/ scale in the operator panel, or by pressing F6.

You can also access the operator from the menus via Object>Transform>Randomize transform to do the same thing.

enter image description here

$\endgroup$
3
  • 1
    $\begingroup$ Thank you SO much!! I was disappointed Blender would not have this feature but I'm very happy it does. Yay! Hehehe... Thanks for your answer, superb. $\endgroup$
    – prubini87
    Commented Mar 17, 2017 at 0:39
  • $\begingroup$ For anyone using 2.8, space is now F3, so search with F3, and the randomize transform appears now in the object > transform.. menu. $\endgroup$ Commented May 15, 2020 at 10:09
  • $\begingroup$ How can we do this programmatically, such that the objects always remain in the cameras view frustum? $\endgroup$
    – pookie
    Commented Dec 5, 2022 at 17:22

You must log in to answer this question.

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