TG Toon Sketch Parameters

TG TOON REFLECTANCE

Ambient : Sketch, Surface Colour
Diffuse : Sketch, Surface Colour
Brightness Steps
Base Frequency
Freq Multiplier per Step
Black Threshold
Shade Lighting Only
Output Colour Type
Output Colour Steps
Pre-Quantise Saturation
Post-Quantise Saturation
Noise Type
Noise Octaves
Noise Strength - Brightness
Noise Strength - Colour
Noise Overall Scale
Noise x, y, z Scale
Include Rotated Copy
Texture Map
 

TG TOON SKETCH PROJECTED

Project Noise
Accurate Projection

TG TOON SKETCH

Ambient : Sketch, Surface Colour

Range : 0 to 10

Controls the ambient (or luminosity) value. The first part of this parameter affects the sketching calculations, but does not affect the underlying colour shown on the surface, while the second part of this parameter affects the underlying colour, but not the sketching calculations - this allows you to more precisely control the results.

Diffuse : Sketch, Surface Colour

Range : 0 to 10

Controls the way the shader responds to diffuse lighting, once more broken down into the sketching effect, and the underlying surface colour.

Brightness Steps

Range : 0 to 50

Similar to the TG Toon Reflectance shaders, this divides the brightness (or intensity) into a number of steps. Unlike the other shaders, though, the end result of this is reflected in the sketching effect, rather than as bands of brightness in the underlying surface colour.

Note that a higher value in this shader will result in more steps, which will mean that darker areas will take longer to render, as they will have more processing to do - for example, with 2 brightness steps, the darkest parts of the result will have 2 layers of the image used; with 4 brightness steps, however, the image will be layered 4 times, resulting in more processing being required.

Base Frequency

Range : 0 to 50

The sketching effect takes the image used as a texture map, and layers it on top of itself, adding an extra layer for each Brightness Step. Each layer reads from the texture map using a different frequency (the frequency is just like UV repeats in ordinary texture mapping), and this parameter sets the initial frequency used for the first brightness step.

A higher number will mean the texture map is repeated more often, giving a denser result.

Freq Multiplier per Step

Range : 0 to 20

Each brightness step adds an extra layer, where the image used as a texture map is read and added to the earlier read from the texture map. This parameter controls how the repeats of the texture map are handled with each step - for example, with a base frequency of 1, and frequency multiplier step of 2, the first step will read from the texture map with a frequency of 1, a second step would layer on top of that, reading from the texture map with a frequency of 2, a third step will layer on top of both those, with a frequency of 4.

The result of this is that more, and finer, more dense, details are added as the brightness gets less. Taking the previous example, if an image with horizontal lines was used, then the second step (getting darker) would add new lines, halfway in between the lines from the first step.

It’s worth noting that with doubling the frequency, details will almost inevitably overlap perfectly, so it can sometimes be more interesting to use values such as 1.5, or 2.2, for the Freq Multiplier per Step. Of course, where the image used doesn’t have a red value of 0, such matching up is no bad thing, necessarily, as the effect is cumulative (just as going over the same area twice with a pencil leads to a darker line).

Black Threshold

Range : 0 to 2

In order to allow for guaranteed solid black, to represent solid inking (rather like in the TG Toon 3Tone shaders), this parameter lets you set a brightness value below which the result is black, rather than read from the texture map. Higher values will result in more solid black being present in the effect.

Raising the Black Threshold can speed up the shader sometimes, as it removes the need for the shader to layer the texture map repeatedly, and it can simply jump to setting the colour to solid black.

Shade Lighting Only

Range : Checked, Unchecked

When checked, the sketching effect is dependent on the brightness of the light at the particular point being shaded, irrespective of the underlying surface colour. This means that the colours and results of the colour shader are ignored in working out the skecthing effect.

When unchecked, the surface colour is lit by the lighting, and the final intensity of that calculation is used to determine the sketching effect. This means that the colours and results of the colour shader are included in working out the sketching effect.

Output Colour Type

Range : 1, 2, 3 or 4

Controls the colour shown on the object, “underneath” the sketching effect.

A value of 1 uses the colour of the lit surface - the results of the colour shader are taken, lit as usual, and this value passed on to the colour quantisation functions. Note that the end result here still contains the brightness information from the lighting and the surface (the same brightness information will also have been used to work out the sketching effect).

A value of 2 takes the output from the colour shader, and works out the lighting, but this time REMOVES the intensity information from the lighting, leaving only the colour information from the lights. The surface colour is then lit using this normalised version of the incoming lighting, and this result passed on to the colour quantisation functions. Note that the brightness information from the lighting will already be represented in the sketching results.

A value of 3 takes the output from the colour shader, and lights it as usual, and then removes the intensity information from that, and passes on that result to the colour quantisation functions. This may be useful when you uncheck the Shade Lighting Only parameter, as then the brightness (intensity) information from both the surface colour and the lighting will already be represented in the sketching results.

A value of 4 simply uses the output from the colour shader, with no effect included from the lights. Can be useful for a very solid, simple, unshaded underlying colour, leaving the sketching calculations to add in the changes in lighting and reveal the shape of the object.

Output Colour Steps

Range : 0 to 40

Controls the colour quantisation, that is, breaking up the colours from smoothly varying into a series of bands. This parameter controls how many bands to split the colours into, a lower number resulting in harsher colour changes, and a higher value giving a result almost indistinguishable from no quantisation.

A higher value in the Pre-Quantise Saturation parameter can give improved results, or allow / require lower values in this parameter.

Note that setting this value to zero will turn off the colour quantisation, giving faster processing. Also note that the value set here has no effect on the sketching calculations.

the following 2 parameters are represented as the two parts of one parameter :

Pre-Quantise Saturation

Range : 0 to 10

Modifies the colour saturation prior to carrying out the colour quantisation.

Values of less than 1 will reduce the colour saturation (a value of zero giving a greyscale image), and values of greater than 1 will increase the colour saturation.

Increasing the colour saturation prior to quantising can give improved results from the colour quantisation calculations (and can also allow or require a lower setting in the Colour Steps parameter) - quite often, the quantistion will generate “new” colours not in the original colour shader, since the colours get shifted toward a nearest step (so a pink or purple might appear where only orange was visible previously); raising this value above 1 can offset that, and give more of the “expected” colours.

However, also bear in mind that quite often, a value above 1 in this parameter will be creating a colour that is “impossible” to render (eg red = 1025, where red can only vary from 0 to 255 on the display). The interpretation of these values in the final render may be somewhat unusual! In particular, high values here with a Post-Quantise Saturation of still around 1 (that is, the saturation is not reduced after the quantisation) may result in a darkening of the final rendered colour.

Post-Quantise Saturation

Range : 0 to 10

Modifies the colour saturation after the quantisation has been done. Again, values of less than 1 reduce the colour saturation (0 giving a greyscale result), and values of greater than 1 increase the colour saturation. This parameter can be used to compensate for the changes made by the Pre-Quantise Saturation, by reducing the final colour saturation displayed, but allowing the saturation to be increased prior to the colour quantise calculations.

the following 2 parameters are represented as the two parts of one parameter :

Noise Type

Range : 1 to 3

1 is Perlin, 2 is Classic,and 3 is Sparse. Note that because this parameter is contained in a double part parameter, values outside of this range can be set - any value of greater than 3 is treated the same as being 3, however (that is, uses Sparse).

Noise Octaves

Range : 1 to 10

Higher values add more detail to the noise, but take longer to render. Note that values above 4 or 5 generally don’t show much of a visible increase in detail.

Noise Strength - Brightness

Range : 0 to 10

Higher values give more effect from the noise, disturbing the boundaries of the brightness quantisation. This will affect the result of the sketching calculations.

Noise Strength - Colour

Range : 0 to 10

Higher values give more effect from the noise, disturbing the boundaries of the colour quantisation.

Note that the noise actually adjusts the colour steps, both upward and downward - this means that the noise can result in areas with colour steps of zero or less, and can result in black areas appearing in the result (just as using a very low value in Colour Steps can). Raise the Colour Steps value, or lower the Noise Strength - Colour value if you want to remove those black areas from the result (occasionally, raising the Pre-Quantise Saturation can help too).

Also note that raising this value can sometimes slow the rendering.

Noise Overall Scale

Range : 0 to 1000

Higher values result in smaller, more dense pattern to the noise. Also note that higher values can result in slower rendering.

Noise x, y, z Scale

Range : 0 to 100, for each parameter

Control the scaling of the noise in the x, y and z directions independently, allowing the effect to be stretched and squashed.

Note that in order to allow the full range of values, due to the workings of ShaderLab 2.2, the parameter is displayed as a colour parameter, and has its initial values set to just above 1; also as a result, the parameter will allow negative values, which will scale the noise similarly but reverse the direction (negative values are not generally recommended though!).

Include Rotated Copy

Range : Checked, Unchecked

When checked, this reads from the texture map image twice, rotating by 90 degrees. This means, for example, that an image with just horizontal lines on it will give a cross-hatched grid when this is checked, giving vertical as well as horizontal lines. This allows a quick and easy way to add more detail or density to the sketching effect - note though, that it does slow the rendering slightly (so if you have the time to rotate and layer the actual image itself and store the new image, you can achieve the same effect, without the slight impact on performance).

Unchecked, the image is only read from once.

Texture Map

Range : image

This is the image that will be used to give the sketching effect - think of it as defining the kind of pencil lines, or other shading method, that is used to darken the areas of the render.

TG TOON SKETCH PROJECTED

previous parameters as TG Toon Sketch

This version works the same as TG Toon Sketch, only the texture map is now projected based on the screen / final image co-ordinates. This means that horizontal lines on the image used as a texture map will ALWAYS be aligned horizontally in the final render, no matter what angle you render from (whereas TG Toon Sketch wraps the image used as a texture map around the actual 3D object, using UV, Object or World space, as defined by the ShaderLab “Mapping Adjustment” parameters).

The parameters unique to this approach are mentioned below :

Project Noise

Range : Checked, Unchecked

When checked, the screen / final render co-ords are used to generate the noise. This means it will not vary with the angle the object is viewed from, etc.

When unchecked, the noise takes the UV, Object or World space as the co-ords to generate the noise from, as determined by the ShaderLab “Mapping Adjustment” parameter.

Accurate Projection

Range : Checked, Unchecked

When checked, the projection from the screen / final render is exact. Object geometry, location, viewing angle etc will not change the result.

When unchecked, “incorrect” calculations are used for the screen / final render image projection. This gives an effect which is dependent upon the screen / final rendered image co-ords, but is still modified by the geometry of the object, and the viewing angle, viewing distance, etc - this can add some unusual variation into the look, as objects (or the camera) move around a scene.

This applies to the projection of the sketching texture map, and also to the noise if “Project Noise” is checked.

TG TOON SKETCH HIGHLIGHTS

previous parameters as TG Toon Sketch

This version works the same as TG Toon Sketch, only it includes processing to calculate specular highlights, and so adds Shininess, Roughness and Specular Colour parameters.

TG TOON SKETCH HIGHLIGHTS PROJECTED

previous parameters as TG Toon Sketch Projected

This version works the same as TG Toon Sketch Projected, in that the sketching texture map is projected based on the screen / final rendered image co-ords (with the option to have the same projection for the noise calculations), only it includes processing to calculate specular highlights, and so adds Shininess, Roughness and Specular Colour parameters.

TG TOON SKETCH HARD HIGHLIGHTS

previous parameters as TG Toon Sketch Highlights

This version works the same as TG Toon Sketch Highlights, only the processing calculates “hard” specular highlights only (that is, a specular highlight is rendered as a solid colour, with no colour or brightness quantisation effects).

TG TOON SKETCH HARD HIGHLIGHTS PROJECTED

previous parameters as TG Toon Sketch Hard Highlights

As might be expected, this shader calculates “hard” specular highlights, but uses the projected method for the sketching texture map, and optionally also for the noise.

TG Toon Sketch Intro

TG Toon Sketch Parameters

TG Toon Pack Index