0
$\begingroup$

I’m completely new to blender and python, only having marginal experience with C+. I have a personal project where I’d like to apply randomized generative modifiers, with their values themselves using random values. Is this reasonable? I have a general idea that python can access blenders list of modifiers, assign variables to them and randomly select and apply from that set. As for values, having the script recognize which modifier has been “selected” and determine which values can be randomized. To begin I’d like to just apply one modifier, and then rerun the script to abstract the form further. Is this reasonable? As a newcomer to python it seems very flexible but perhaps this is too specific (python can actually manipulate values in this way)? Some recommendations or even rough sketches of such a script would be greatly appreciated.

$\endgroup$
  • $\begingroup$ Adding modifiers or changing their parameters at random will likely not give you any useful output, constraining the allowed options is advisable. Nevertheless adding modifiers and adjusting the parameters is possible. blender.stackexchange.com/questions/71569/… $\endgroup$ – Robert Gützkow Nov 12 '19 at 17:21
  • $\begingroup$ Got it, if I wanted to continue regardless is it possible to randomize the selected modifier? And consequently it’s value like the ones mentioned in the link? Essentially type=randomModifier and as an example, octree.depth(n), n being a random value. $\endgroup$ – Dh6 Nov 12 '19 at 20:36
  • $\begingroup$ And sorry, what constraints would be reasonable? I get that your saying certain inputs would be redundant. $\endgroup$ – Dh6 Nov 12 '19 at 20:40
  • $\begingroup$ While you can do what you're describing, it has the potential to go very wrong. You should therefore limit yourself to a subset of modifiers and a subset of their configurable properties. Ensure that you assign values from a sensible range to the properties. Otherwise you may not only create visually unappealing results, but very likely crash Blender. For instancing adding a subdivision modifier and setting the number of subdivisions to 10 is possible, but it will likely to consume more memory than you have. $\endgroup$ – Robert Gützkow Nov 12 '19 at 21:48
  • $\begingroup$ Of course, that makes a lot of sense. It’s more experimental so I am hoping for absurdities. Again I am quite illiterate as far writing it goes. Any further suggestions? About the randomizing the library of modifiers for example? $\endgroup$ – Dh6 Nov 12 '19 at 22:23

Your Answer

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

Browse other questions tagged or ask your own question.