I am trying to create the look of regular holes over a irregular low poly surface. I am using a material with transparency using a tiled 2D Circular shader. The problem is that I need control of the hole positions so that they are a little closer to each other along the X axis than along the Y axis all the while keeping the shapes circular.
I am attaching a simple scene file with a plane with the current inadequate material as well as a JPG of how I imagine the shader might tile if only I could control the tiling distribution spacing better.
By the way, I have watched the Dr. Sassi’s tutorial here at Cineverity on creating holes but it doesn’t seem to apply for this application because my surfaces are so irregular. Further, I want to keep the overall polygon count low if possible.
Just in case the attachment doesn’t show, I am including this WeTransfer link:
The simplest way would be with a single image. Just a quarter circle of two circles in each corner [centered] and then tiled and set to seamless.
I guess you have a reason for the “shader” use here, e.g., animate the size or other attributes.
To keep things flexible means sometimes that the prep-work is more complex.
I have attached a solution with the Spline Shader. I place the Circle Spline in one corner of the shader and adjusted the scale for X and Y independently. As this shader is always a square, I have first to set the XY scale correctly, then counter that in the Tile settings of the Texture Tag.
With the patter you like to have, a second Spline Shader is used for the other “corner” of the square. Same set up.
Both are combined and inverted (Colorizer) in a Layer Shader.
It might seems a little bit counter intuitive at first, but one time to get the hang out of it, it is simple. One could even set up an XPresso, with a User-Data-Slider to make the process simpler. Adjust the size, as you wish.
Thanks Doc,
I was not familiar with spline shaders so that was very instructive in itself.
I am not sure if I am understanding your scene file correctly but I am not able to adjust one spline shader’s row position independent of the other. However, I do see that I am able to adjust one shader’s size independent of the other (slick).
To make an analogy with typography, if these 2 spline shaders rows were there own lines of style or formatted type, I would want to be able to control their respective leading (or paragraph spacing) throughout independent of one another.
The idea to have the two lines independent from each other is the idea here, but as we have no Font that we plot here, I used the Circle-Spline to fake that. (Yes, the Spline Shader has a font option with U and V spacing, but try for yourself, it doesn’t work very well with tiles.)
So, to use the Circle in U and V tiling, they needed to sit on the corners as a quarter circle, in that way they can follow.
However, it becomes tricky when the U and V ration is not the same (=1). Then the circle becomes an Ellipse, as the result from the Spline Shader is a square! To stretch that square we use the settings in the Texture Tag. But the resulting ellipse-shapes need the adjustment in the Circle Spline.
So first care about the structure, then about the Circle shape. Sometimes it doesn’t follow exactly a math base relation, see end of the clip—no idea why, BTW.
I hope that one minute clip allows to make this useable.
I certainly need more time, but this is perhaps one of the most versatile texture generators, and which is connected to Cinema4D, that I have seen so far.
I certainly believe that my few minutes diving into it—shows, i.e., there is certainly much more possible. Perhaps you check for yourself :o) Nodal compositing (hence why I mentioned “Fusion”, or NUKE or a decade a go Shake or a little bit later Conduit for that reason) is certainly part of the future. With Fusion now for free, and open source solutions popping, I have no doubts.
Hi Doc,
Substance Designer looks very good. Over the long term, that workflow seems to make a lot of sense. I just got sucked into a great presentation on Physically Based Rendering in Substance:
Thanks for the feedback, Pablum Picasso, yes, sometimes the simplest workflow works best—but, yes, to have two sliders to adjust this would be preferable.
I have set up a rough formula that “writes’ spheres into the space (orange layer=global; green layer=local
Just open the file in R17 and press play, switch one object to active at once to see the effect.
The formula is pretty much six times the same, for each x-y-z two instance. Done. Why two times, as I played with multiplications as well [instead of adding], so I left it in for a quick experimentation.
I hope that is the pattern you are after. It is tile-able. I left the +0 in the second part, so you can easily play with it.
The part for each row starts with the clamp() function, I hope that helps to get through it. Perhaps the clamp is not needed, it is more for safety in it, as the Formula Shader can produce values way above 100%, which might “shoot back” in 32bit/float…
Again, this is a rough version. Rough means here, that I used a short-cut. The creation of circles is not done by crossing two sin() functions, as it would result in a square. To avoid that square like appearance I limited it with the ?() function.
If you press play, the scene is animated to increase the Texture Tag tile number.