5
$\begingroup$

Is it possible to produce a spot light with a different shape than a circle? In particular, I would like to produce a spotlight that casts a squared image into a wall, and the spotlight can be occluded by certain elements in the scene.

Edited: Using Cycles blender

$\endgroup$
8
$\begingroup$

The Geometry node Normal can be used to control the profile of the light emitted by a lamp and this can be used with an image texture to give full control of the lamp output.

Consider the following nodes :

material

Here the Geometry Normal is passed through a Mapping node to rotate it into the desired direction before being split into its X,Y,Z components. The X and Y components are adjusted to remove the 'bending' caused by the spherical Normal coordinates (otherwise you get distortion of the image at the corners) before being passed through a second Mapping node (to adjust the aspect ratio of the image) before being passed to the Image node for the texture - simply apply your own image in the Image node.

This can produce the following result :

rendered

Replace the Image with an image of a plain square - or any other shape - for your desired result.

This method will work with the Point and Spot lamp types - but the Spot will also be limited to a circular spot (in the direction of the lamp) so the Point lamp gives more control since you can simply provide whatever image you desire. Note also that the Lamp includes a 'Size' setting - setting to affect the blurriness of the lamp - setting this to zero will produce a very sharp image (as in the above example). Setting it to larger values will produce progressively blurier projections.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.