1
$\begingroup$

I am using the object info nodes random output into a colour ramp to decide the colour of my icing

1]

Is there a way to assign what collection my particle system for the sprinkles uses so that I can set specific collections of sprinkles for every colour. So if the icing is brown it uses sprinkle collection 1; if it's pink it uses collection 2; if it's blue it uses collection 3 etc.

$\endgroup$
2
$\begingroup$

I'd suggest to do it the other way around: Having diffrently colored objects in a collection and instancing them via the particle system. In the render tab of the particle system choose reender as collection.

Option 1: pick random. (even distribution)
Option 2 if you want more controll how often the objects are instanced in relation to each other you can use the "count" feature.
(Option 3 for even more controll use the AddOn Animation Nodes)

enter image description here

Update 1: This intent you have is a advanced procedural workflow. I think its fun to work like that but it needs a bit of trickery often. As far as I know Blender has no native functionality like that, because this is very specific also, and blender is not a fully procedural tool. The AddOn Animation Nodes is a gamechanger in terms of making the python interface more acessible and easier to handle.

Here is a barebone example in AN (Animation Nodes) that changes instancing collections in the particle system. The boolean value (See A) would get your logic as input that does the color allocation or gets the color from the material and sets the corresponting partile collection. enter image description here

Going this far with animation nodes, maby it is simple to use it also for color allocation. At the moment you do it with ObjectInfo.random wich gives you no controll. If you have multiple Color-Sets you could smoothen the workflow with Custom Object Propertys that AN interprets an does the rest. Then the only thing you would have to do would be to duplicate the object and change its custom property.

$\endgroup$
2
  • $\begingroup$ I'm already rendering as a collection for the sprinkles it's just that I'm trying to change what collection it's using based on the colour of the icing as I have multiple collections of sprinkles and don't want certain collections of sprinkles used in combinations with certain colours of icing. I'm trying to make it so I can duplicate my doughnut and have it assign a colour for the icing and use the appropriate sprinkles for that colour. i.gyazo.com/57ee8183bb0716786ddd305d6a611f79.png $\endgroup$ Jan 30 '20 at 22:11
  • $\begingroup$ updated answer following your comment $\endgroup$
    – A M
    Jan 31 '20 at 7:51

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.