| General Info, Hints and Tips, and FAQ |
| About “Projected” Textures And Noise : Some of these shaders give a “sketched” or “inked” look, as if the image has been coloured in by hand. Of course, if this was done, the lines of the sketching wouldn’t follow the underlying 3D geometry, but would sit flat on the page. Many of these shaders take advantage of new options in ShaderLab 2.2, in order to do that very thing - the texture maps used, and / or the noise used, are derived from the x, y co-ordinate of the pixel currently being rendered - that is, the noise and texture mapping doesn’t rely on U,V or World or Object space, but “final rendered image space”. This means that irrespective of camera position, a horizontal line in the texture map will always be a horizontal line in the final render, even in animation as the camera or object moves around. It also means that the noise value will be the same at the same point in the final image, which you might want to keep in mind, particularly for animations - if the effect is noticeable in your animation, you might want to animate the noise so that it varies from frame to frame, either using an animation parameter in the shader where available, or from some simple keyframing of noise parameters in those shaders that don’t support automatic animation. Also, bear in mind that the dimensions of the final image will affect the noise results too - rather than work on a “per pixel” basis, the noise works on a scale of 0 to 1, where 0 is the far left of the image, and 1 the far right, and similarly, 0 the top of the image, and 1 the bottom of the image, irrespective of image size. This means if you stretch the image in one direction, you will stretch the noise or texture mapping in that direction too. Just think of it the same way as you would with a background image, and you’ll have the right idea as to how it works! Another important point is that the screen projection effect only works from a camera or perspective view, and gives incorrect results from an orthagonal view (that is, the Front, Top, Left, etc views). The results from those views may remain interesting and so useable, but they will not be what is expected! Of course, having your sketching effects follow the 3D geometry can also be interesting, as if the artist had coloured in the actual 3D object itself rather than shaded it on a flat piece of paper, which is why the shaders make all this optional, so you have an infinite range of effects at your disposal! The “Projected” Texture Map Shader : There’s a simple shader that does nothing but map a texture on the object using the projected texture approach. You could, for example, build simple geometry to reflect the objects in a scene, and paint them all with the projected texture, giving an unusual 3D rendering of a 2D scene. A Reminder About ShaderLab’s “Mapping Adjustment” : Don’t forget, that except for those shaders which take the “projected” approach to noise and textures, the mapping of noise and textures is controlled by the Mapping Adjustment in ShaderLab 2 itself. This can be set so that the noise (or texture) follows World, Object or UV space, and includes other mappings unique to ShaderLab. Using this setting can provide even more effects from the shaders that are altered by it! Note that ShaderLab 2.2 doesn’t allow the storing of the Mapping Adjustment inside a preset - many of the presets provided work best with UV mapping (making the sketching effects follow the geometry in the same way as any other piece of texture mapping, for example), but by default Object Space is used, so you will have to remember to activate forced UV mapping in the Mapping Adjustment yourself. Creating A Good Toon Look Often, this takes more than just applying a toon style shader - bear in mind that things like lighting etc will be important too. It’s easy to quantise (break up into discrete steps) the brightness from the illumination in a scene, and pretty easy to quantise the colour values from an underlying colour shader (procedural, or texture map) - but it’s not so easy to quantise the colour values from the lighting. Quite often, especially where coloured lights overlap, this will produce some unexpected effects, such as new colours, which can give quite a complex or “messy” look. The shaders offer a range of ways of processing the colour shader information / lighthing, but in the end it’s also useful to light your scene sympathetically toward the desired result (which, for a toon or cel look, is generally bold and simple, without all the subtle variation of lighting, intensity, colour etc seen in a photorealistic render). In general, I would suggest only one or two well placed lights, and would avoid the use of colour or strong colour at least, in the lightsources. Of course, experimentation is always the order of the day, and many good results can be found using more light sources, and using colour! Simpler lighting and colours in the lights may be easier and more controllable to start with, though. Note that if you are not after a tradition cel or cartoon look, then there is certainly a wide range of interesting and unusual results available from taking exactly the opposite advice from that given here! Why Are The Sketching Effects Created Using Textures? To generate an interesting sketching, inking or shading noise would be computationally intensive, in shaders which are already quite computationally intensive. Not only that, but for anything like a range of effects to be possible, more parameters would be required, and again, many of these shaders are already filled with parameters to allow for flexible effects. For that reason, textures are used to achieve the sketching style effects in the shaders. This allows for a very open, infinite range of results, generally much more effective than any procedural pattern would be. With a wide range of controls, and a novel way of handling the textures, even simple texture maps can produce interesting and visually appealing shading results. Of course, there is more to these shaders than simply applying those texture maps, as they offer the following : 1) The texture maps are applied based on the lighting, which is not possible outside of these shaders. 2) The texture maps aren’t applied directly as textures, but are used to modify the lighting calculations on a given point. 3) The texture map is “layered” on top of itself, based on the lighting, giving a sense of greater detail, and of increasing shading strokes, and this is done in such a way that the end result is built up with each layer. 4) The shaders offer the ability to project the texture maps from the camera / final rendered image, applying the sketching or shading effects onto the “flat canvas” of the final image, rather than onto the geometry. 5) The shaders contain a range of other related processing, including the colour and brightness quantisations, and noise, which adds further interest and detail to the way the texture maps are applied. |
| TG Toon Pack Index |