Rock Shader for DAZ Studio
Contents
Introduction
The AoA Rock Shader turns almost any DAZ Studio object into a detailed, procedural, rock surface.
All aspects of the shader are procedural and do not rely on UV mapping. This allows every aspect of the look to be tuned. Additionally, the effect will
render completely seamless even on objects without UV coordinates.
To give an idea of how well the shader does at randomizing shape, every one of the rocks shown in this user guide is simply
a DS, 6 polygon, cube primitive with SubD applied!
Important Concepts
Although the AoA Rock shader can be used on any object, the intent is mostly aimed at creating natural rocks and boulders rather than use with carved
stone surfaces like statues.
The shader uses an object's location in the scene as a seed for randomization of the surface. Because of this each object will have different bumps
and features even on objects which are exact copies of eachother.
Complex boulders can be easily made even from the simplest geometry such as a SubD cube. This, used with DAZ Studio's instancing feature, allows the creation
of highly complex looking scenes, such as piles of rocks or an asteroid field, with as few as 6 polygons.
Because of the shader's use of world coordinates to drive randomization, the Rock shader may not be suitable for use in animations where the rock itself is moving.
Camera movement or animation of figures around the rocks should work fine though.
Quick Start
The base rock shader can be found in the content tab under Shader Presets - Age of Armour - Rock.
Additional presets, created by Dimension Theory, are located in the DT-Presets sub-folder.
To apply the rock shader, select an object and its material zones then double click !Rock Shader Base or one of the included rock presets.
Quick Tips
General
- A PDF version of this guide should be available in your DAZ Studio "ReadMes" folder. Additionally, you can download this guide for offline viewing
by right clicking any blank area of this page and selecting Save Page As...
- If using any of the AoA Advanced Lights, render times can be greatly improved by flagging rock surfaces then using Hitmode - Primitive
on the lights for these flagged surfaces. Because of the roughness of stone, feature variation and complex changes of color
you may often be able to use a very low shadow sample count on rock surfaces too, further improving the render speed.
- As mentioned above, DAZ Studio's instancing feature can be incredibly useful for creating a large number of boulders. Each instance can be
moved, rotated, scaled, flattened or elongated differently to create an even more random look.
- Reversing the displacement settings, such as using a negative number for Maximum and a positive number for Minimum,
can be used create rocks with sharper, fracture line features rather than more fissure-like recesses. In other words, the default settings
tend to create more bulbous rocks while reversing the displacement generates more jagged rocks.
Advanced Light Flags Group
The parameters of the Advanced Light Flags group contain settings for use with the AoA Advanced Lights.
The settings themselves do nothing to the appearance of the rock. They simply provide parameters
which can be used for flagging when used along with the Advanced Ambient, Distant and Spot lights.
See the AoA Advanced Lights user guides for more information on flagging.
- Accept Shadows - Determines whether or not a surface should receive shadows from itself and other items in the scene.
This setting works with most DAZ Studio lights, not just the AoA Advanced Lights.
- Ambient Strength Flag - Flags the surface for special light and shadow settings by matching this value
with the Diffuse, Ambient or IOR Value dial in the light's Lighting Control group then choosing Ambient Strength Value of...
from the Flag Surfaces With drop-down menu.
This parameter can also be used with the AoA Advanced Light's Set Light Strength with Surface Ambient Strength feature.
- Diffuse Strength Flag - Same as the Ambient Strength Flag but used with the lights Diffuse Strength Value of... setting.
- Index of Refraction Flag - Same as the Ambient and Diffuse Strength flags but used with the lights Index of Refraction Value of...
setting.
Keep in mind that the light's flag value uses a percentage and the rock shader's Index of Refraction Flag parameter is a number value.
So to match a light setting of 99%, the surface's Index of Refraction Flag would need to be 0.99 not 99.
This was done for consistency with other DAZ Studio shaders.
Bumps Group
The Bump settings of the rock shader create fine surface detail rather than the large, feature changing settings of the Shape Group settings.
Despite their names, the bump settings do, in fact, create displaced geometry. As such, they are affected by the Displacement settings and the size
of an object.
Adjustment of the Bump Strength setting is commonly required when using the shader on small objects or when using high Minimum Displacement
or Maximum displacement values.
- Bump Density - Controls how close together surface detail bumps will appear.
- Bump Strength - Adjusts the magnitude, or height, of surface bumps. Keep in mind that Bump Strength is multiplied by
displacement settings. If strong displacement values are used, this parameter may need to be lowered to compensate.
Diffuse Group
The parameters in the Diffuse group set the base colors of the stone. There are two main colors that are further mixed with speckles, spots and
the additional settings in the Veins Group. Together, all these settings can create quite a lot of color variation yielding extremely detailed
and believable rock surfaces.
- Diffuse Color - One of the two main colors of the rock. The two colors are strongly effected by the Dust setting so you may
wish to use darker than expected colors when a high Dust value is used.
- Diffuse Color 2 - The second of the two main rock colors.
This color and Diffuse Color are mixed and varied automatically based on rock feature detection.
When using the default displacement settings, Diffuse Color 2 will be favored on outward points while Diffuse Color will be more
common in cracks and crevices.
- Dust - This setting adds a soft velvety haze to the surface which causes it to appear more porous and dusty.
- Speckle Density - Adjusts the size of small spots which alternate between Diffuse Color and Diffuse Color 2.
If both diffuse colors are too similar the effect may be subtle.
- Speckle Sharpness - Controls the blending effect from one speckle to another. At low settings the speckles will appear as non-distinct,
soft variations in color. Higher sharpness and density settings give more of a granite appearance.
- Speckle Strength - An adjustment for the strength of the Speckle effect.
- Spot Color - Sets the color of Spots. This function is applied on top of the two diffuse colors
rather than mixing with them.
- Spot Density - The Spot effect's name may be a bit deceiving as it actually generates random patches of web-like patterns rather than
typical "spots". The Spot Density adjusts the frequency of both the patches and the cells of the web pattern. Higher values will create
many small patches with dense web patterns.
- Spot Strength - An adjustment to set the overall strength of the Spot effect.
Displacement Group
In the rendering process 3delight converts all 3d models of the scene into micro-polygons. These micro-polygons can then be moved, via
displacement, to change the shape of the 3d models.
The shape settings of the shader generate the math for changes to the rock shape but it is displacement which actually does the work of
moving the micro polygons into place.
The internal shape calculations result in thousands of number values between 0 and 1. When displacement receives a number between 0.5 and 1 it moves
the surface of the rock outward. In areas where displacement receives a shape value of 0 to 0.5 it pushes the micro-polygons inward.
The Minimum Displacement and Maximum Displacement settings are in centimeters. So if the Shape functions result in a value of 1 for a
spot on a model and Maximum Displacement is set to 10, then that point on the surface will move outward 10 centimeters.
You should choose Minimum and Maximum values which are appropriate to the object. If you have a giant, building sized boulder
then values of Min -100 and Max 100 might look good. But if you were to use that on a small rock the size of your fist then having cracks 100cm deep would
not look good.
When the Minimum and Maximum displacement settings are opposite each other (Such as 10 and -10) then the model should deform but still remain approximately
the same size overall. However, the Shape settings generate such highly randomized values, there is no real way to predict if a rock will be in an area where
displacement is receiving more low numbers than high numbers.
Because of this you may need to shift one of the values to compensate. If the overall size your rock is shrinking too much you can increase either, or both
of the Min and Max displacement values. So instead of Max 10, Min -10, you might try Max 15, Min -5 to increase the overall size of the object.
- Displacement Strength - The information coming from the Shape and Bump settings is multiplied by this value before displacement takes place.
So this setting controls the base strength of the rock shape. That result is then moved by the Minimum Displacement and Maximum Displacement values.
- Maximum Displacement - Sets the overall distance of the outward shaping of the surface. This value is (approximately) in centimeters when
Displacement Strength is set to 100%.
- Minimum Displacement - Adjusts how far rock features will move inward. This value is (approximately) in centimeters when
Displacement Strength is set to 100%.
Moss Group
This feature generates moss in shadowed areas of the rock. Though its placement is not exactly how moss grows in real life, it can be a nice addition
to help give some extra, subtle believability to a forest scene.
The Moss uses a ray tracing function to detect what areas of the rock are shadowed, being close to the ground or near other objects. This requires
a Max Ray Trace Depth of at least 1 (In the DS render settings) to function. Although the Moss feature uses ray-tracing, it actually renders
quite quickly.
- Moss Bias - Like shadow bias, this setting controls how close to a surface the Moss function will look for bumps, fissures or other objects.
Lower settings will generally cause more moss in small crevices of the rock
- Moss Color 1 - One of two base, diffuse colors for the moss. This color and Moss Color 2 are alternated randomly throughout mossy areas.
- Moss Color 2 - The second diffuse color used for moss.
- Moss Distance - The maximum distance (centimeters) the Moss rays will travel, searching for other surfaces which might be causing a shadow.
- Moss Samples - How many times, per surface point, the Moss function will test for objects around it. This is done in a slightly random
direction based on theMoss Spread Angle. Higher samples generally produce a less speckled, smoother covering of moss.
- Moss Spread Angle - This sets the radius of angle randomization in which the moss rays are cast out to look for occluding geometry.
At 0, the rays will look only directly outward, perpendicular to the surface point. At 90 the rays will look in a random direction somewhere between
-90 and +90 degrees for other objects. If Moss Samples is set to more than 1, the result from the random samples for that point will be averaged.
What this all boils down to is that a higher Moss Spread Angle will result in more of the rock covered in moss. Higher Moss Samples
Will result in a smoother, less speckled, transition from mossy areas to bare rock when a large Moss Spread Angle is used.
- Moss Strength - Sets the overall strength of the Moss effect. A setting of 0 disables all Moss calculation.
- Moss Velvet Color - Allows for a softer, velvety sheen to the moss. Because of the amount of fine surface detail in the rock it is a bit
difficult to see the "edginess" of the velvet effect unless using an extreme closeup but it can still provide a little extra believablity even in
more distant shots.
- Moss Velvet Strength - Adjusts the overall strength of the Velvet effect in mossy areas.
Shape Group
While there are only 3 settings in the Feature group, they are very powerful to create complex, stone-like randomizations to an object's shape.
These functions calculate surface changes which are then multiplied by the Displacement settings. If your rock features are too strong or not
strong enough, try adjusting the values in the Displacement group.
- Feature Complexity - Think of this like layers of randomization. At the first level there are large, but fairly smooth changes to the rock's shape.
At a value of 2 the first layer is randomized again with smaller details. Each level becomes exponentially more complex.
It is important to note that this takes place in steps of whole numbers. Decimal values are rounded up. So changing the setting from 3 to 4 will
create a noticeable difference but going from 3.5 to 3.9 will not.
- Feature Density - This setting controls the frequency at which randomization in the first layer of Feature Complexity takes place and,
by it's nature, all subsequent levels of Complexity.
A good way of thinking about this is that a low Feature Density will tend to create larger (in terms of area) base shape changes.
At higher values, this parameter will cause more frequent changes to the overall shape.
This should not be confused with a fine detail adjustment but rather how frequently the main shape of an object should be distorted
to create a random rock profile. High Density settings can make objects look unnaturally lumpy.
Also keep in mind that this settings does not take into account an object's size so a low Feature Density value may look good on
large boulders but smaller rocks may look better with a higher, more dense value.
- Feature Roughness - This parameter adjusts the contrast of the main feature complexity. High values create features which are
more defined and sharp. Lower values make the rock look more smooth and rounded.
Smoothing Group
The two settings of the Smoothing group determine if edges between polygons are to be creased or rounded based on angle.
At this time neither of these settings have any effect on subdivided geometry.
- Angle - Determines at what angle a geometry edge will be treated as a sharp crease. Any geometry with angles below this setting will
be shaded as if they are smooth rather than the polygons looking faceted.
- Smooth - Objects will be rendered as smooth surfaces according to the above Angle setting when Smoothing is On. When set to Off,
all polygons and edges of the object will appear sharp and faceted.
Specular Group
As with other DAZ Studio shaders, specular highlights can help give surfaces a glossy look by simulating the reflections of bright light sources.
- Glossiness - Adjusts the apparent shininess of the stone by increasing or decreasing the size of specular highlights.
- Specular Color - Sets the hue of specular highlights.
- Specular Speckle Strength - A funny parameter name but a useful feature. This setting adds noise to specular highlights based
on the Speckle Density and Speckle Sharpness settings in the Diffuse group. This can be used to help break up highlights,
making the rock appear more rough.
- Specular Strength - Controls the overall strength of highlights.
UV Maps Group
Because the Rock shader does not require UV coordinates, this setting has no practical use unless a different shader, which makes use of UVs,
is applied to a geometry shell of the object.
- UV Set - Allows alternate UV mapping to be loaded on any DAZ content which contains additional UV coordinate sets.
Veins Group
Veins give the ability to create the look of marble or granite with rippled streaks of a different color material going through the rock.
Many of the vein parameters are reliant on other vein values. For instance, the Vein Perturbation function will have no effect, even at 100% strength,
unless the Vein Undulation setting is greater than 0 and vise versa.
Admittedly, some of the Vein parameters are a bit confusing and unintuitive. Please accept my apologies for not thinking of more meaningful labels and
more logical methods for these functions.
- Vein Color - Sets the color of veins in the rock.
- Vein Count - This is not a literal count but more of a density feature. The higher the count, the more veins will be visible.
This does not take into account the scale of an object so a large rock and a small rock will not have the same number of veins. Instead they
will have approximately the same density of veins given their size in the world.
- Vein Perturbation - This function creates distortion in the veins and is linked to Vein Undulation. Neither
parameter will have any effect unless the other has also a value above zero.
For convenience sake you may wish to set Vein Undulation to
its max value of 1.0 and use only Vein Perturbation to adjust the randomness of the veins.
- Vein Scale - This sets the width of both the bands of veins and the spacing between them, working similarly to an inverse density function.
Higher values create larger bands, which yields a lower density of veins.
- Vein Strength - Unlike other Strength settings of the shader which adjust the overall visibility of a particular effect, the
Vein Strength setting controls the thickness of the bands of Veins. The effect can be thought of like the boldness of a font, where
very thin fonts are less visible than bold fonts.
- Vein Undulation - An additional vein line randomization. This setting is linked to Vein Perturbation; Neither function produces
an effect without the other.
Known Issues
Only when very soft shadows are used - A strange issue was recently reported by Dimension Theory who noticed that shadows cast by heavily displaced
geometry could suddenly become inaccurate at some high shadow softness settings. The cause and how long the bug has been there is unknown but was discovered
in DAZ Studio 4.6.0.18.
The bug happens when using any directional light along with any surface shader with displacement, including the DS Default lights and shaders. As such, it does not
appear to be a bug in this particular shader but I thought it worth mentioning since the AoA Rock Shader does use quite high displacement, increasing the
likelihood the issue will be noticed.
Top
Introduction
Important Concepts
Quick Start
Parameter Settings