Author Topic: Help with math stuff (Random and If...Else conditions)  (Read 1613 times)

Hey guys, so I really need some help to make this substance work. I'm trying to make some wood panels like on a wall, mixing up two wood materials. I've got the basic concept down of what I'm trying to do, but using some of the math nodes is messing me up.

For example, I need the "Random" value to be a whole number, not an float.

I also need an operation to happen only when the number of tiles is an even number. I have absolutely no idea how to go about doing this.

Sorry if it's hard to understand what I'm trying to say, I'm pretty bad at explaining stuff. Hopefully it makes more sense if you look at my graph. It's on the "Offset" of the "Transform 2D" node to the far left.

Thanks in advance for any help.

Update: Got the random part to work, all I had to do was floor the random value after plugging in a value other than 0. Spacebar -> Function -> Floor in case anyone was wondering. Now to get the checking if it's even or odds to work...


The graph i have attached is one i use for tiles.
I hope this helps, i use one tile texture and the nodes are setup in a way that make the tiles look all different by the way of a gradient node and a rotation node.