PxrBarnLightFilter has two modes: Physical and Analytic. Physical Barns provide physically accurate shadowing, while Analytic Barns provide more precise user controls.
Physical Barns can be used to simulate what would be done on a set. Think about it as a physical primitive that casts shadows. The Physical Barn acts as a window that only lets light in through the opening shape.
- Cast light through an opening in space that creates physically accurate shadowing.
- Contain light bounces in large scenes.
Both the size of the light as well as the position of the barn in relation to the light change how the light 'casts a shadow' onto the set. The light casting through the barn creates an umbra and penumbra region based on that size and location. The Viewer Modifier guides show you the umbra and penumbra regions as you re-size the light or move the barn. When trying to understand what it's doing, look at the shape of the barn where it begins (the window the light travels through). The edge of that shape in space in relation to the light size and distance determines the umbra and penumbra size.
Two main things that change the quality of the light's umbra and penumbra:
- Size of Light
- A small light traveling through the barn shape casts a sharp shadow (small penumbra) and has a bigger umbra.
- A large light traveling through the barn shape casts a soft shadow (large penumbra) and shrinks the umbra.
- Distance of Barn from Light:
- A barn close to the light creates a large umbra.
A barn far from the light creates a small umbra.
Increasing the edge
Out of the box, the physically based barn has the edge parameter set to 0. You see falloff on a surface from your light because it's an actual shadow. That shadow softness is based on the light size/barn position as explained above, not the edge parameter setting. Think back to the idea that the barn opening is just a physical primitive. The edge parameter acts like a transparency slide outside of the edge of the barn. It allows light to pass through, but won't change the size of the penumbra (won't change shadow sharpness/softness).
When you start increasing edge, you will see one new guide ring show up in the Viewer. This is the end of the penumbra for the edge region. This ring is where the light no longer has an affect.
The most important things to know about the edge parameter:
- Start with this at 0 and see if you can get the softness you want by changing the barn position or light size
- Use it to allow more light through the barn to create a softer/larger falloff
- It will not change your shadow quality (how soft or tight it is)
Viewer Modifier Guides
- inside of the inner ring is the umbra
- inner guide ring is the end of the umbra and start of penumbra
- middle guide ring is end of penumbra
- outer guide ring is the end of the edge region, where light no longer has an effect
- The distance between the umbra guide ring and the penumbra guide ring indicates the size of the shadows your light will cast.
|move barn away from light||size decreases||size decreases||tighter shadows|
|move barn towards light||size increases||size increases||softer shadows|
increase light size
|size decreases||size increases||softer shadows|
|decrease light size||size increases||size decreases||tighter shadows|
|radius/width/height size increase||size increases||size stays the same||shadows stay the same|
|radius/width/height size decrease||size decreases||size stays the same||shadows stay the same|
|edge increase||size stays the same||size increases||shadows stay the same|
|edge decrease||size stays the same||size decreases||shadows stay the same|
- no light: The light only starts emitting from the start of the barn. Default behavior.
- no effect: The light starts emitting from the position of the light, and if the barn is positioned off of the light (which it likely will), it will then be affected by the barn shape at the start of the barn
- cone: The light starts emitting from the position of the light. If the barn is positioned in front of the light light, the light emitted is contained as if the edges of the barn were extended back to the light position.
- skew up: select barn in viewer, and move up
- skew down: select barn in viewer, and move down
- If the physical barn position is perfectly aligned with the light position, the guides will just be a line encircling the position of the light. Move it away from the light by just a hair and they guides should show up.
- It can be very hard to determine what the physical barn is doing without guides. Set the Guide Size parameter in the viewer section of PrmanLightFilterCreate to control the length of the guides.
Analytic Barns are very straight forward to use, but do not provide the same physical shadows that Physical Barns provide. See the PxrBarnLightFilter documentation for examples of how the Analytic Barn parameters affect the light shape.