How to change the shape of a spotlight with nodes?

Hey guys,
Im trying to make a striplight in Blender. A small rectangular strip of light, to highlight my product.

I would like to use a light, becuase they are invisible in the renders and I need to get close to my subject.

Now I read somewhere that in the node editor, you can apply a ‘shape’ or image texture to the actual shape of the spotlight. I would like to use this method to turn the spotlight from round, to a ‘rectangular’ shape.

Can somebody explain to me how to do this?

Not sure if you can do it with a spot light but you could use an area light and put a texture on it.
Either a bitmap texture or a procedural spherical gradient texture which you can repeat with the vector math node set to wrap.

Or if you want to make your light emitting geometry invisible you can use a light path node to make it invisible.

Edit: I am not sure if this is smart performance wise. I’d test if might be faster to simply array a bunch of spot lights.

You can also use an off-camera “barn door,” literally like you would do with a regular light. Planes block the light you don’t want to shine through, and those planes are out-of-view.

Thanks guys for your solutions… I also found this one, which works absolutely perfect in cycles. It enables you to use any image as a projector… so if you choose a white rectangle it will project this with light on your object. So you can choose any shape you want. So you can easily get a striplight…and you have control over the blurryness of the edges to… which is really helpful