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.

uvtransform_rndr

The UI in VRay:
uvtransform_ui

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.

channelswitcher_rndr

The UI in VRay:
channelswitcher_ui

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.

mixnormalmaps_rndr

The UI in VRay:
mixnormalmaps_ui

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!

cammapscale_rndr

The UI in VRay:
cammapscale_ui

Page:
http://www.rensheeren.com/blog/osl-cammapscale/
Download link:
http://www.rensheeren.com/osl/camMapScale_tex_v001.osl

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.

The UI in VRay:
reflector_screen

A comparison with rough Frensel enabled on the left:
reflector_sphere1

A second comparison with rough Fresnel enabled on the left:
reflector_sphere2

A comparison of the reflection amount, left is with the shader:
reflector_sphere1_flt

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! πŸ™‚