sj_blocker


sj_blocker is a mental ray and Arnold shader letting you filter a color (either on a surface or from a light) by a blocker.
A blocker is a simple implicit object (either a grid, a sphere, a cube or a cylinder) that can be srt transformed.
Typically, the shader connected to a light input color (light blocker), but, as said, it can be applied anywhere.
In particular, since light shaders are not supported by SItoA yet, in Arnold you can apply sj_blocker only as texture shader on surfaces.

Download  (Softimage only)

Installation:

The spdl and the dll/so of your choice should be installed under the SItoA addon directory.
My favourite way to do it is from a Softimage prompt, moving to the shader spdl/dll directory and running xsibatch -i sj_blocker.spdl -d Addons\SItoA
If you don't care about Arnold, you can install the shader wherever you prefer.

Parameters:

Mute: if on, Input color is returned.

Input: the input color to be filtered through the blocker.

Positive: if on, the shader blocks the color if the point is inside the blocker. Else, it blockes it if outside.

Filter: the multiplier of Input if is inside (Positive=on) or outside (Positive=off) the blocker.

Extra Scale, Decay: if Extra Scale > 1, a the blocker shape falls off instead of being a sharp one. The decay extent depends on the Extra Scale, and the decay speed on Decay (0==none, 1==linear, 2==quadratic and so on).

Type: defines the blocker shape. Can be Grid, Sphere, Cube, Cylinder.

Scale, Rotation, Translation: the srt to be applied to the basic blocker. You can either set them by hand, or use the two buttons provided to have the srt linked by expression to an implicit (not renderable) object.
Pick From Implicit Object: after clicking, pick an existing object (grid, sphere, etc.). Scale, Rotation, Translation are constrained by expression to the picked object.
Create Object: an implicit object of the current Type is created, and Scale, Rotation, Translation constrained by expression to the new object.

Examples:

This is the default configuration (mental ray). The blocker is a unit sphere, positive, and the filter color is black.

 

Here we change the colors, scale and rotate the blocker, and allow for an extra scale with a linear decay.

Here I use the Create Object button, then scale, rotate and translate the cube, and render it as a negative blocker.

Here is how to have more than one blocker: you just have to stack several sj_blocker through the input color.


Finally, here is the shader in action under Arnold. As said, we can't apply it to the light. Instead, we connect it to the diffuse color.