A reimplementation of something a did a long time ago:
The OSL shader for the chainlink material and an example node setup is as usual available on my blog:
http://blenderthings.blogspot.nl/2012/12/a-chainlink-fence-osl-shader-for.html
cheers
A reimplementation of something a did a long time ago:
The OSL shader for the chainlink material and an example node setup is as usual available on my blog:
http://blenderthings.blogspot.nl/2012/12/a-chainlink-fence-osl-shader-for.html
cheers
Thanks for putting these up!
Great examples to learn and nice looking things too!
This one again looks pretty impressive.
Probably the only thing giving it up is a lack of bent wire ends in the top/bottom rows, not the one you mentioned ;).
While at, i had a couple of questions about fabric osl: i can’t reproduce it and looks like i’m not getting right coordinates going on for input - it does look like there nothing happens at all; what was your unwrap method there?
And another - Index value is used to drive mixing, but values are 1 or 2 according to script. How’s that working?
Nice work, who needs to model?
Creating those bent wire ends is left as an exercise for the reader .
About the fabric shader: ‘scale’ times a fabric ‘unit’ is laid out on the uv. An alternative is to scale the uv vector with a mapping node. This means for example that you can create a tablecloth by creating a single square, unwrapping it with simple unwrap, subdivide it umpteen times a plug this uv vector in. Then use the scale input to make the thread pattern smaller. The parts of the bear where equaly simple: mostly spheres with a single seam, unwrapped and done. Just used a mapping node to rotate the uv map inorder to get the pattern to align in an way I thought more natural.
THe index in the example noodle is mere used to drive the mix btween fully transparent (when it is 0) or fully diffuse (when it’s 1 or 2). THe input to the mix node is clamped so anything bigger or equal to one will do. You could take different actions using all sorts of math nodes to use completely different materials for the different threads and not just different colors as is done in the example.
PS: if really nothing seems to happen, you might have forgotton to switch to OSL in the shader settings (trips me all the time).
After kind explanations of author and redoing file, it just started to work… And, no, OSL was on :D. Probably scaling issue.
Still, i need to bring index values to 0 with subtract node or by changing it in script.
Thanks again for sharing and looking into!
tried it and chain link looks nice
but i get only one chain link
is qty controled with the mapping may be or else
thanks
yep, all these shaders are controlled by mapping. Just plug a mapping node between a texture coordinate node and the chainlink node and adjust the x,y scale to get more repetitions and the z rotation to rotate (in the example image z-rotate was set to 45 deg)