/
PxrCookieLightFilter

PxrCookieLightFilter

PxrCookieLightFilter projects a painted texture in front of the light.

This light filter is a more extensive version of PxrGoboLightFilter

 


 

Parameters

Cookie Mode

Specify the cookie mode:

Physical (0): The cookie behaves like a stained glass window through which light falls. The falloff and blur are determined by the size of the light, the distance to the light and distance from the cookie.

cookie_modePhysicalFar.jpg
cookie_modePhysicalNear.jpg

Analytic (1): The cookie has a fixed projection and manual blur and falloff controls.

cookie_modeAnalytic.jpg

 

Map

Filename of the projected texture. If you want to control the blur for the projected edge, include the mask into the alpha channel of this map. Otherwise, it will use a white opaque alpha installed on $RMANTREE/lib/textures/white.tex for blurring when Blur is > 0.0.

cookie_map1.jpg
cookie_map2.jpg
cookie_map3.jpg

Fill Color

If the texture's tile mode is not repeating, this specifies the color for the region outside of and behind the projected rectangle. When we specify Blur below, the edge of the projected rectangle will be blended with the fill color.

cookie_fillColorBlackLightColorGreen.jpg
cookie_fillColorWhiteLightColorGreen.jpg
cookie_fillColorWhiteLightColorWhite.jpg

Width

Width of the rect which the light is shining through.

cookie_width1.jpg
cookie_width3.jpg
cookie_width30.jpg

Height

Height of the rect which the light is shining through.

cookie_height1.jpg
cookie_height3.jpg
cookie_height30.jpg

Multiplier

Density

Controls the strength of the projected effect.

cookie_density05.jpg
cookie_density085.jpg
cookie_density1.jpg

Invert

Specify whether to invert the projected texture before it is applied.

cookie_invertOff.jpg
cookie_invertOn.jpg

Intensity

Global Multiplier for both the diffuse and specular contribution below.

cookie_intensity0.3.jpg
cookie_intensity1.0.jpg
cookie_intensity8.0.jpg

Diffuse

Multiplier of this light filter result for the diffuse contribution.

cookie_diffuse0.15.jpg
cookie_diffuse01.0.jpg
cookie_diffuse05.0.jpg

Specular

Multiplier of this light filter result for the specular contribution.

cookie_specular0.15.jpg
cookie_specular01.0.jpg
cookie_specular05.0.jpg

Projection (For Analytic Mode Only)

Directional

When this is on, the texture projects along a direction using the orthographic projection. When it is off, the texture projects using a focal point specified by the Apex.

cookie_directionalOff.jpg
cookie_directionalOn.jpg

Shear X

Shear the projection along the X axis.

cookie_shearX0.jpg
cookie_shearX05.jpg
cookie_shearXNeg05.jpg

Shear Y

Shear the projection along the Y axis.

cookie_shearY0.jpg
cookie_shearY05.jpg
cookie_shearYNeg05.jpg

Apex

Distance between the center of cookie and the center of projection. This is only applicable when Directional is off.

Use Light Direction

If this is on, the projection direction is determined by the position of the center of the light source. Otherwise, it only follows the orientation of the cookie. WARNING: This does not work with dome and mesh lights.

cookie_useLightDirectionOff.jpg
cookie_useLightDirectionOn.jpg

 

Texture Mapping

Tile Mode

Specifies how the texture repeats.

  • No Repeat (0)

  • Edge Extent (1)

  • Tile (2)

cookie_tileModeEdgeExtend.jpg
cookie_tileModeNoRepeat.jpg
cookie_tileModeTile.jpg

Invert U

Turn this on only if you want to flip the texture from left to right. By default, the orientation of the texture is matching the orientation as it is viewed in an image viewer.

 

Invert V

Turn this on only if you want to flip texture from bottom to top. By default, the orientation of the texture is matching the orientation as it is viewed in an image viewer. Note that the light filter already takes into the account of flipping the V direction for the correct default orientation.

 

Scale U

Scale of the projected texture in the U direction.

cookie_scaleU1.jpg
cookie_scaleU3.jpg
cookie_scaleUNeg1.jpg

Scale V

Scale of the projected texture in the V direction.

cookie_scaleV1.jpg
cookie_scaleV3.jpg
cookie_scaleVNeg1.jpg

Offset U

Offset of the projected texture in the U direction.

 

Offset V

Offset of the the projected texture in the V direction.

Use Alpha

If this is off, your result may not be smooth.



Premultiplied Alpha

If using a texture with unpremultiplied Alpha, set this to 0 of off for correct behavior.

 

Blur (for Analytic Mode Only)

Blur

Specify the blur of projected texture from 0-1. This gets multiplied by the blurNear/blurFar interpolation. This blurs between the projected color and the fill color when the texture is not repeating.

cookie_blur00.jpg
cookie_blur03.jpg
cookie_blur06.jpg

S Blur Mult

Blur multiplier in S direction.

cookie_sBlurMult01.jpg
cookie_sBlurMult05.jpg
cookie_sBlurMult15.jpg

T Blur Mult

Blur multiplier in T direction.

cookie_tBlurMult01.jpg
cookie_tBlurMult05.jpg
cookie_tBlurMult15.jpg

Blur Near Dist

Distance from the cookie where the blur interpolation starts.

cookie_blurNearDist06.jpg
cookie_blurNearDist4.jpg
cookie_blurNearDist5.jpg

Blur Midpoint

Distance between near and far, where the midValue is located.

cookie_blurMidpoint01.jpg
cookie_blurMidpoint05.jpg
cookie_blurMidpoint09.jpg

Blur Far Dist

Distance from the cookie where the blur interpolation ends.

cookie_blurFarDist001.jpg
cookie_blurFarDist010.jpg
cookie_blurFarDist500.jpg

Blur Near Value

Blur multiplier where the blur interpolation starts.

cookie_blurNearVal1.jpg
cookie_blurNearVal10.jpg
cookie_blurNearVal100.jpg

Blur Mid Value

Blur multiplier in the middle of the blur interpolation.

cookie_blurMidVal1.jpg
cookie_blurMidVal100.jpg
cookie_blurMidVal1000.jpg

Blur Far Value

Blur multiplier where the blur interpolation ends.

cookie_blurFarVal1.jpg
cookie_blurFarVal10.jpg
cookie_blurFarVal100.jpg

Blur Exponent

Power exponent of the blur interpolation.

cookie_blurPow0.1.jpg
cookie_blurPow1.0.jpg
cookie_blurPow10.jpg

 

Density Falloff (for Analytic Mode Only)

Density Near Dist

Distance from the cookie where the density interpolation starts.

cookie_densityNearDist1.jpg
cookie_densityNearDist3.jpg
cookie_densityNearDist5.jpg

Density Midpoint

Distance between near and far, where the midValue is located.

cookie_densityMidpoint01.jpg
cookie_densityMidpoint05.jpg
cookie_densityMidpoint09.jpg

Density Far Dist

Distance from the cookie where the density interpolation ends.

cookie_densityFarDist10.jpg
cookie_densityFarDist5.jpg
cookie_densityFarDist7.jpg

Density Near Value

Density multiplier where the blur interpolation starts.

cookie_densityNearVal0.jpg
cookie_densityNearVal05.jpg
cookie_densityNearVal1.jpg

Density Mid Value

Density multiplier in the middle of the density interpolation.

cookie_densityMidVal0.jpg
cookie_densityMidVal05.jpg
cookie_densityMidVal1.jpg

Density Far Value

Density multiplier where the blur interpolation ends.

cookie_densityFarVal0.jpg
cookie_densityFarVal05.jpg
cookie_densityFarVal1.jpg

Density Exponent

Power exponent of the density interpolation.

cookie_densityPow01.jpg
cookie_densityPow05.jpg
cookie_densityPow09.jpg

 

Saturation, Contrast, Tint

Saturation

Saturation of the result (0=greyscale,1=normal,>1=boosted colors).

cookie_saturation0.jpg
cookie_saturation05.jpg
cookie_saturation1.jpg

Midpoint

Midpoint for the contrast control.

cookie_midpoint01.jpg
cookie_midpoint1.jpg
cookie_midpoint2.jpg

Contrast

Contrast control (less than 1 = contrast reduction, larger than 1 = contrast increase).

cookie_contrast0.5.jpg
cookie_contrast1.0.jpg
cookie_contrast2.0.jpg

White Point

White point for the contrast control if (contrast > 1.0).

cookie_whitepoint0.5.jpg
cookie_whitepoint1.0.jpg
cookie_whitepoint3.0.jpg

Tint

Tint of the resulting color after saturation, contrast and clamp.

cookie_tintBlue.jpg
cookie_tintRed.jpg
cookie_tintWhite.jpg

Combine Mode

Combine Mode

mult: The results of all the filters are multiplied together

max: The maximum result from all filters is used.This works best for grey scale light filters.

min: The minimum result from all filters is used.This works best for grey scale light filters.

screen: Similar to the max operation, but it combines gradients in a smoother way. This works best for grey scale light.

Light filters on a light are grouped by their combine mode. Light filters in the same group are executed together and combined by the combine mode.The groups are executed in this order (max, min, screen, and then mult) and are multiplied together, which means a filter that turns things black in the mult group will zero out all other filters.

Related content