Author Topic: Any idea how to produce a chain link fence material?  (Read 4176 times)

hi,

i am currently using a 1 month trial. I have make a few basic materials following tutorials.


[here is the type of fence material I would like to make][https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcR4t7O6il2W4okBKs0nQYhp75Qk-yNcO9tkrNfkdKo6Ytry2OwK9Q]

I was thinking, normalise an image of a fence texture, and then cut it out with an alpha channel? and use alpha-height as well.

also I need the material to be dual sided, can SD do this?

sorry if this post is on the incorrect page.

A lot will depend on "how 3D" your material needs to be. If you just need a flat-looking fence with a 2D look, you can use a Shape node and get most of the job done. Set the shape to Square, and the X and Y sizes to about 0.95. That will give you a square that almost fills the texture. Then enable the 45 degree rotation button at the bottom of the settings. Now you have a single link as a mask with black for "on" and white for "off". Add an "Invert Grayscale" node at the output, and you'll have a nice on-off mask. Tile those, and you'll get a first-order 2D approximation of a chain link fence. (Your alpha channel cutout plan is exactly right.)

Combining a color with the alpha mask is really easy. Just start with a uniform color node and pass its output to the RGB input pin of an RGB-A Merge node, and pass your greyscale mask to the A pin on that node. That will get you your base color map.

Now, if you want something more 3D looking, it gets quite a bit more complicated, and there are probably a million ways to do that. The immediate advice I would give is to experiment with nodes in the Patterns section. I'm intrigued enough by the question that I'm going to poke around at it a bit here, but I may not have time to actually solve it. The way I would probably approach it is to make 1/4 of the rhomboid link (a straight wire and a 90 degree curl) as a single vertical object, with a gradient height along is length and a sharp drop at the curly end. Then clone three more at 90 degree offsets, then at the end rotate the whole thing 45 degrees with a Transform 2D or similar node.

The experts probably have a better way to do this than I do -- I'm beyond rank beginner but nowhere near master level. :-) The one piece of advice I feel I can confidently give is to make your mask and height map in grayscale in the "upstream" parts of your graph, then add the coloration and ambient occlusion toward the "downstream" end just before you emit the material.

How much work you put into this will depend on how realistic you want the output to be, and how many external tweak settings you want to expose.

I hope you enjoy working with Substance Designer. It's been a paradigm shift for me moving from traditional photographic or painted textures to node-based procedurals, but the results can be amazing, and the file sizes on disk are a tiny fraction of non-procedural bitmap sizes.

The question of two-sided material really is dependent on your target environment. Are you targeting Blender, Unity, Unreal, or....? Two-sidedness is really more of a property of the 3D object than of the material. That being said, if you want a really "deep" look to your material and you're working in a game engine, look into shaders with parallax occlusion mapping (POM). I'm using one of those in Unity to make an air ventilation grille and getting really pleasing results.

I'm not sure if you are wanting to learn by making this, or just need it to solve a problem, but the mask and height generator is shared by "seanv3d" on the Substance Share site. (https://share.allegorithmic.com/libraries/104) If nothing else, this proves that it's possible! :)

Substance wizards, please feel free to jump in here with your expertise, and I will eagerly listen and learn along with the OP. :-)

seanv3d's algorithm is *way* smarter than what I suggested! Definitely go take a look at how he did it. In particular, he used the Waveform node for the basic shape, and I never would have thought of that.