| TG MultiPass |
| PARAMETERS |
| Force Channel Range : 0 (material channel rendered by frame number) 1 (Diffuse only) 2 (Specular only) 3 (Reflection only) 4 (Transmission only) 5 (use “Channel Control Image” colour to control which material channel is rendered) The key to the workings of TG MultiPass, this paramter controls which material channels it renders. Force Channel = 0 With a setting of 0, the shader will render based on the frame number, ideal for quickly producing the renders of a scene for a still image. The frame numbers divide up as follows : Frame 0 : Diffuse only Frame 1 : Specular only Frame 2 : Reflection only Frame 3 : Transmission only So for a still scene, simply ask trueSpace to render whichever frames you require, resulting in a set of numbered images which you can combine in post-process later. Force Channel = 1, 2, 3, or 4 These settings lock the shader to produce only one channel. This would mean repainting every instance of TG MultiPass that has different settings for each re-render, but you never know, you might want to do it that way :) Force Channel = 5 This setting makes the shader look at an input image, the colour of which controls which material channel is rendered. Now you can paint objects with different settings, but with each using Force Channel set to 5 and referencing the same control image; then, simply by altering the control image, you change all versions of the shader in the scene simultaneously. Primary use is for when producing an animation, since then the “by frame number” route becomes invalid. With this setting, for example, you can render the animation with only diffuse, then re-render the entire animation after recolouring the control image, to render with only specular highlights, with no need to change anything in the scene at all. The colours of the control image are : Black : Diffuse only Red : Specular only Green : Reflection only Blue : Transmission only Note that it’s best to stick to pure versions of the colour in the control image, to avoid confusion! However, for interest’s sake, here is the priority given by the shader : If there is ANY red in the image, the specular is rendered; if there is no red, and ANY green, then reflection is rendered; if there is no red and no green, and ANY blue, then transmission is rendered; if there is no red, green or blue, then diffuse is rendered. These priorities are controlled by the logic of the shader being optimised for efficiency, not for any other particular reason! |
| Standard Surface Settings Ambient, Diffuse, Shininess, Roughness, Specular Tint All these work in the conventional way, just as in other shaders. Bear in mind that only one out of the Diffuse (which is combined with Ambient values) or the Specular is ever rendered at one time - the shader never combines these. |
| Reflection Settings Reflection Strength, Reflection Contribution, Reflection Fresnel Values All these work in the conventional way, just as in other shaders. Strength and Fresnel settings are provided, although these could be controlled in the post-process combination of channels too. |
| Transmission Settings Transmission Strength, Refractive Index, Transmission Contribution, (further down) Transmission Fresnel Values All these work in the conventional way, just as in other shaders. Strength and Fresnel settings are provided, although these could be controlled in the post-process combination of channels too. |
| Total Internal Reflection Processing Range : 0, 1, 2 or 3 This shader borrows its transmission code from the TG Glass shader, so offers control over how the shader responds when Total Internal Reflection occurs. The values and their results are as follows : TIR Processing = 0 In this instance, the shader will reflect the ray. This is technically the most accurate behaviour, but is also the most time consuming to render, as it can result in a great deal of processing being done to reflect the rays (since these will most likely impact the same material, and look to do more transmission, which may lead to more reflection, etc etc!). TIR Processing = 1 With this setting, when Total Internal Reflection occurs, a short cut is taken, and the ray is just passed through the surface, with no refraction or reflection. Technically inaccurate, it still allows the ray to continue through the scene and pick up something of the surroundings or background, and can reduce render times. TIR Processing = 2 An even more dramatic short-cut in the processing is used here, and no further raytracing is done at all. Instead, the “Total Internal Reflection Colour” is used, giving a solid colour. This can improve render times, since it cuts down on the raytracing required, and can still give good results (in the real world, where this occurs, sometimes the transmissive surface does indeed take on a solid colour). Can also be used as a means to investigate just where total internal reflection occurs in your render, eg by setting the “Total Internal Reflection Colour” to bright purple. You can then see just how it affects your object(s), and how it varies depending on the “Refractive Index”. TIR Processing = 3 The same dramatic short-cut as with option 2, in that no further raytracing is done and a solid colour is used instead. The difference is that the colour used is taken from the Colour channel of the shader, which can both allow for an automatic good match, and also let you add noise or variation into the result shown from the transmission (or you could use something like TG Glow Colour Ramp, to add colour that varies with angle of view). |
| Total Internal Reflection Colour Range : Colour values The colour to be used in the event of total internal reflection occuring, if the “Total Internal Reflection Processing” is set to 2 (this colour is ignored otherwise). |
| Channel Control Image Range : Image The image that defines which material channel to render, depending on which colour it contains. Note that the shader only reads from the top left pixel, and that image dimensions are irrelevant. It’s suggested that you create a separate control image for each scene you use the shader in, although you could always use the default image that the shader points to - there is a folder created to store these images, if you wish to use that as a consistent location, in the root tS directory, at : \ShaderLab2\Shaders\TG Pack 3 SL2\TG MultiPass Control Images\ Although the idea is that you can control all versions of the shader across the entire scene, you can of course divide the scene up, so different “groups” of materials each use their own control image, allowing you to render a variety of combinations from the same scene. The following information is repeated under the “Force Channel” parameter, but is included here for ease of reference (click here to jump to the “Force Channel” parameter): The colours of the control image are : Black : Diffuse only Red : Specular only Green : Reflection only Blue : Transmission only Note that it’s best to stick to pure versions of the colour in the control image, to avoid confusion! However, for interest’s sake, here is the priority given by the shader : If there is ANY red in the image, the specular is rendered; if there is no red, and ANY green, then reflection is rendered; if there is no red and no green, and ANY blue, then transmission is rendered; if there is no red, green or blue, then diffuse is rendered. These priorities are controlled by the logic of the shader being optimised for efficiency, not for any other particular reason! |
| TG MultiPass Intro |
| TG MultiPass Parameters |
| TG MultiPass Tips |
| Introduction To Post-Process Compositing |
| Some Post-Process Compositing Ideas |
| TG Pack 3 Index |