From BlenderWiki
[edit] Spot Lamp
Mode: All Modes
Panel: Shading/Lamp Context
Hotkey: F5
[edit] Description
A Spot lamp emits a cone shaped beam of light from the tip of the cone, in a given direction.
The Spot light is the most complex of the light objects and indeed, for a long time, among the most used thanks to the fact that it was the only one able to cast shadows. Today, with the integration of a ray tracer within the internal render engine of Blender, all lamps can cast shadows (except Hemi). Even so, Spot lamps' shadow buffers are much faster to render than raytraced shadows, especially when blurred/softened, and spot lamps also provide other functionality such as 'volumetric' halos.
[edit] Options
- Dist: (Distance)
- The Dist: field indicates the number of Blender Units (BU) at which the intensity of the current light source will be half of its Intensity. Objects less than the number of BU away from the lamp will get more light, while Objects further away will receive less light. Certain settings and lamp falloff types affect how the Dist: field is interpreted, meaning that it will not always react the same.
- Changing the Dist: field value when using a Spotlight also changes the appearance of the Spotlight as displayed in the 3D Viewport.
- Energy (0.0 - 10.0)
- The Intensity of the light sources illumination.
- Color
- The color of the light sources illumination.
- Layer
- Only objects that are on the same layer as the light are lit by the light.
- Negative
- The light takes away light from the surface, subtracting light and making the surface darker, not lighter.
- No Diffuse
- The light does not brighten the color of the surface.
- No Specular
- The light does not cause a shine on the surface, and is not used in calculating the Material Specular color or highlights on the surface.
- Sphere
- The Sphere option restricts the Spotlights illumination range so that it will instantly stop illuminating past an area once it reaches the number of Blender Units away from itself, as specified in the Dist: field.
- An imaginary Sphere (with a radius of the Dist: field) is placed around the Spotlight source and it's light is blocked from passing through the Sphere walls. So the Dist: field now basically means that any light that is further away form its light source than the value in the Dist: field will be Attenuated to 0 after this point, and won't naturally attenuate but instantly stop.
- When the Sphere option is active, an imaginary Sphere will be projected around the light source, indicating the demarcation point at which this lights propagation will cease, example below:
- Lamp Falloff
- The Lamp Falloff field has been improved in Blender 2.46 so the layout of the Lamp panel is different in a number of ways. One of the changes is the Lamp Falloff drop down menu. The Lamp Falloff types are listed and described below:
- Lin/Quad Weight
- This Lamp Falloff is described in the Blender 2.46 release notes as follows:
- "Exactly the same as in older Blenders with the old 'Quad' button enabled. When this setting is chosen, two sliders are shown, 'Linear' and 'Quad' (previously Quad1 and Quad2), which controls the 'linearness' or 'quadraticness' of the falloff curve. Lamps in old files with the 'Quad' button on will be initialised to this setting."
- So it looks as if the Lin/Quad Weighted Lamp Falloff type is in effect allowing the mixing of the 2 Light Attenuation profiles (Linear Attenuation type and Quadratic Attenuation type).
- Here is a screenshot of the Lin/Quad Weighted light with default settings:
- Linear
- This slider/numeric input field, can have a value between 0 and 1. A value of 1 in the Linear field and 0 in the Quad field, in effect means that the light from this source is completely Linear. Meaning that by the number of Blender Units distance specified in the Dist: field, this light sources Intensity will be half the value it was when it reaches the number of Blender Units distance specified in the Dist: field.
- In the situation just described the Linear Falloff type is being completely respected, it has the Intensity value it should have (half Intensity) by the time it reaches the distance specified in the Dist: field.
- When the Quad slider is set to 0 the formula for working out the Attenuation at a particular range for Linear Attenuation is, in effect:
- I = E * (D / (D + Q1 * R))
- Where E is the current Energy slider setting.
- Where D is the current setting of the Dist: field.
- Where Q1 is the current setting of the Linear slider.
- Where R is the distance from the lamp where the light Intensity gets measured.
- Where I is the calculated Intensity of light.
- Quad
- Quad (Quadratic) Attenuation type lighting is considered a more accurate representation of how light Attenuates, and as such when the Lin/Quad Weighted Lamp Fallout type is selected, Fully Quadratic Attenuation is selected by default (that is the Quad slider field is 1 and the Linear slider field is 0).
- This slider/numeric input field, can have a value between 0 and 1. A value of 1 in the Quad field and 0 in the Linear field, in effect means that the light from this source is completely Quadratic (Quad type).
- In the situation just described the Quad Falloff type is being completely respected so it has the Intensity value it should have (half intensity) by the time it reaches the distance specified in the Dist: field. After the light has reached the distance in the Dist: field, the light decays much more quickly.
- One of the characteristics of Quadratic Light Attenuation is that at first it gradually Attenuates and then at a certain point starts to Attenuate at a much faster rate. The faster rate stage of Attenuation is roughly entered when the distance from the light is more than the value in the Dist: field.
- When the Linear slider is set to 0 the formula for working out the attenuation at a particular range for Quadratic attenuation is, in effect:
- I = E * (D2 / (D2 + Q2 * R2))
- Where E is the current Energy slider setting.
- Where D is the current setting of the Dist: field.
- Where Q2 is the current setting of the Quad slider.
- Where R is the distance from the lamp where the light Intensity gets measured.
- Where I is the calculated Intensity of light.
- Light Attenuation profile when both Linear and Quad sliders have values greater than 0
- If both the Linear and Quad slider fields have values greater than 0, then the formula used to calculate the Light Attenuation profile changes to this:
- I = E * (D / (D + Q1 * R)) * (D2 / (D2 + Q2 * R2))
- Where E is the current Energy slider setting.
- Where D is the current setting of the Dist: field.
- Where Q1 is the current setting of the Linear slider.
- Where Q2 is the current setting of the Quad slider.
- Where R is the distance from the lamp where the light Intensity gets measured.
- Where I is the calculated Intensity of light.
- No Light Attenuation when both Linear and Quad sliders have values of 0.
- If both the Linear and Quad sliders have 0 as their values. Then their light Intensity will not Attenuate with distance. This does not mean that the light will not get darker, it will, but only because the Energy the light has is spread out over a wider and wider distance. The total amount of Energy in the spread out light will remain the same though. Light angle also affects the amount of light you see. If what you want is a light source that doesn't attenuate and gives the same amount of light Intensity to each area it hits you need a light with properties like the Constant Lamp Falloff type.
- Also when the Linear and Quad sliders are both 0 values the Dist: field ceases to have any visible effect on the Light Attenuation.
- Custom Curve
- The Custom Curve Lamp Falloff type became available in Blender 2.46 and is very flexible.
- Most other Lamp Falloff types work by having their light Intensity start at its maximum (when nearest to the Light source) and then with some predetermined pattern decrease their light Intensity when the Distance from the light source gets further away.
- When using the Custom Curve Lamp Falloff type, a new panel is created called "Falloff Curve" shown below:
- This Falloff Curve Profile Graph, allows the user to alter how Intense light is at a particular point along a lights Attenuation Profile.
- In the example above (the default for the Falloff Curve Profile Graph), the Graph shows that the Intensity of the light starts off at the maximum Intensity that the light can have (when near the light) and linearly Attenuates the light Intensity as it moves to the right (further away from the light source).
- So if the user wanted to have a Light Attenuation Profile that got more Intense as it moved away from the light source, the user could alter the Light Attenuation Profile Graph as needed. Below is an example of a Falloff Curve Profile Graph, showing just such a situation:
- You are not just limited to simple changes such as light reversing the Attenuation profile, you can have almost any Attenuation profile you desire.
- The Falloff Curve Profile Graph has 2 axis, the Intensity axis and the Distance axis, labelled Intensity and Distance in the pictures shown (although these labels were added to make describing how the Falloff Curve Profile Graph works, easier, they don't appear in Blender).
- The Distance axis represents the position at a particular point along a light sources Attenuation path. The far left being at the the position of the light source and the far right being the place where the light sources influence would normally be completely Attenuated. I say normally would because the Falloff Curve can be altered to do the exact opposite if required.
- The Intensity axis represents the Intensity at a particular point along a light sources Attenuation path. Higher Intensity is represented by being higher up the Intensity axis while lower Intensity light is represented by being lower down on the Intensity axis.
- Here is another example of different Falloff Curve Profile Graph, along with its resultant render output:
- Altering the Falloff Curve Profile Graph is easy. Just LMB
on a part of the graph you want to alter and drag it where you want it to be. If when you click you are over or near one of the tiny black square handles, it will turn white indicating that this is the handle that is now selected and you will be able to drag it to a new position. If when you click on the graph you are not near a handle, one will be created at the point that you clicked, which you can then drag where you wish.
- Inverse Square
- This Lamp Fallout type Attenuates its Intensity according to inverse square law, scaled by the 'Dist:' value. Inverse square is a sharper, realistic decay, useful for lighting such as desk lamps and street lights. This is similar to the old Quad option with slight changes.
- Inverse Linear
- This Lamp Fallout type Attenuates its Intensity linearly, scaled by the 'Dist' value. This is the default setting, behaving the same as the default in previous Blender versions without 'Quad' switched on. This isn't physically accurate, but can be easier to light with.
- Constant
- This Lamp Fallout type does not Attenuate its Intensity with distance. This is useful for distant light sources like the sun or sky, which are so far away that their falloff isn't noticeable. Sun and Hemi lamps always have constant falloff.
[edit] Shadow & Spot Panel for a Spotlight lighting type
When a Spolight lighting type is selected the following default layout for the Shadow & Spot Panel is shown:
[edit] Options
- Ray Shadow
- The Ray Shadow button enables the Lamp and Sun light sources to generate Ray Traced Shadows.
- When the Ray Shadow button is selected, another set of options is made available, those options being:
- Shadow Sample Generator Type - Constant QMC
- The Constant QMC method is used to calculate shadow values in a very uniform, evenly distributed way. This method results in very good calculation of shadow value but it is not as fast as using the Adaptive QMC method, however Constant GMC is more accurate.
- Shadow Sample Generator Type - Adaptive QMC
- The Adaptive QMC method is used to calculate shadow values in a slightly less uniform and distributed way. This method results in good calculation of shadow value but not as good as Constant QMC. The advantage of using Adaptive QMC is that it in general is much quicker while being not much worse than Constant QMC in terms of overall results.
- Samples
- This Numerical slider field set the maximum number of samples that both Constant QMC and Adaptive QMC will use to do their shadow calculations. The maximum number of samples that can be taken is 16. According to the tooltip information that appears when over this field the sample value is squared so setting a sample value of 3 really means 32 samples will be taken.
- Soft Size
- The Soft Size numeric slider, determines the size of the fuzzy/diffuse/penumbra area around the edge of a shadow. Soft Size only determines the width of the soft shadow size not how graduated and smooth the shadow is. If you want a wide shadow which is also soft and finely graduated you must also set the number of Samples in the Samples field higher than 1, otherwise this field has no visible effect and the shadows generated will not have a soft edge. The maximum value for Soft Size is 100 (Blender Units?).
- Above is a table of renders with different Soft Size and Sample settings showing the effect of various values on the softness of shadow edges.
- Below is an Animated version of the above table of images showing the effects:
- Threshold
- The Threshold field is used with the Adaptive GMC shadow calculation method. The value in the Threshold field is used to determine if Adaptive GMC shadow sample calculation can skipped based on a threshold of how shadowed an area is already. The maximum Threshold value is 1.
- Only Shadow
- When the Only Shadow button is selected the light source will not illuminate an object but will generate the shadows that would normally appear.
- This feature is often used to control how and where shadows fall by having a light which illuminates but has no shadow, combined with a second light which doesn't illuminate but has Only Shadow enabled, allowing the user to control shadow placement by moving the Shadow Only light around.
- SpotSi:
- The SpotSi (SpotSize) Numeric Slider field controls the size of the outer cone of a Spotlight, which largely controls the circular area a Spotlights light covers. It does this by altering the Angle from the position of the Spotlight to the outer cone of the Spotlight. The SpotSi Numeric Slider field represents that Angle. The SpotSi value can be from 1 degree to 180 degrees.
- SpotBL:
- SpotBL (SpotBLur) Numeric Slider field controls the inner cone of the Spotlight. The SpotBL value can be between 0 and 1. The value is proportional and represents that amount of space that the inner cone should occupy inside the outer cone (SpotSi).
- The inner cone boundary line indicates the point at which light from the Spotlight will start to Blur/Soften, before this point the Spotlights light will mostly be full strength. The larger the value of the SpotBL the more Blurred/Soft the edges of the Spotlight will be and the smaller the inner cones circular area will be (as it starts to Blur/Soften earlier).
- To make the Spotlight have a sharper falloff rate and therefore less Blurred/Soft edges, decrease the value of SpotBL. Setting SpotBL to 0 results in very sharp Spotlight edges with almost no soft edge.
- The falloff rate of the Spotlight light is a ratio between the SpotBL and SpotSi values, the larger the circular gap between the 2 the more gradual the light fades between SpotBL and SpotSi.
- You can directly control the effective diameter of the Spotlights circle by adjusting the SpotSi property or indirectly by adjusting the Dist: property. The gap between SpotBL and SpotSi remains constant for changes to Dist:.
- SpotBL and SpotSi only control the Spotlight cone's softness or falloff, it does not control the shadow's softness as shown below.
- Notice in the picture above that the "Object's shadow" is sharp as a result of the raytracing, where as the Spotlights edges are soft. It you want other items to cast soft shadows within the Spotlights area you will need to alter other settings.
- HaloInt:
- The HaloInt (Halo Intensity) Numeric Slider field controls how Intense/Dense the Volumetric effect is that is generated from the light source. The HaloInt value has a range of between 0 and 5. By Default the value of the HaloInt Numeric Slider field is ignored because the Halo button is not active. To make HaloInt have an effect make sure the Halo button is active. The lower the value of the HaloInt slider the less visible the Volumetric effect is, while higher HaloInt values give a much more noticeable and dense volumetric effect.
- Blender only simulates Volumetric lighting in Spotlights when using Blenders Internal Renderer. This can lead to some strange results for certain combinations of settings for Light Energy and HaloInt.
- For example having a Spotlight with 0 or very low light Energy settings but a Very high HaloInt setting can result in Dark/Black Halos, which would not happen in the real world. Just be aware of this possibility when using Halos with Blenders Internal Renderer.
- Halo:
- The Halo button allows a Spotlight to have a Volumetric effect applied to it. This button must be active if the Volumetric effect is to be visible.
- Square:
- The Square button makes a Spotlight cast a square light area, rather than the default circular one.
- Buf. Shadow
- When the Buf Shadow button is activated, the currently selected Spotlight generates shadows using a Shadow Buffer rather than using Raytracing.
- When the Buf Shadow button is activated, various extra options and buttons appear in the Shadow and Spot panel.
- A description of most of these options are listed below:
- ShadowBufferSize
- The ShadowBufferSize Numeric Slider field can have a value from 512 to 10240. ShadowBufferSize represents the resolution used to create a Shadow Map. The Shadow Map is then used to determine where shadows lay within a scene.
- As an example, if you have a ShadowBufferSize with a value of 1024, you are indicating that the shadow data will be written to a buffer which will have a square resolution of 1024 pixels/samples by 1024 pixels/samples from the selected Spotlight.
- The higher the value of ShadowBufferSize, the higher resolution and accuracy of the resultant shadows, assuming all other properties of the light and Scene are the same, although more memory and processing time would be used. The reverse is also true if the ShadowBufferSize value is lowered, the resultant shadows can be of lower quality, but would use less memory and take less processing time to calculate..
- The pictures above show the affect of different ShadowBufferSize values on the quality of shadows. In the above, the filtering has been turned off (Sample value set to 1) from the shadow generation, to make it easier to see the quality degradation of the shadows.
- As well as the ShadowBufferSize value affecting the quality of generated shadows, another property of Spotlights that affect the quality of its buffer shadows is the size of the spotlights lighted area (the SpotSi value).
- Below are some examples of generated buffer shadows with identical ShadowBufferSize values, but different SpotSi values.
- As the SpotSi value is increased it can be seen that the quality of the cast shadows degrade.
- This happens because when the Spotlights lighted area is made larger (by increasing SpotSi) the shadow buffer area of the Spotlight would have to be stretched and scaled to fit the size of the new light area. The ShadowBufferSize resolution was not altered to compensate for the change in size of the Spotlight so the quality of the shadows degrade. If you wanted to keep the generated shadows the same quality, as you increased the SpotSi value you would also need to increase the ShaodwBufferSize value.
- The above basically boils down to:
- If you have a spotlight that is large you will need to have a larger ShadowBufferSize to keep the shadows good quality. The reverse is true also, if you have a Spotlight which covers a smaller area then the quality of the generated shadows will usually improve (up to a point) as the Spotlight covers a smaller area.
- Box
- The Box button indicates that shadows generated by buffer ahadow methods will be Anti-Aliased using a Box filtering method.
- This is the original filter used in Blender. It is relatively low quality and used for low resolution renders. It produces very sharp Anti-Aliasing. When this filter is used it only takes into account oversampling data which falls within a single pixel and doesn't take into account surrounding pixel samples. It is often useful for images which have sharply angled elements that go up/down/left/right (according to http://arkavision.com/?page_id=125).
- Tent
- The Tent button indicates that shadows generated by buffer shadow methods will be Anti-Aliased using a Tent filtering method. It is a simple filter that gives sharp results. It is an excellent general purpose filtering method. This filter also takes into account the sample values of neighbouring pixels when calculating its final filtering value.
- Gauss
- The Gauss button indicates that shadows generated by buffer shadow methods will be Anti-Aliased using a Gaussian filtering method. It has a very soft/blurry Anti-Aliasing result. As as result this filter is excellent with high resolution renders.
- More Information on Filtering Methods?
- The following links will give more information on the various Filtering/Distribution methods and their uses:
- Samples
- The Samples Numeric Slider field can have a value between 1 and 16. It controls the number of samples taken per pixel when calculating shadow maps.
- The higher this value the more filtered, smoothed and Anti-Aliased the resultant shadows will be that are generated from the selected light, but the longer they will take to calculate and the more memory will be used. The Anti-Aliasing method used is determined by having one of the Box, Tent or Gauss buttons activated.
- As shown above, as the Sample numbers increase the more the edge of shadows become less Aliased/Jaggied. Having a Sample value of 1, is similar to turning off Anti-Aliasing for Buffer Shadows.
- Soft
- The Soft Numeric Value Slider field can have a value between 1 and 100. The Soft value indicate how wide an area is sampled when doing Anti-Aliasing on buffered shadows. The larger the Soft value the more graduated/soft the area that is Anti-Aliased/softened on the edge of generated shadows.
- Above it can be seen that as the Soft size value rises, the softness of the blending of the shadow edges is more gradated. The blocky Aliasing is exaggerated by altering SpotSi and ShadowBufferSize values in the examples to more easily show the effect of the Soft field.
- Bias
- The Bias Numeric Slider field can have a value between 0.001 and 5. Bias is used to add a slight offset distance between an Object and the Shadows cast by it. This is sometimes required because of inaccuracies in the calculation which determines weather an area of an Object is in shadow or not. Making the Bias value smaller results in the distance between the Object and its shadow being smaller. If the Bias value is too small an Object can get artefacts which can appear as lines and interference patterns on Objects. When this happens it is usually called "Self Shadowing" and can usually be fixed by increasing the Bias value to prevent self shadowing. Other methods for correcting self shadowing include increasing the size of the ShadowBufferSize or using a different buffer shadow calculation method such as Classic-Halfway or Irregular.
- The images above show the affect of different Bias values. With a Bias of 0.001 the scene is full of Self Shadowing interference, but the shadow coming from the back of the sphere is very close to the Sphere. With Bias at 0.100 most of the Self Shadowing interference has been eliminated (apart from small areas on the Sphere), but the start of the shadow point has moved slightly to the left of the Sphere. With Bias values at 0.500 and 1.000 the shadow start point moves even further away from the sphere and there is no Self Shadowing Interference.
- Self Shadowing Interference tends to affect curved surfaces more than flat ones, meaning that if your scene has a lot of curved surfaces it may be necessary to increase the Bias value or ShadowBufferSize value.
- Having overly large Bias values not only places shadows further away from their casting objects, but can also cause Objects that are very small to not cast any shadows at all. At that point altering Bias, ShadowBufferSize or SpotSi values, among other things may be required to fix the problem.
- Halo Step
- Halo Step can have a value between 0 and 12. The Halo Step value is used to determine weather a light will cast Volumetric Shadows and what quality those resultant Volumetric Shadows will be.
- Above is a screenshot which shows a Volumetric Shadow being cast.
- For Volumetric Shadows to work you have to have the Halo button activated and have a high enough HaloInt value, so that the cast Volumetric Shadow is visible. Once these conditions have been met the Halo Step value can be altered to change the quality of Volumetric Shadows.
- If Halo Step is set to a value of 0 then no Volumetric Shadow will be generated.
- Unlike most other controls, as the Halo Step value increases the quality of Volumetric Shadows decreases (but takes less time to render), whereas when Halo Step value decreases the quality of the Volumetric Shadows increases (but takes more time to render).
- ClipSta & ClipEnd
- When a Spotlight with buffered shadows is added to a scene, an extra line appears on the Spotlight, shown below:
- The start point of the line represents ClipSta;s value and the end of the line represents ClipEnd's value. Both ClipSta and ClipEnd values represent Blender Units.
- ClipSta can have a value between 0.10 and 1000.
- ClipEnd can have a value between 1 and 5000.
- Both values are represented in Blender Units.
- ClipSta (ClipStart) indicates the point after which Buffered Shadows can be present within the Spotlight area. Any shadow which could be present before this point is ignored and no shadow will be generated.
- ClipEnd indicates the point after which Buffered Shadows will not be generated within the Spotlight area. Any shadow which could be present after this point is ignored and no shadow will be generated.
- The area between ClipSta and ClipEnd will be capable of having buffered shadows generated.
- Altering the ClipSta and ClipEnd values helps in controlling where shadows can be generated. Altering the range between ClipSta and ClipEnd can help speed up rendering, save memory and make the resultant shadows more accurate.
- When using a Spotlight with Buffered Shadows, to maintain or increase quality of generated shadows, it is helpful to adjust the ClipSta and ClipEnd such that their values closely bound around the areas which they want to have shadows generated at. Minimising the range between ClipSta and ClipEnd, minimises the area shadows are computed in and therefore helps increase shadow quality in the more restricted area.
- Automatic ClipStart & ClipEnd
- As well as using the value based ClipSta and ClipEnd fields to control when buffered shadows start and end, it is also possible to have Blender pick the best value independently for each ClipSta and ClipEnd field.
- Blender does this by looking at where the visible vertices are when viewed from the Spotlights position.
- Shadow Color
- When using buffered shadows it is possible to choose the color of the generated shadow, which does not have to bear any relation to the color of the light lighting the area.
- To change the color from the default (Black), click on the area highlighted in yellow and then select the required color.
- This Shadow Color selection box only becomes visible when using Buffered Shadows.
- The above images were all rendered with a white light and the shadow color was selected independently.
- Although you can select a pure white color for a shadow color, it appears to make a shadow disappear.
- Shadow Buffer Generation Type
- Blender has more than one way to generate buffered shadows. The Shadow Buffer Generation Type drop down selector controls which generation type is used for buffered shadow generation. Below the field is highlighted in yellow:
- There are 3 shadow generation types, those being:
- Classical
- Classic-Halfway
- Irregular
- Classical shadow generation used to be the Blender default method for generation of buffered shadows. It used an older way of generating buffered shadows, but it could have some problems with accuracy of the generated shadows and can be very sensitive to ShadowBufferSize and different Bias values and all the Self-shadowing issues that brings up. It appears that the Classical method of generating shadows is in the position of being obsoleted and is really only still in Blender to works with older versions of Blender, Classic-Halfway should probably be used instead.
- Classic-Halfway is an improved shadow buffering method and is currently the default option selected in Blender. It works by taking an averaged reading of the first and second nearest Z depth values allowing the Bias value to be lowered and yet not suffer as much from Self-Shadowing issues. Not having to increase Bias values helps with shadow accuracy, because large Bias values can mean small faces can lose their shadows, as well as preventing shadows being overly offset from the larger Bias value.
- Classic-Halfway doesn't work very well when faces overlap, and Biasing problems can happen.
- Currently the Halo Step option doesn't work well in some cases. Especially when using planes (not volumes), errors can be introduced.
- Irregular, this shadow method is used to generate sharp/hard shadows that are placed as accurately as ray-traced shadows. This method offers very good performance because it can be done as a multi-threaded process.
- The method supports transparent shadows by altering the "A Shad" Numeric Slider value:
- To use Irregular transparent shadows first select the object which will receive the transparent shadow. Then alter the Shad A value in the Material panel. This will only work when Irregular shadow buffer lighting is used.
- For more information on the different shadow generation methods see these links:
- SampleBuffers: 1, 4, 9
- The SampleBuffers setting can be set to values 1, 4 or 9 and represents the number of shadow buffers that will be used when doing Anti-Aliasing on shadows generated using shadow buffering.
- The higher the number of the SampleBuffers the smoother the Anti-Aliasing, but when using SampleBuffers of 4 you will use 4 times as much memory and with 9, nine times the memory. So Both memory and processing time can be increased, but you get better Anti-Aliasing on small moving objects.
- It seems that this option is used in special cases with very small objects, which move and need to generate really small shadows (such as strands). It appears that ormally pixel width shadows don't seem to anti-alias properly and increasing ShadowBufferSize also doesn't seem to help.
- Here is a message from Ton Roosendaal about its reason for being from a log message:
- Problem:
- > Temporal aliasing of shadowbuffers when small details move (like strands).
- >
- > In this case it doesn't work to simply increase the shadowbuffer size,
- > because strands are pixel-sized. Huge shadowbuffers make strand shadows
- > almost disappear. So... the shadowbuffer resolution has to be not too high.
- >
- > Instead of increasing the buffer size, we then create multiple buffers,
- > each on different subpixel positions (a bit like "FSA" :).
- >
- > So! Shadowbuffer sampling then works as follows;
- >
- > 1) You take multiple samples in the shadowbuffer, on different locations
- > inside (or around) the rendered pixel.
- > That option was already available as "Samp" button in Lamps
- >
- > 2) Set amount of sample buffers. It is default 1, but can be 4 or 9.
- >
- > The results of setting it to '4' or '9' buffers you can see here:
- > http://www.blender.org/bf/filters/index3.html
- >
- > Actually, deep shadowbuffers could solve it probably too! Anyhoo...
Unclear
I am not really clear on how SampleBuffers and Irregular shadows buffers work so if anyone has more info and came make thing clearer either contact me and I will update the page or update it, same goes for anything else you think should be changed on this page. Terrywallwork - 3 Oct 2008
|
[edit] Shadows
Spotlights can use either raytraced shadows or buffer shadows. Either of the two can provide various extra options. Raytraced shadows are generally more accurate, with extra capabilities such as transparent shadows, although they are quite slower to render. Buffered shadows are more complex to set up and involve more faking, but the speed of rendering is a definite advantage.
For more, detailed information see the Raytraced shadows or Buffered shadows sections.
[edit] What is Quasi-Monte Carlo?
The Monte Carlo method is a method of taking a series of samples/readings of values (any kind of values, such as light values, color values, reflective states) in or around an area at random, so as to determine the correct actions to take in certain calculations which usually require multiple sample values to determine overall accuracy, of those calculations. The Monte Carlo methods tries to be as random as possible, this can often cause areas that are being sampled to have large irregular gaps in them (places that are not sampled/read), this in turn can cause problems for certain calculations (such as shadow calculation).
The solution to this was the Quasi-Monte Carlo method.
The Quasi-Monte Carlo method is also random, but tries to make sure that the samples/readings it takes are also better distributed (leaving less irregular gaps in its sample areas) and more evenly spread across an area. This has the advantage of sometimes leading to more accurate calculations based on samples/reading.
[edit] What is Volumetric Lighting?
According to Wikipedia, Volumetric Lighting is as described Below:
- "Volumetric lighting is a technique used in 3D computer graphics to add Tyndall-effect lighting to a rendered scene. The term seems to have been introduced from cinematography and is now widely applied to 3D modelling and rendering especially in the field of 3D gaming. It allows the viewer to see beams of light shining through the environment; seeing sunbeams streaming through an open window is an example of volumetric lighting, also known as God rays.
- In volumetric lighting, the light cone emitted by a light source is modeled as a transparent object and considered as a container of a "volume": as a result, light has the capability to give the effect of passing through an actual three dimensional medium (such as fog, dust, smoke, or steam) that is inside its volume, just like in the real world."
A classic example is the Search light with a visible Halo/Shaft of light being emitted from it as the search light sweeps around.
| Blend file of Spotlight Animation |
By default Blender does not model this aspect of light. For example when Blender lights something with a Spotlight you see the Objects and area on the floor lit but not the Shaft/Halo of light coming from the Spotlight as it progresses to its target and would get scattered on the way.
The Halo/Shaft of light is caused in the real world by light being scattered by particles in the air, some of which get diverted into your eye and that you perceive as a Halo/Shaft of light. The scattering of light from a source can be simulated in Blender using various options, but by default is not activated.
[edit] Technical Details
(Spot Light Scheme) shows the relationship between the light's properties and how they relate physically.
[edit] Examples
[edit] See Also
Redirects to fix
- Manual/Area Lamp → Doc:Manual/Lighting/Lamp Types/Area
- Manual/Lamp → Doc:Manual/Lamp
- Manual/Oversampling (Antialiasing) → Doc:Manual/Render/Oversampling (Antialiasing)
- Manual/PartV/Buffer Shadows → Manual/Buffer Shadows
- Manual/PartV/Ray Shadows → Manual/Raytraced Shadows
- Reference/Panels/Shading/Lamp/Lamp → Doc:Reference/Panels/Shading/Lamp/Lamp
- Release Notes/Notes246/Misc → Dev:Ref/Release Notes/2.46/Misc






















![[]](/skins/blender/open.png)
