0
$\begingroup$

I created a base template for a bottle that will include different labels, seals, caps, and liquids, and want to have multiple options for each to choose from when rendering.

For example:

Bottle 1: brown liquid, square label, wood cap, no wax seal

Bottle 2: clear liquid, round label, purple cap, wax seal

So my questions are:

  1. Is there a way to stack various materials/objects that can then be selected when rendering?
  2. Is there a process or way to code a process to randomly select traits before rendering?

Here's an example of the bottle

enter image description here

$\endgroup$
2
  • 1
    $\begingroup$ It might depend on how you want to apply these. For example if you have a Label material applied to only the faces where it would appear, then you can select (or automate) that material, and substitute another material (drop-down) to apply that version to that material slot (they are indexed), is one way. And yes you could search this area for [python] script that select specific or random materials to a material index. $\endgroup$
    – james_t
    May 18 at 22:41
  • 1
    $\begingroup$ Thanks! Would this same method be applicable to objects like the cap? You've given great direction on where to start looking for the materials. $\endgroup$
    – Jake
    May 18 at 22:50

1 Answer 1

2
$\begingroup$

Just a couple of easy points.

Be sure to define materials for various parts of your bottle, like Cap and Label.

Assign one material first to the overall object (faces that are not Cap or Label).

Then load up some images for Labels in Texture and assign a Fake User so that the references remain even if not used by a material across a saved file/session.

enter image description here

Assign various vertices/faces to the materials, all others will be assigned to the first material if not explicitly assigned:

enter image description here

For the label, I used an Image Texture node where I can use one of my referenced images in the drop-down:

enter image description here

And there are certainly python scripts that you can find to assign images to Image Texture node of a material.

example used here:

You'll see a lot of this technique in character meshes, where areas like the head or eyes will be vertex groups assigned to different materials.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.