3

I would like to know if collection combinations can be generated.

For instance: Imagine that I have a dog in a blender with 40 accessories (a cap, a necklace, a T-shirt, a watch...). I would like those 40 accessories to be randomly combined (the cap with the necklace, the necklace with the watch, the cap with the shirt and the watch... all possible combinations, or at least a few). And if that were possible to change the color of the dog.

It is possible that it can be done using frames, would someone know how to do it? It would be to export the keyframes to png. I hope I have expressed myself well... Thanks in advance!

laura
  • 31
  • 1

1 Answers1

1

Yes, it is pretty simple doing it with keyframes hidding the geometry that you don't want to be in there. Just got to Properties > Object Properties > Visibility and right-click in Viewport or Render and add a keyframe. Do this to all parts making them visible or not every frame.

enter image description here

If you want to export this to a png I recommend animate a sequence (length deppends on how many different combinations you want to do) and then Render -> Render Animation.

But if you want Blender to decide randomly decide what objects will be seen... well that's far more complicated. You could try adding a driver (right-click > add driver/edit driver) to the same Visibility option (Viewport or render), and write this expression: "round(noise.random())", which will generate a random number and round it so you will have two values, 0 (seen) or 1 (not seen), every frame.

enter image description here

You will have to accept this dialogue. If it doesn't pop-up automatically, just save and restart Blender

enter image description here

The problem with this method is that maybe there are accesories that are incompatible, like two watches, that could be seen at the same frame, overlapping each other.

You could use some very complex composition with Geometry Nodes in order to make all of this, even avoiding the incompatible accesories issue, but it will take a lot of time and advance knowledge in Geometry Nodes.


For the dog you can do it with Shader Editor and material nodes: go to Shading tab and under the Shader Editor Window check "Use nodes" if it wasn't activated and make something like this workflow:

enter image description here

Or simply under Material Properties panel add keyframe to the Base Color

enter image description here

and then insert keyframes onto the RGB value (right-click over the colored rectangle)

Again, you could use the same random driver expresión generator onto a Combine RGB node, but the color will be fully random and maybe some colors don't are to your taste.

enter image description here

Forteskun
  • 31
  • 6
  • 1
    It's worth noting that the noise will output a different value everytime you save & load the file, or quit & restart, or CTRL - Z / CTRL - SHIFT - Z, so it will be random but not consistent – Gorgious Nov 04 '21 at 14:54
  • 1
    Absolutely correct, as a countermeasure expressions can be baked into keyframes – Forteskun Nov 04 '21 at 21:19