Here’s a shader for making physically correct windows using only a single-sided plane!
http://www.rensheeren.com/blog/osl-archglass/
UVTransform (OSL)
An OSL shader to meet your texture offsetting, tiling, and rotating needs!
Check out the replace UV input as well, you can generate one with the default UV output of this node, or for example a VRaySamplerInfoTex set to UVW. Then mix that map with a noise.
I’m planning a variation on this shader with min-max randomisation options. As well as a separate distortion shader.
Page:
http://www.rensheeren.com/blog/osl-uvtransform/
Download link:
http://www.rensheeren.com/osl/UVTransform_tex_v002.osl
Right-click and save as.
Enjoy! π
ChannelSwitcher (OSL)
An OSL shader for switching channels. You input two textures and then you can shuffle the RGBA channels around to make a new output. So for example you could have the red and green channels of texture A, green as a black output, and the alpha from texture B.
Or you could switch all the channels to use the red channel, so you’d have a monochrome output.
Page:
http://www.rensheeren.com/blog/osl-channelswitcher/
Download link:
http://www.rensheeren.com/osl/channelSwitcher_tex_v002.osl
Right-click and save as.
Enjoy! π
MixNormalMaps (OSL)
And another one!
A shader for mixing or blending together normal maps as outlined on this page:
http://blog.selfshadow.com/publications/blending-in-detail/
(Colin BarrΓ©-Brisebois, Stephen Hill)
This gives much better results than simply blending or overlaying two normal maps. It uses Reoriented Normal Mapping as described in the article as well as the idea from the second comment, by “jarkko” in that article, which I have named Displacement Vector Normal Blending here just to give it a name. The modes are fairly similar in results.
Page:
http://www.rensheeren.com/blog/osl-mixnormalmaps/
Download links:
http://www.rensheeren.com/osl/mixNormalMaps_tex_v003.osl
http://www.rensheeren.com/osl/rhfunctions.h
Right-click and save both in the same folder, both are needed for the shader to work. Overwrite rhfunctions.h if asked.
Enjoy! π
CamMapScale (OSL)
For 3ds max specifically – an OSL shader to scale back an image to the original input size when using a Camera Map Per Pixel.
The Camera Map Per Pixel projection map scales the input image to the size of the render output. So if you want to project a square image, youβd have to set your render resolution to square as well. Pretty annoying, yes? This OSL shader will scale your image back so square really means square!
Page:
http://www.rensheeren.com/blog/osl-cammapscale/
Download link:
http://www.rensheeren.com/osl/camMapScale_tex_v001.osl
Enjoy! π
Merge2 (OSL)
Here’s a shader for Nuke-style merge operations with two inputs:
Page:
http://www.rensheeren.com/blog/osl-merge2/
Download link:
http://www.rensheeren.com/osl/merge2_tex_v001.osl
Enjoy! π
Show UDIM (OSL)
Hello again! The second shader posted here is a small shader that will display the current UDIM tile number, very handy sometimes!
Page:
http://www.rensheeren.com/blog/osl-show-udim/
Download links:
http://www.rensheeren.com/osl/showUDIM_tex_v001.osl
http://www.rensheeren.com/osl/rhfunctions.h
Save both in the same folder, both are needed for the shader to work.
Enjoy! π
The Reflector (OSL)
Behold! The reflector is here!
An OSL texture shader to give correct reflections for metals and non-metals, with polarisation, outside IOR, and rough Fresnel options!
This last feature is really interesting as in most renderers how much the material will reflect on the grazing angles or sides of the material will not change with the roughness of the material, resulting in too dark or too bright edges. See the shader page linked below for all the details.
A comparison with rough Frensel enabled on the left:
A second comparison with rough Fresnel enabled on the left:
A comparison of the reflection amount, left is with the shader:
Page:
http://www.rensheeren.com/blog/osl-reflector/
Download links:
http://www.rensheeren.com/osl/reflector_tex_v002.osl
http://www.rensheeren.com/osl/rhfunctions.h
Save both in the same folder, both are needed for the shader to work. Overwrite rhfunctions.h if asked.
Enjoy! π