Nodes Overview

Node-based programming is a visual approach to programming that uses interconnected nodes to represent different actions and data flows. These nodes are essentially "blocks" of code that perform specific tasks and they are linked together to create Directed Acyclic Graph (DAG), where data flows from one node to another.

Nodes

A node represents a small function that transforms inputs into outputs, optionally using additional parameters. In ObjectTalk, nodes are visually represented by rectangles displaying a title at the top, inputs displayed on the left and outputs on the rights. Inputs and outputs are referred to as pins that can be connected and can carry only one datatype.

Each node really feels like an object instance and drawing connections between them is akin to visual programming. Today, in ObjectTalk, the IDE has an node editor that allows you to setup nodes and connect them into a graph. These graphs are automatically reevaluated when values change. The examples folder contains image processing chains and nodes are used in the scene examples to process images or create geometry. ObjectTalk already has over 90 nodes already and many will follow depending on my needs.

Users can draw connections between nodes (called links) and the editor ensures that output and input nodes have compatible data types, that inputs have a maximum of one connection and that the created graph does not include recursion (i.e stays acyclic). As links are created/moved/deleted or values altered, the editor automatically (re-)evaluates the graphs given the user a realtime programming experience.

Node Anatomy

screenshot

A node is depicted as a rounded rectangle with a title bar at the top, optional inputs on the left, optional outputs on the right and optional parameters in the middle of the rectangle.

Title Bar

At the top of the node is a title bar which by default contains the name of the node. By double clicking on the title, users can name a node anything they want to better express its function in a graph. The background of the title bar is color coded to represent the category of the node (see below).

Input Pins

Optional inputs to a node are represented on the left side of that node by what's called pins. Each pin represents an input with a specified type that is color coded (see pin types below). Input pins can only receive data from one output pin. and the pin data types have to match (which is enforced by the IDE).

If an input pin is not connected and the data types allows easy specification by the user, a field will be visible to the right of the pin's name to allow the user to specify a value.

Output Pins

Optional output from a node are represented on the right side of the node by pins. Each pin represents an output with a specified type that is color coded (see pin types below). Output pins can be connected to multiple input pins as long as the data types match (also enforced by th IDE).

Node Parameters

Some nodes also might have additional parameters or visualizations to help the node perform its function. The node parameters are rendered in the middle of the node.

Node Categories

Nodes are grouped in categories that make it easier to find them and recognize them in a graph. Each category has a unique color as shown on the right below.

screenshot

  • Input Nodes - These nodes enable users to input values or select assets (e.g. images, textures, geometries). If a nodes graph is used in another object (e.g. a 3D scene), input fields enable users to interact with the graph's functionality without having the understand the full logic. This in essence makes a nodes graph a macro somewhere else.
  • Field Nodes - These nodes
  • Math Nodes - These nodes perform mathematical operations on primitive (integer, real) and composite (vector) values.
  • Probe Nodes - These nodes provide debugging support by visualizing various data types.
  • Save Nodes - These nodes enable the user to save various data type to a specified file.
  • Virtualize Nodes - These nodes save data types to the internal virtual (memory-based) file system. This allows assets to be created dynamically with nodes and then be used in for instance 3D scenes.
  • Image Nodes - These nodes create, process, filter or transform images. In ObjectTalk, images are pictures that live on the CPU.
  • Texture Nodes - These nodes create, process, filter or transform textures. In ObjectTalk, textures are pictures that live on the GPU. In general, texture nodes are faster than image nodes as all processing is GPU accelerated.
  • Shape Nodes - These nodes generate, process or convert 2D vector shapes that are created with paths.
  • Geometry Nodes - These nodes generate, manipulate and convert geometries which consist of one or more 3D meshes. In ObjectTalk, a geometry is a 3D object made up of meshes which are a collection of interconnected triangles (faces). These triangles are formed by connecting vertices (points) with straight edges. The mesh defines the surface of the 3D object, but not its interior volume.
  • Manifold Nodes - These nodes operate on manifolds. In ObjectTalk, manifolds are specializations of geometries. A manifold mesh is watertight and contains no holes or missing faces that would cause leaks into the interior of the shape's volume. For a mesh to be manifold, every edge must have exactly two adjacent faces. Geometries do not have this constraint. Manifolds are often used in CAD applications to create 3D models through Constructive Solid Geometry. You can combined or subtract solid shapes, transform them, extrude them from 2D shapes or slice 3D models back into 2D shapes.
  • Map Nodes - These nodes work on geospatial data (either real or fictitious).

Pin Types

screenshot