2
$\begingroup$

As i read in the blender-wiki, there are several render-passes which are added/multiplied later on in order to give the final image.

My question is, How does colored light influences the values of the diffuse direct pass for example? Is there an extra pass for every color channel?

Im confused because all the non-color passes are just giving values between 0 and 1, but a color is made up of 3 values, one for each channel. And in the blender-wiki, it just says (DiffuseDirect + DiffuseIndirect) * DiffuseColor. enter image description here

$\endgroup$
  • 1
    $\begingroup$ I think that Direct and Indirect passes are able to store three cannel data (and even beyond the 0-1 range if needed...). Did you tried to set up a test scene? Where the colored light not caputured in the direct pass? $\endgroup$ – Carlo Nov 27 '16 at 16:10
3
$\begingroup$

Direct and indirect passes are lighting passes. You literally add them to add light to your pixels. That light can be either white or colored light and it may hold intensity values well above 1, as they are scene values.

These passes contain the information of light coming from the light sources of your scene and interacting with surfaces (glossy, diffuse, etc.) both directly and indirectly (via bounces).

In real life, the colour of materials is actually a factor of absorption of wavelenghts, creating the ilusion of colour when those materials interact with light. In a CG scene, when you light a red surface, it absorbs blue and green components (a part of the spectrum) from your light source and bounce back red.

This absorption can be expressed mathematically with a multiplication, hence why you multiply the lighting passes by the shader base colour to retrieve the appearance of the lit surface.

The multiplication of an RGB image by colour sort of mimics the behavior of a colored glass: It lets a part of the spectrum pass (the colour of the glass) and blocks the other parts.

As Carlo mentioned, producing your own test scene will clear up your doubts. Go try yourself and inspect the passes with a viewer node, it will show what information each pass has and it will make sense.

$\endgroup$
  • $\begingroup$ For example colored light with an intensity of 100 "units" * (rL,gL,bL) hitting an material-surface with the color (rM,gM,zbM) means: intensity * rgbL * rgbM (multiplied by any other factor like the angle between surface normal and incoming vector of light, etc.)? $\endgroup$ – Xernist Nov 28 '16 at 21:01
  • $\begingroup$ It's not as simple as that because there are several factors involved (a single pixel may get light contribution from both direct and indirect sources coming from complex interactions with other materials) but yes, the intensity of light bouncing from that surface to the viewer multiplied by the base shader coulour is basically what you get from each pixel. Anyway, keep in mind that materials can be more complex than just diffuse and glossy mixed with a fresnel and there are light/material interactions happening in the renderer to produce the pixel you get in your passes. $\endgroup$ – Gez Nov 28 '16 at 21:12
  • $\begingroup$ Also keep in mind rendering is like "baking" your scene to pixels with different light intensities. It's the result of light interacting with materials. You may produce passes to tweak your image in compositing, but you won't be recreating lights and shadows, only putting together what the rendered baked as pixels. So it's not that you can re-create the scene from the passes. You can re-create the rendering with passes, and having them separated gives you the chance to tweak the result, but always bound to what is already rendered. $\endgroup$ – Gez Nov 28 '16 at 21:16
  • $\begingroup$ In case I wasn't clear, an example: You can make a fresnel material less glossy controling the mix of diffuse and glossy passes, but you can't turn a diffuse material into glass. You only control what the renderer gave you to work with. $\endgroup$ – Gez Nov 28 '16 at 21:22
  • 1
    $\begingroup$ Thanks, theres one more thing thats strange to me: When comparing the shadings of a diffuse material, in the darker areas the saturation is higher than in the areas with more light. (Tested with a diffuse material cube and a single white light source in a black scene to avoid any sort of global illumination,etc. ) But shouldn't the saturation stay the same because the color/ratio between r,g,b doesn't change? $\endgroup$ – Xernist Nov 30 '16 at 14:31
0
$\begingroup$

Most passes have color information, the + and * are not literal math functions, but rather blending modes.

$\endgroup$
  • 2
    $\begingroup$ Those are literal math functions. And those "blending modes" you mention are also literal math functions in the case of addition and multiplication. When you choose the add and multiply blending modes in the mixRGB node you're actually adding and multiplying the RGB values of the pixels of the two inputs. $\endgroup$ – Gez Nov 27 '16 at 22:55
  • $\begingroup$ I know, but they are not literal in the sense that when you composite the passes, you don't use a (literal) Math node (meant for single values), but a Color mix node. $\endgroup$ – Matt Ferndz Nov 27 '16 at 23:10
  • 1
    $\begingroup$ You can produce the same with math nodes on decomposed RGB channels, that's what the mixRGB node does internally: adding and multiplying each channel. $\endgroup$ – Gez Nov 27 '16 at 23:22
  • $\begingroup$ I'm not saying that it has to be done that way, it is of course more tedious and unnecessarily complicated, but the result is exactly the same because those operations are literal math ops as I said above. $\endgroup$ – Gez Nov 27 '16 at 23:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.