2
$\begingroup$

Is it possible to control the shading via a node in the compositor? I would like to generate two output images, one which has material shading and one without any shading - just the colors from the texture.

So far I only found how to control this option with the UI (of course) and with Python, but with these methods I have to render the image twice, which is somehow an overhead.

$\endgroup$
3
$\begingroup$

Cycles:

Shadeless image:

You can do this in cycles by enabling the Color passes in Renderlayers > Passes:

enter image description here

Then add them together in the compositor with Mix nodes:

enter image description here

Original image:

enter image description here

Post composite:

enter image description here

Shading only:

You can get only the shading of the render by dividing the full render and the color pass:

enter image description here

The reason the large cube appears as if it is still textured is that it has a Glass material, so that is the shading result. To prove this we can multiply it back with the color pass and we will get the full render again:

enter image description here

Blender internal:

You could get a "shadeless" pass in BI with the Color pass in Renderlayers > Passes:

enter image description here

Result:

enter image description here

Saving multiple images from the compositor:

You could then save the shadeless images in a separate directory with the File output node:

enter image description here

Note that the output connected to the composite output node will be saved to the path specified Render settings > Output. In the absence of a Composite node, the raw render will be saved.

The above node setup the raw render is saved to the path in Render settings > Output (in this case /tmp/) and the shadeless image is saved to /tmp/shadeless/.

| improve this answer | |
$\endgroup$
  • $\begingroup$ But how do I get a "noiseless" rendered image? $\endgroup$ – Masala Oct 31 '13 at 15:03
  • $\begingroup$ or is it even possible in Blender Render? $\endgroup$ – Masala Oct 31 '13 at 15:16
  • $\begingroup$ @Masala What do you mean by a "noisless" image? $\endgroup$ – gandalf3 Oct 31 '13 at 20:45
  • $\begingroup$ For example your original image. I have the same problem with my model. If I use Blender Render, the result looks much cleaner. $\endgroup$ – Masala Nov 1 '13 at 8:44
  • $\begingroup$ @Masala I added a way to do this with BI. To reduce noise in cycles you have to increase the number of samples in Render settings > Sampling. Note that this will increase the rendertime. $\endgroup$ – gandalf3 Nov 1 '13 at 18:07

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.