1
$\begingroup$

Trying to create a bookcase with books that have a mix of I have constructed a mesh 'bookcase' with many books on many levels. My ultimate aim is to export the bookcase and all books as a single mesh. However, I would like to ensure that my book spines have a healthy amount of color variation (as pictured).

Inside blender this is easy. I ensure that the material has an Object node (Random Object plug) that drives a color-ramp that chooses from appropriate options along the ramp.

But this is ultimately for OBJ export. So I just need standard PBR materials with no tricks.

I would like to take all the little book meshes and divide them into groups. Then I would make a single material for each collection of random books and join them into a single mesh.

I hope this makes sense. I would love to speed the creation of these assets and am sure there is some selection magic that can do it, but I have yet to figure it out.

Thanks in advance for your attention.

Follow-up: So far, my best strat is to hide everything and then do successive 'random selects' until I have manually broken out meshes that way. This is doable, but I'll still hold out hope for a more elegant solution.

$\endgroup$

1 Answer 1

1
$\begingroup$

One of the easiest ways would be to enable proportional editing in random falloff, $\color{#888}{█}\color{green}⬇\color{#888}{█}$ mouse wheel down to increase range and move on the axis where all books originally share position (at least it seems so in your screenshot), then you can box select some books, press M and move them to a new collection, H to temporarily hide them and repeat for next groups of books. In the end you can restore the positions of books by a tool like Object > Transform > Align objects...

Positions could also be saved and restored by Python scripts, but then the objects could just be added to random collections by a Python script...

import bpy
from bpy import context as C, data as D
from random import choice

new_cols = [D.collections.new(str(i)) for i in range(10)]
for col in new_cols:
    C.collection.children.link(col)

for ob in D.objects:
    for col in ob.users_collection:
        col.objects.unlink(ob)
    choice(new_cols).objects.link(ob)
$\endgroup$

You must log in to answer this question.

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