Scripted Compositing?

Is it possible to write script nodes for Blender Render’s Compositor? I mean for use on RenderLayers, not just materials. Am I just missing an add-on?

Or am I just going to have to use an external compositor that has scripting? If so, could someone recommend one?

To what effect? You know you can save a node group or even a node tree to reuse by appending in to your .blend.

The idea is that there are some things there just aren’t nodes for. At least that I can find. I could use python or something to code what I need instead. I mostly need the use of logical operators and if/then statements. For example, I wrote some code in Visual Basic that looks at the colors in one renderlayer (well, picture from a renderlayer anyway), the brightness of blue in another picture (from a renderlayer), and creates a third picture following some logic that acts based on the first two. The pictures are attached.


Picture A - The scene rendered as shadeless, thus each object is easy to identify


Picture B - The same scene rendered normally, except everything (lights included) has been tuned to be blue with no red or green at all. Textures and things are otherwise normal.


Picture C - The result of about 15 minutes of code writing time, 24 lines of Visual Basic, and 2 seconds of processing. The code does simple checks on the contents of Pictures A and B and acts with if/then decision making to decide how to create the third picture.

If the effect in Picture C looks like a simple effect, then you’re right because it is. At least, it is if you can use logical operators and if/then statements. But I can’t find any node based equivalent for them. Thus it would be really helpful to be able to have a script node of some kind in the Compositor. Is there one? Or should I look elsewhere, and if so, where?

I think that you can go a long way with the math functions already in nodes. You would create a mask result that is just colorless then apply that to the source image.

Also you can get a range of different passes from a render to source individual properties, like ‘Object Index’ for the first image.