How to create a custom cookie (thanks to @Slimek ):
1. In your custom addon folder create the following folders materials/effects/lightcookies , their name and order it´s important otherwise it won´t work.
2. Create your desired image that you want to project as tga (targa) an place it in the folder "lightcookies"
3. Using notepad or notepad++ ,create a vtex file using this code:
<!-- dmx encoding keyvalues2_noids 1 format vtex 1 --> "CDmeVtex" { "m_inputTextureArray" "element_array" [ "CDmeInputTexture" { "m_name" "string" "InputTexture0" "m_fileName" "string" "materials/effects/lightcookies/stained_glass_01.tga" "m_colorSpace" "string" "srgb" "m_typeString" "string" "2D" "m_imageProcessorArray" "element_array" [ "CDmeImageProcessor" { "m_algorithm" "string" "None" "m_stringArg" "string" "" "m_vFloat4Arg" "vector4" "0 0 0 0" } ] } ] "m_outputTypeString" "string" "2D" "m_outputFormat" "string" "BGRA8888" "m_outputClearColor" "vector4" "0 0 0 0" "m_nOutputMinDimension" "int" "0" "m_nOutputMaxDimension" "int" "0" "m_textureOutputChannelArray" "element_array" [ "CDmeTextureOutputChannel" { "m_inputTextureArray" "string_array" [ "InputTexture0" ] "m_srcChannels" "string" "rgba" "m_dstChannels" "string" "rgba" "m_mipAlgorithm" "CDmeImageProcessor" { "m_algorithm" "string" "Box" "m_stringArg" "string" "" "m_vFloat4Arg" "vector4" "0 0 0 0" } "m_outputColorSpace" "string" "srgb" } ] "m_vClamp" "vector3" "0 0 0" "m_bNoLod" "bool" "1" }
4. Now you can apply it to a light_barn entity and set the light to dynamic in order to behave properly ( to project and maintain its shape).
[Blocked Image: https://i.imgur.com/tulqyAO.png]