0

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

Ivan Kartofanov
  • 743
  • 3
  • 8
  • 23
  • 1
    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 https://github.com/Tlousky/blender_scripts/blob/master/random_material_assigners/random_material_assigner_per_face_new_features.py – TLousky Feb 09 '17 at 10:00
  • 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? – Ivan Kartofanov Feb 09 '17 at 13:57
  • Sure. How to install an addon: http://blender.stackexchange.com/questions/1688/installing-an-addon

    How to use this addon: https://www.youtube.com/watch?v=4Qoi0RgDBGU and: https://www.youtube.com/watch?v=PgIUrZ8S1_Q

    – TLousky Feb 09 '17 at 14:02
  • 1
    @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:) – Jaroslav Jerryno Novotny Feb 09 '17 at 14:34
  • @Jerryno, done. Haven't done this since I thought link based answers aren't really recommended :) – TLousky Feb 09 '17 at 16:09
  • 1
    @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.. – Jaroslav Jerryno Novotny Feb 09 '17 at 17:44

2 Answers2

3
  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

Jaroslav Jerryno Novotny
  • 51,077
  • 7
  • 129
  • 218
2

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.

TLousky
  • 16,043
  • 1
  • 40
  • 72
  • 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. – Ivan Kartofanov Feb 10 '17 at 08:08
  • Seems like there's a bug due to API changes, I'll have a look at it – TLousky Feb 10 '17 at 08:50
  • Fixed the bug, please download the latest version from github and re-install. – TLousky Feb 10 '17 at 08:55