Friday, December 28, 2012

Alpha Over Node

This quick entry covers the compositor node setup for adding a background image to a scene using the compositor.  The node setup is seen below.  It uses the AlphaOver node.  The only caveat i noticed is that the overlaid object (my cube) must be on the lower image input, and the Premul value set to 1.0.

The final render shows the standard cube in front of the image i imported (chairs).

Render Layers

This entry covers the use of Render Layers.  Although there are probably many uses for Render Layers, the main focus I'll cover is using them to isolate post processing control to individual objects of the scene using the compositor.

So in my initial scene, I have Suzanne and a light blue backdrop.  In an effort to use Render Layers, I have Suzanne on layer 1, the backdrop on layer 2 and the light on layer 3.

Compositor Intro

This entry is an introduction to the Compositor.  I'll go over the Compositing View as well as the standard output nodes that are used.

To start off, using [Ctrl + Left Arrow], you can change to the compositing view which should look like the image below.  My example scene is suzanne within a light blue box.

Friday, December 7, 2012

No Shadow Object

This quick tutorial just shows how to render your material without casting a shadow.  This only applies to the Blender internal renderer materials.

Simply uncheck the Traceable checkbox.  Now, the mesh should not cast a shadow on other objects.

Python Smoothing

This tutorial entry will show how to script in the sub-surface modifier and the smooth_shader operator.  Note that the following code would be used within an Operator.  For simply performing these operations on an already selected object, see the Python Macros entry.

# add a subsurf modifier, setting level to 2
ssMod ="MyName", type='SUBSURF')
ssMod.levels = 2

# set a selected active object (operations must be in this order) = True = obj

# add smooth shading

Scripting Externally

There are a handful of reasons not to script using the internal script editor built into Blender.  One of the main reasons is undo-ing.  If you undo, something in your scene while testing, it will also undo the last set of edits you made to your script.  This may not be obvious and you'll find yourself re-typing scripts sections over and over again.

Helper Script
The suggested method is to edit your scripts externally, and use the following script to run it in your Blender scene.

import bpy
import os

filename = os.path.join(os.path.dirname(, "")

exec(compile(open(filename).read(), filename, 'exec'))