My current objective is to create a noodle that acts as an LCG (linear congruential generator), using X and Y coordinates as inputs. For anyone familiar with LCG’s, the obvious problem is state, so an LCG setup might be impossible or too hackish. So for that reason, I’m not particularly hard up on using an LCG over other types. I set up a few nodes that took X and Y, and performed the basic equation seen just below. I haven’t really been able to make it work.
Long story short, I’d like a noodle that effectively generates a pseudo-random number. In my head, I imagine it taking X and Y as inputs, and if the noodle outputs some value greater than A, it outputs 1, otherwise 0 (or some weighted range between 0-1). The goal is being able to mix two materials in such a way that I get a pattern somewhere in the vicinity of this: https://s-media-cache-ak0.pinimg.com/564x/ae/d9/c3/aed9c3c40411f1fa0040b31d445ee0c8.jpg
If anyone can help out, I’d really appreciate it.
** To clarify, the random input from object data is not what I’m looking for. I’m looking for pseudo-random based on X and Y.
** One more clarification, I’m doing this in the game engine. So procedural texture inputs won’t work. Otherwise that’s exactly where I’d go.
Ah. I’m sorry. One more clarification. Game Engine. Can’t use procedural texture inputs. Sorry about that. A good answer, none-the-less. If I wasn’t being difficult.
Yeah. That’s coding though. I could write up a script, but I’m trying really hard to keep it all typical node… stuff. It might come down to scripting though. If it does, I’ll likely choose a better PRNG algorithm than LCG. For the moment, I’m thinking I’m going to default to a cloud noise texture made up in GIMP. Thanks anyway Jamie.