Advanced Spotlight for DAZ Studio

Contents

A clay ambient occlusion render of a race car. Introduction Important Concepts Quick Start Quick Tips Parameter Settings Known Issues

Introduction

A DAZ Studio render of soldiers and a giant troll fighting in a rain storm. The scene was illuminated using only spotlights and primitive hitmode.

The Advanced Spotlight for DAZ Studio adds new features and greatly extends lighting control for more creativity and faster rendering.

The main focus of the light's design is aimed at faster shadow calculation. This is achieved through the ability to use of different shadow quality settings for different surfaces. The user controls and internal code optimizations work together to make soft, ray traced shadows faster then ever.

In addition to speed improvements, the Advanced Spotlight includes a number of controls for extended artistic freedom. These include several falloff rates, control of the beam's distribution and the ability to project texture maps from the light.


Important Concepts

A render of an anime style character illustrating how shadow samples can be decreased for slow rendering surfaces such as hair.

The base settings of the Advanced Spotlight are very similar to the default DAZ Studio spotlight. Settings like intensity, light color and spread angle work in the same way you expect from the DS default spot.

Beyond the familiar controls there are extra settings which allow you to fine tune the look by adjusting the softness of the spread angle, change the rate at which the intensity decreases with distance, use textures for gobos (aka. cookies, gels or filters ) and blur or focus those textures with the turn of a dial.

The true strength of the light is really in the lighting control section which allows you to selectively adjust how the light behaves when illuminating different objects or surfaces.

Selective illumination is achieved by instructing the light to look for particular settings on surfaces in the scene. For instance, the light can be told to look for any shader which has a diffuse strength of 99%. If the light finds a surface which matches that criteria it "flags" that surface as being one that should be treated in a special way.

The light has a drop-down menu with several options telling the light what to do for surfaces which have been flagged. The light can use lower or higher quality settings for those surfaces, completely ignore those surfaces or only illuminate those surfaces.

I'm sure every DAZ Studio user has run into the situation where they had a nice looking, fast rendering scene... until they added that one, slow rendering item such as transmapped hair or a refractive glass container. The flagging feature of the Advanced Spotlight allows for faster illumination and shadow settings to be used on those troublesome surfaces.

Another common situation is when a little extra light is needed on one surface, such as an additional highlight on the eyes, but you don't want that light to illuminate anything else. Through flagging, you can tell the extra spotlight to only illuminate the eye surface.

Four spotlights projecting gobo textures. Rendered with a volumetric atmosphere camera.

Although attempts have been made to clearly label the settings and make the light as intuitive as possible, some features may take a bit of trial and experience before becoming part of a fast workflow.

The advanced features of the light may be a little confusing at first. However, the light's dials have been set to defaults which should work well in most situations right out of the box.

Please note that the lighting and shadows will work on any surface but some of the advanced, surface flagging features will only recognize materials which use the DAZ Studio Default, Ubersurface, HumanSurface, SimpleSurface or the AoA Subsurface Shader. These shaders are used for the overwhelming majority of DAZ Studio based materials so it is rare that a user will encounter any limitation with the light.


Quick Start

DAZ Studio screen capture showing the advanced spotlight being loaded into a scene.

The light can be found in the content folder under Light Presets - Age of Armour - Advanced Spotlight.

Aim the light and adjust the spread angle just like you would the default spotlight. I find that viewing through the light and using the Aim At (or target) button is the easiest method.

By default, the light has shadows enabled. To disable shadows simply set the shadow strength to 0%. This will bypass any shadow calculation. The light uses an optimized ray trace function for shadows which, with the proper settings, will render much faster than the ray traced shadows of the default DS spotlight. Mapped shadows are not available in this light.

As with the default DAZ Studio lights, the illumination drop-down list allows setting the light to selectively cast diffuse and/or specular lighting. The Intensity and Light color also work the same as standard DS lights.

The most important settings to keep in mind are Shadow Samples, Shading Rate and Max Error. These settings all work in conjunction as speed vs quality throttles.

The higher the Shadow Samples the slower the render but the smoother that soft shadows will appear. Shading Rate and Max Error work the same way but in the opposite direction where lower values produce quality results and higher values will render faster.

The remaining settings allow for more advanced customization and control over the light and are explained in detail below.

Take note that the Shadow Samples in DAZ Studio's render settings have no effect on this light. This is intentional, allowing for different shadow sample counts to be used on different lights or surfaces for greater quality and render speed control.

Also note that a Max Ray Trace Depth of 1 or higher is required for shadows to work with the Advanced Spot Light.


Quick Tips

Using the spotlight as point light with directional control using the inner angle parameter.

General


Parameter Settings

Light Group

An interior scene with 4 lights illustrating linear, squared, custom and no light falloff.

The parameters of the Light group contain settings which are familiar to, and work much the same as, those of standard DAZ Studio Lights.

In this group you can adjust the color, shape and intensity of the light as well as control the falloff of the light.

Falloff Rate determines the formula used to calculate how the light intensity diminishes over distance. A setting of None matches the formula of the DS default spotlight while Squared creates a physically correct effect where the light's intensity will decrease at the inverse square of the distance.

Because Linear and Squared falloff formulas cause brightness to drop very quickly over distance, the light attempts to auto correct for this and (internally) increases the intensity at the source. The auto correction may make the light appear brighter or darker when changing from one falloff rate to another so you may need to ajdust the Light Intensity to better fit your scene.

An interior scene with 4 lights using various inner cone angle settings of the Advanced Spotlight.

Shadow Group

A comparative chart of renders illustrating the effects of various shadow sample and irradiance shading rate settings. Click here for a larger image.

The parameters in the Shadow group adjust the appearance and quality of ray traced shadows.

There are several speed enhancements, such as adaptive sampling and primitive hitmode. These enhancements may not look good in all situations.

Fortunately, because of the advanced control of the light, you can selectively illuminate different objects with different shadow settings or different lights. This allows for the speed enhancements to be turned off for surfaces where higher quality settings are needed yet keep the fast rendering optimizations for surfaces where the enhancements will have no negative effect.

A comparative chart of renders illustrating the effects of various shadow sample and irradiance shading rate settings.

An interesting point to note is that shadows are calculated by shooting rays from the surface toward the light rather than the other way around. This is important to keep in mind when using different settings for flagged surfaces.

When you use Alternate Samples settings on a surface, for instance hair, remember that the light will use lower samples only for the shadows the hair receives or casts onto itself. The shadows which the hair casts onto other objects will use the higher Shadow Samples setting (unless those surfaces are also flagged to use the Alternate Samples setting.

That may sound counter intuitive but it is simply how RenderMan shading works. Shadows are calculated at points on the surface, comparing their positions to the light source, and casting shadow rays to see if something is blocking the path between the surface and the light.

Although it may not seem that there would be a much of an improvement for a transmapped surface to lower the samples it receives rather than lowering the samples of the shadows it casts, it does in fact, greatly reduce rendering times.

An illustration showing the basic concept of raytracing and occlusion based shadows.

Lighting Control

3d fashion portrait render using 3 lights. Each light uses different quality settings to speed up the processing.

The features available under the Lighting Control group allow you to set how the light behaves for different surfaces and objects. This is where I feel the benefits of the Advanced Spotlight really come through.

The light examines all the shaders in the scene and looks for certain settings or "flags." The light can then, at your discretion, adjust the lighting differently for the flagged surfaces.

The light can be told to use lower shadow samples for flagged surfaces, illuminate them at different strengths or even completely ignore those surfaces. It is also simple to have the light only illuminate surfaces which have been flagged. This allows for different surfaces to be illuminated by different lights for ultimate control of your lighting.


Known Issues

Very Rare Conditions - The Advanced Spotlight will see and respect the Occlusion Shading Rate and Override settings of the UberSurface shader in all cases except when Ubersurface's Occlusion Shading Rate is set to exactly 4. All other Occlusion Shading Rate settings will function properly. This was simply a limitation that had to be incorporated in order to allow for greater overall light flexibility.

Only when using volumetric atmosphere All functions of the light work well with volumes (many of the images in this user guide were rendered from my atmospheric cameras) with the exception of when the light is set to have different intensities for flagged surfaces such as using the Set Light Strength with Surface Ambient Strength feature. This is likely to cause artifacts surrounding the lower intensity surface. The issue is a difficult one to resolve due to how atmospheric volumes work. I continue to test new light and volume codes in the hopes of finding a fix.

Somewhat Common - At the time of this writing, all surface shaders will be properly illuminated by the Advanced Spotlight but flags can only be read from surfaces which use the DS Default shader, UberSurface, HumanSurface, SimpleSurface and the AoA Subsurface Shader. I'm experimenting with some DAZ Studio scripting which may allow shaders created in Shader Mixer to be updated and allow for proper flagging.

When using copy and paste - After using CTL+C and CTL+V to copy the settings from a default DS light and pasting those settings onto an Advanced Spotlight, if the Advanced Spotlight is then turned off, using the eye icon in the Scene tab, you may not be able to turn the light back on again. This bug is perplexing and I have not yet been able to track down the cause.

When using copy and paste - Using copy from a default DS light which has shadows turned on then pasting onto the Advanced Spotlight, will cause DAZ Studio to attempt top use its builtin shadow functions which the Advanced Spotlight was not designed to support such as Deep Shadow Maps. This will cause the light to render black.

This situation is easily resolved by setting DAZ studio to show hidden parameters, selecting the Advanced Ambient light and changing the hidden Shadow Type (Warning DO NOT USE) dropdown to None. The light should then perform correctly.

It appears DAZ Studio requires this menu for all lights. When I removed it from the code, DS replaced it upon loading the light, haha. The best solution I could find was to hide the setting and add a warning not use it.


Top Introduction Important Concepts Quick Start Parameter Settings

RenderMan (R) is a registered trademark of Pixar.