Square light

How can I create square light ?
(like a spot light)

3 Answers

3
  1. Create a square white texture with resolution of power of two (for instance 128x128). Use the alpha to add some penumbra to your light.
  2. Add a spotlight to your scene `GameObject > Create Other > Spotlight`.
  3. Add the texture as Cookie in the Inspector for the light.
  4. You'll notice repetition of the cookie-texture, fix this by selecting the texture in the Project view and set Wrap Mode to Clamp.

You can do this with Spot Light Cookie.

A cookie which makes a light square is included in Standard Assets, so all you have to do is:

  1. Import light cookies from Assets->Import Package->Light Cookies from the menu bar.
  2. Assign the square cookie (/Standard Assets/Light Cookies/square) to your spot light.

Note that the square cookie has a grid, so you have to delete it if it’s not needed.

You can delete it with Photoshop or GIMP. I think there is no more simple way... To delete the grid, open the square cookie (square.psd) with Photoshop or GIMP, and then toggle layer visibility of 'Layer 3' (a grid layer) off. If you are not used to the softwares, it's probably easier to create a square white texture, as save said.

A Square light is a positional light with a square shape.A Square light may use a HDR texture which will be mapped on its surface. The creation of square light is not a heavy task. First you should create a square frame which have a resolution of (148x148).Then add spotlight to your frame.Add the HDR texture as cookie to inspect your spot lights.