4
$\begingroup$

My goal with this experiment was to create a procedurally tiling floor where each tile is unique.

After messing around for a while, this is what I came up with:

enter image description here

Result:

enter image description here

I was really pleased, until I realized I have no idea how to make this tileable/repeatable. I found this post, but those solutions didn't work (or I failed to properly implement them). I tried to find out how to recreate the Brick Texture node from scratch because I think that would probably answer my questions, but this was really all I could find.

I was even less pleased with my work when I started inserting my marble texture into the material and realized it wasn't going to work. I tweaked some things and this is what I came up with:

enter image description here

My end goal is creating a procedural texture where tile shapes are created by a voronoi texture node and each tile has a different "seed". Is there a way to do this? I imagined using colors values from the voronoi node to provide the value that seeds each marble tile, but I can't figure out how to actually do that.

This is as far as I've been able to get (it doesn't tile and I'm pretty sure each tile's texture is static). Any help and/or feedback would be very much appreciated. Thanks in advance!

enter image description here

EDIT: Updated node tree. Still doesn't do what I want, but at least it's prettier...

enter image description here

UPDATE: Thanks for the help! I spent a few more hours cleaning up the shader and adding a bunch of input sliders. These are the "final" results. The textures, tiles, tile shapes, grout thickness, and seed are fully procedural! The grout is pretty bad, but it's 7AM and I'm going to sleep.

enter image description here enter image description here enter image description here enter image description here

Updated Blender file:

$\endgroup$
10
  • 1
    $\begingroup$ Do you want rectangular tiles, each with a unique texture, or each tile to have a a unique shape? Do you want a region of the overall texture to be seamlessly tileable? $\endgroup$ – Robin Betts Nov 19 '20 at 7:30
  • $\begingroup$ @RobinBetts I think my two main goals for this practice project are: (1) being able to independently control the size of each tile and scale of the marble, and (2) making each tile's marble texture unique (by somehow seeding each one base on it's color or something?). $\endgroup$ – Max Williams Nov 19 '20 at 7:49
  • 1
    $\begingroup$ Is this what you want to achieve? I used brick texture (also I can't format well since this is a comment) Mortar (/grid) size can be adjusted; Seed for tiles, you can't control each tiles though; Control how many tiles you want; Change the color for the marble (with ramp). Also, are you using an image texture for the tiles? You can use white noise to randomize them $\endgroup$ – Mysticreator Nov 19 '20 at 8:10
  • 1
    $\begingroup$ @MaxWilliams I kinda figured it out, but then I realized I've deleted some nodes. It might took me some time to make it again XD $\endgroup$ – Mysticreator Nov 19 '20 at 8:25
  • 1
    $\begingroup$ @MaxWilliams Ah I did it! I'll post it on the answer :D $\endgroup$ – Mysticreator Nov 19 '20 at 8:34
4
$\begingroup$

1/1

2/2

Here's a quick overview! I separated the X & Y, round the values, and multiply the X and Y value. Then, I connect the vector to the White noise to generate random value, connect the randomized value to the vector rotate to rotate each of them individually. I hope this is what you want to achieve :)

Get the file here: https://drive.google.com/file/d/11keH_2F6pm5L0qdhfqBuNEfbmzChA8Cj/view?usp=sharing

Also did I just recreated the “Poliigon Uber mapping” 😂

$\endgroup$
12
  • 1
    $\begingroup$ @MaxWilliams I'm not sure, I've tried to use both of them but it doesn't work really well. Also connect the vector socket to your node group, if it has a vector socket somewhere and mix the brick texture with the node group result $\endgroup$ – Mysticreator Nov 19 '20 at 8:51
  • 1
    $\begingroup$ This works! OMG, it works! You're a wizard! And it was soooo much simpler than what I had. Wow. Thank you. And, it also works if you replace all that math with a voronoi node (which is the second goal I had). Now I just need to figure out how to "find edges" of the voronoi node to make the grout for that version. $\endgroup$ – Max Williams Nov 19 '20 at 9:18
  • 3
    $\begingroup$ Instead of the math nodes, you can simply plug a voronoi texture node and set the randomness to 0. Plug the position output into the white noise node to get the "random-per-tile" value. Tweak the voronoi scale to adjust the size of the tiles $\endgroup$ – Gorgious Nov 19 '20 at 9:30
  • 2
    $\begingroup$ @Gorgious oops, I think I ever heard it somewhere.. oh the CGMatter tutorial $\endgroup$ – Mysticreator Nov 19 '20 at 9:33
  • 2
    $\begingroup$ I think the way you showed is more efficient computation-wise so it's nice to remember this setup if you have trouble rendering your material :) $\endgroup$ – Gorgious Nov 19 '20 at 9:38
5
$\begingroup$

I wonder how much computational difference there actually is,between using the Voronoi node for tiling, and doing the maths yourself, especially after you've introduced a couple of Noise nodes to do your randomness for you.. ?

Anyway, you certainly get lot out for not much in, in the way of nodes, with this kind of tree..

enter image description here

(I've made a group of it, here) .. You get UV-per-Cell, by subtracting the Position output from the texture-space, which lets you tile any texture you like into each cell:

enter image description here

You get 3 random numbers (a color) per cell, which you can use to randomise any of the cell's attributes (here, used to randomly rotate a texture, per cell):

enter image description here

And from the parallel Voronoi in the tree, you can get the distance to the cell's edges, which you can use to make a grouting mask, as here, or you can map ranges of it to other ranges to bevel tile edges:

enter image description here

And you can use the Randomness setting in the Voronoi nodes to take you from square tiles..

enter image description here

.. to Voronoi tiles, without any further adjustment.

enter image description here

(Just the group.. the other trees are a bit of a rushed mess :) )

$\endgroup$
6
  • $\begingroup$ Just a little question (REALLY unrelated). Does turning of anti-aliasing for the UI will make the blender run a bit smoother? $\endgroup$ – Mysticreator Nov 19 '20 at 15:13
  • $\begingroup$ @Cikitta Tjok Hmmm! I'm not sure! I kind of doubt that viewport antialiasing is that much work for the GPU, and any stalling in Blender e.g. with modifying heavy meshes would be CPU? Wild guess, though.... $\endgroup$ – Robin Betts Nov 19 '20 at 15:18
  • $\begingroup$ First, this is amazing. Thank you. It's similar to what I had going on (several hours of work after getting help from @CikittaTjok) but this answer really helped me understand why all that worked. I didn't know you could label node point connectors (I don't know what they're called). I do have one question though: How can I get the bevel to work with a curves node (for softer edges)? I tried messing around with it, but I couldn't figure it out. $\endgroup$ – Max Williams Nov 19 '20 at 21:45
  • $\begingroup$ @RobinBetts JK, I figured it out. I've been using the "Height" input, not the "Normal" input on the bump node. Heh... $\endgroup$ – Max Williams Nov 19 '20 at 21:56
  • 2
    $\begingroup$ It's very like yours..(I guess, it can, as commented, be done more economically, but with more nodes) To manipulate bevels with a RGB curve node.. something like.. 1. map the edge-distance range of interest to 0-1, with a map range node, to make it easier to handle in the curve-node,use the C curve, and remap/multiply on the way out if necessary.. it depends.. give it a try, and if stuck, post a new question. Just read yours.. Cool! $\endgroup$ – Robin Betts Nov 19 '20 at 21:56

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.