BlenderのNodeとNodeTreeについて

目標

Blenderにおけるノード(Node)とノードツリー(NodeTree)という単語を説明する。※この記事は、各ノードの役割や使い方に関する解説は含みません。

ノードとは

ノードは、0個以上の入力ソケットと出力ソケット、および内部処理を持つ図のようなデータ処理メカニズムです。

ノードは相互に接続することでデータの受け渡しを行うことができます。

Blenderのノードは、タイトル(Title)、ソケット(Socket)、プロパティ(Properties)を持っています。詳しくは Blender document を参照して下さい。

ノードツリーとは

ノードツリーは、接続されたノードで構成される構造全体です。

Blenderのノードタイプ

BleBlenderには、Shader Nodes(Shader Editor)、Composite Nodes(Compositor)、Texture Nodes(Texture Node Editor)という3種類のノードツリー(及びノードエディター)のタイプがあります。(詳しくは、Blender 2.80 Manual “Introduction”をご覧ください)。

Shader Nodes

Materials, lights and backgrounds are all defined using a network of shading nodes. These nodes output values, vectors, colors and shaders.

Blender Document: Shader Nodes (https://docs.blender.org/manual/en/dev/render/shader_nodes/introduction.html )

マテリアル、ライト、背景は全てShading Nodeのネットワークを使って定義されます。これらのノードは、値、ベクトル、色、シェーダーを出力します。

Compositing Nodes

Compositing Nodes allow you to assemble and enhance an image (or movie). Using composition nodes, you can glue two pieces of footage together and colorize the whole sequence all at once.You can enhance the colors of a single image or an entire movie clip in a static manner or in a dynamic way that changes over time (as the clip progresses).

Blender Document: Compositing Nodes
( https://docs.blender.org/manual/en/dev/compositing/introduction.html )

Compositing Nodeを使用すると、静止画(または動画)を合成、拡張できます。Compositing Nodeを使って、シーケンスの色付けや色の強調などを行うことができます。

Texture Nodes

Blender includes a node-based texture generation system, which enables textures creation by combining colors, patterns and other textures in the same way as shader writing with material nodes.

Blender Document: Texture Nodes
( https://docs.blender.org/manual/en/dev/editors/texture_node/introduction.html )

Blenderには、マテリアルノードと同様に色やパターンやテクスチャを組み合わせて新しいテクスチャを作成するノードベースのテクスチャ生成システムが含まれています。

ノードの操作方法

ノードを操作し、異なるタイプのノードエディタでノードネットワークを作成できます。 ノードエディタの基本的な操作方法はこちらです。

PythonAPIにおけるノードツリー

ノードツリー(NodeTree)という単語はBlender PythonAPI(https://docs.blender.org/api/current/bpy.types.NodeTree.html)でも使用されています。nodes属性とlinkes属性を持つbpy.types.NodeTree(ID)クラスはIDで指定されたノードツリーを取得できます。nodesは、ノードツリーを構成するノードのbpy_prop_collectionです。 linksは、ノードを接続するためのリンクのbpy_prop_collectionです。