0
$\begingroup$

Is it possible to use some kind of randomizer to randomize parameters of the seprate meshes inside one object? Please see attached picture. On the left there are bunch of cubes. On the right there are bunch of cubes that are combined in one object. I want my right cubes, to get random colors based on fact they are separate meshes.

Is that possible? Maybe there is some paid plugin or addon?

enter image description here

$\endgroup$
6
  • 1
    $\begingroup$ Shameless self advertising (of a free script): I wrote a script that enables you to do this ages ago, but it still works to the best of my knowledge github.com/Tlousky/blender_scripts/blob/master/… $\endgroup$
    – TLousky
    Feb 9, 2017 at 10:00
  • $\begingroup$ Hi TLousky, can you please tell how to use it? I'm not a familiar with github interface, so i can't find how to download it right now. Do i install it like addon? $\endgroup$ Feb 9, 2017 at 13:57
  • $\begingroup$ Sure. How to install an addon: blender.stackexchange.com/questions/1688/installing-an-addon How to use this addon: youtube.com/watch?v=4Qoi0RgDBGU and: youtube.com/watch?v=PgIUrZ8S1_Q $\endgroup$
    – TLousky
    Feb 9, 2017 at 14:02
  • 1
    $\begingroup$ @TLousky I think your addon is just the right solution, you should put up an answer so I can upvote and also that the question ends up with accepted answer:) $\endgroup$ Feb 9, 2017 at 14:34
  • 1
    $\begingroup$ @TLousky You can include a little tutorial how to use it or post the source code here if it becomes issue, but IMHO the links are in this case fine. The Git can get updated and video tutorial is nice. It's unlikely Git and Youtube will become dead links any time soon.. $\endgroup$ Feb 9, 2017 at 17:44

2 Answers 2

2
$\begingroup$

To do this you can use the Random Material Assigner addon.

Basically it allows you to randomly set materials (from the list assigned to the active object) to individual faces, loose parts or vertex groups.

You can download it through GitHub. To Download the file, press the "Raw" view button and then save by right clicking within the page and selecting "Save as".

You can install the addon like any other.

There are two videos that explain how to use the addon with its basic and newer features.

$\endgroup$
3
  • $\begingroup$ i tested the script in 2.78a, and it seems the "loose parts" feature does not work for me. The other 2 modes work just fine. The loose parts drops me in to mesh edit mode, without doing anything else. I tested the plugin in a new scene with freshly run blender. $\endgroup$ Feb 10, 2017 at 8:08
  • $\begingroup$ Seems like there's a bug due to API changes, I'll have a look at it $\endgroup$
    – TLousky
    Feb 10, 2017 at 8:50
  • $\begingroup$ Fixed the bug, please download the latest version from github and re-install. $\endgroup$
    – TLousky
    Feb 10, 2017 at 8:55
3
$\begingroup$
  1. You can write a script to color each mesh with different vertex color.

  2. You can scale each mesh in UV space into a point S0 (by script if there are lots of meshes) and generate random colors using noise texture:

    enter image description here

$\endgroup$
2
  • $\begingroup$ The script for random vertex colors already exhists and may be quite handy for ivy and staff. $\endgroup$
    – Mr Zak
    Feb 9, 2017 at 13:44
  • $\begingroup$ @MrZak That works per face, but it would be easy to alter it to color per loose geometry. It is also nicely written with numpy. Thanks for pointing it out. $\endgroup$ Feb 9, 2017 at 14:31

You must log in to answer this question.

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