RSS< Twitter< etc

Magma Editor - Krakatoa For Maya

Work In Progress - Last Edited on 2013/11/22


Krakatoa MY 2.3.0 implements a first iteration of the node-based Magma channels editor already available in Krakatoa MX for 3ds Max.

Krakatoa Magma is implemented as a dedicated Maya node which can be connected to all supported Krakatoa particle sources including PRT objects and Maya Particles. In addition, the previous "Krakatoa Modifiers" system which was originally using extra attributes has also been reimplemented as dedicated Maya nodes which can be connected both before and after the Magma node.

The Autodesk Maya implementation of the Magma Editor uses a newly developed, platform-independent node graph control Qt extension called "MagmaFLUX" developed by Thinkbox Software.

Both MagmaFLUX and the Magma Editor implementation in Krakatoa MY are subject to future development to provide more features and even faster workflows.

The Magma node operates on particle channels by performing an implicit loop over all particles in the incoming stream. Magma operations are currently strictly History-Independent, meaning that they are applied to the current frame's particle data without any knowledge of preceding frames' data. Magma operations are multi-threaded and are performed on native Krakatoa Particle Stream data instead of using the Maya particle data arrays. This contributes to the significantly higher performance of these operations. 

The Magma Editor

Accessing The Magma Editor

There are several ways to access the Magma Editor: 

  • Using the MAGMA icon to connect a new Magma node
    • Click the MAGMA icon in the Krakatoa shelf.
    • If a single valid particle source object is selected, a Magma node will be connected to it and its Magma Editor will be opened. 
    • Clicking again will add connect Magma node.
  • Using the Krakatoa Modifier Editor to create, connect and edit a Magma node.
    • Click the MOD icon in the Krakatoa shelf to open the Modifier Editor dialog.
    • Select the Particle source to modify
    • Click the +Add Magma button to connect a new modifier, or select an existing one from the list of existing modifiers.
    • Click the EDIT Modifier button.
  • Select an object with already connected Magma node(s) and use the Maya Attribute Editor to select the desired Magma node and press its Open Magma Editor button. 

Magma Editor User Interface

The Magma Editor is a floating window containing

  • A Menu Bar with some useful functions
  • An UPDATE button preceded by a checkbox in the same area as the menu. The checkbox is checked by default and causes any changes to the flow to update the PRT object automatically. When unchecked, you must click the UPDATE button for the changes to be reflected by the viewport particle display.
  • A MagmaFLUX-based node editing control (gray grid) in the middle-left.
  • A Node Categories menu at the bottom left. Clicking a menu item or pressing ALT+Menu Key will open a sub-menu with relevant nodes to create.
  • An Insert/Branch drop-down list in the same bottom row as the Node Categories menu. Switching this option to Branch will auto-connect new nodes to new branches. When set to Insert, new nodes will be inserted into existing connections if a previously created node is selected.
  • A Node Attributes Panel on the right-hand side to represent the editable parameters of the selected Magma nodes.

In the above screenshot, there are two sub-flows outputting to Position and Color channels, but using some common operators (InputChannel Position).  

  • The IntersectRay operator is outlined in red because its third input should be a Ray Direction Vector, but a Float value was connected instead.
  • There are four selected nodes (outlined in white) - their attributes are displayed in the panel on the right.
  • The Multiply operator was disabled (drawn as transparent), thus passing through the InputValue Vector connected to its first input socket to the Color Output. The second input socket is drawn dark as it is effectively disabled.
  • The Color Output node was also disabled and is drawn darker than the Output Position above it.
  • The three nodes at the bottom are not connected to any Output node and are just unused building blocks (drawn darker than connected ones).
  • Green sockets are valid (input has a valid default value)
  • Blue sockets are connected.
  • The second input socket of NearestParticle is drawn in red because it requires an input from another node and does not have a default value. Connectng such sockets is mandatory.
  • The output socket of the InputValue connected to the Multiply node represents the color value of the Vector (magenta 0.7,0.2,0.5). 

Creating Magma Nodes

This topic discusses the various workflows for creating nodes in the Magma Editor.

Magma Node Types

This topic lists all currently available node types and their functionality.

Menu Bar

File Menu


  • Resets the flow by deleting all nodes and connections.
  • A Yes/No prompt will be issued first.
  • The Reset operation is undoable.

Open Flow...

  • Loads a previously saved flow from disk, replacing the current flow.
  • Opens a file picker dialog with only .magmamel file type allowed.
  • The Open Flow operation is undoable.

Merge Flow... 

  • Loads a previously saved flow from disk, retaining the existing flow.
  • Opens a file picker dialog with only .magmamel file type allowed.
  • Duplication of nodes is allowed, and new nodes will be renumbered accordingly.
  • The Merge Flow operation is undoable. 

Save Flow As... 

  • Saves the complete current flow including all nodes, connections, their attributes and animation keyframes of InputValue nodes and operator defaults to a file.
  • Opens a file picker dialog with only .magmamel file type allowed.
  • The flow file is saved in pure MEL script code. The result is a function that, when executed by the Open/Merge Flow operations, recreates the saved nodes and connections. 

Save Selected Nodes As... 

  • Saves only the currently selected nodes, they connections, attributes and animation keyframes to a file.
  • This is useful for saving code snippets or sub-flows. 

Export to Krakatoa MX... 

  • Saves the whole flow as a Krakatoa MX .MagmaScript file.
  • The .MagmaScript is a MAXScript which, when executed by the Magma editor in Autodesk 3ds Max running Krakatoa MX, recreates the saved flow. 

Close Magma Editor 

  • Closes the Magma Editor. 
  • Equivalent to pressing the close icon of the Editor's window.
  • Note that closing the editor resets the Undo Buffers of the last session. 

Edit Menu

Undo (CTRL+Z) 

  • Reverts the last changes, if any, via a disk-based Undo buffer file sequence.
  • The Magma Editor Undo feature is implemented using the same mechanism used for saving and loading flows, the but Undo Buffer files are temporarily stored in the user's local folder and are destroyed when the editor is closed.
  • This means that the Magma Editor supports practically unlimited Undo/Redo steps within a single editing session. 

Redo (CTRL+Y) 

  • Restores the state of the flow before the last Undo operation. 

Copy (CTRL+C) 

  • Stores the currently selected nodes and their connections and attributes in a temporary buffer file on disk.
  • The Copy/Paste feature operates similarly to the Undo/Redo and Open/Save features, but uses a single "clipboard" file on disk.
  • Other than the Undo buffer, the clipboard file is one for all Magma sessions and can be used to move data between Magma modifiers in the same Maya scene, between Maya scenes, and even between multiple Maya sessions running at the same time on the computer.
  • The last clipboard file is never deleted, so it is accessible even after restarting Maya or rebooting the computer. 

Paste (CTRL+V) 

  • Merges the content of the clipboard file into the current flow. 
  • The operation is equivalent to File>Merge Flow..., except that is uses a single dedicated clipboard file (if available).
  • The same Paste operation can be performed multiple times.
  • The Paste operation is undoable. 

Select All (CTRL+A) 

  • Selects all nodes in the current flow.
  • Since editing multiple selections is supported in the Magma Attribute Editor, this is useful for seeing all attributes of all nodes at once.
  • Together with the DEL key it could also be used as alternative to File>New... 

Invert Selection (CTRL+I) 

  • Inverts the current selection by deselecting the selected and selecting the unselected nodes.
  • It does not affect any selected connections. 

Select Unconnected (CTRL+U) 

  • Selects all nodes that are not directly or indirectly contributing to an Output node.
  • Unconnected nodes are drawn darker and usually reordered at the bottom or optionally on the left of the Editor.
  • This command can be useful for quickly selecting and deleting all unused building blocks that might be floating around after creating a flow. 

Select All Inputs (CTRL+ALT+I) 

  • Selects all nodes that have no input sockets, including InputChannel, InputValue, InputGeometry and InputParticles.
  • Since editing a multi-selection is supported by the Magma Attribute Editor, this can be useful for adjusting the settings of all relevant inputs in the current flow. 

Select All Outputs (CTRL+ALT+O) 

  • Selects all nodes that have no output socket and define channels to be set by the flow.
  • This can be useful for seeing and adjusting all output channels at once in the Magma Attribute Editor. 

Swap 1st and 2nd Input Sockets (CTRL+W) 

  • Swaps the connections (if any) of the first and second input sockets (if they exist) of all selected nodes.
  • This can be useful when the order of the sockets matters. For example, swapping the two values connected to a Blend operator, or inverting the Subtract operator's operands etc. 

Spaw 2nd and 3rd Input Sockets (SHIFT+CTRL+W) 

  • Swaps the connections (if any) of the second and third input sockets (if they exist) of all selected nodes.
  • Together with the previous operation can be very useful for fast swapping existing connections without using the mouse to rewire the flow. 


View Menu

Cycle Reorder Mode (CTRL+R)

  • Cycles through the modes of the Reorder list in the bottom right corner of the Editor.
  • The default mode on Editor opening is Manual.
  • The other modes are Branches, Blocks and Compact.
  • You can also select from the list directly with the mouse.

Order Unconnected Nodes At The Bottom checkbox

  • When checked (default), and if the Reorder mode is NOT set to Manual, unconnected nodes will be placed below the connected flow when reordering.
  • When unchecked, unconnected nodes will be gathered on the left side of the connected flow.

Show Grid

  • When checked (default), the grid will be drawn.
  • When unchecked, no grid will be drawn, but snapping to grid will still be performed if the Snap To Grid option is checked.

Snap To Grid

  • When checked (default), nodes upper left corner of the node will be snapped to the nearest grid intersection.
  • The current hard-coded grid spacing is 20 pixels, node width defaults to 160 pixels (8 grid cells), heights vary.

Reset Pan And Zoom (SHIFT+CTRL+Z)

  • Resets both the Pan value to center the flow at the current mouse position, and the Zoom factor to 100%.

Reset Pan (P)

  • Resets the Pan to center the flow at the current mouse position.

Reset Zoom (Z)

  • Resets the zoom factor to 100%.


Colors Menu

The Magma Editor provides several higher-level binary options for the various node elements. These options can be turned on and off and combined into custom Themes. The actual colors are hard-coded and cannot be adjusted via the UI. There are hundreds of possible combinations, but only some of them are pleasant to the eye. Some of the most useful combinations are hard-coded as Themes in the Colors Menu. Any other combinations can be saved to disk as presets and loaded at any point later, or shared with other users. 

The last settings of the relevant options are stored in a configuration file and will persist between Maya sessions until changed again.

'Default Dark' Theme

  • This theme used a dark background, colorful node backgrounds with dark headers and colorful, hight-contrast title text.
  • Selecting this theme and then turning off the Dark Background Colors option also leads to a rather pleasant, but brighter setup similar to the Krakatoa MX default look.

'Neon In The Dark' Theme

  • This theme uses dark background, dark nodes with dark headers, and bright colorful titles and outlines for a Neon, TRON-like look.

'Dark Monopoly' Theme

  • This theme uses dark background, dark nodes with black text on colorful header background, and desaturated sockets.
  • This these is very useful when working in dark rooms that require darker UI elements.
  • Another useful even darker variation of this theme can be achieved by checking Dark Node Header Colors and unchecking Dark Node Title Colors.

'Krakatoa MX' Light Theme

  • This light-background theme resembles closely the default look of the Magma Editor in Krakatoa MX in 3ds Max.
  • The nodes are bright and colorful with dark outlines and titles.

'Low Contrast' Light Theme

  • This theme uses nearly all bright settings for all elements, and desaturated sockets for a semi-transparent, low-contrast look.


Dark Background Colors checkbox 

  • When checked, the background color of the node editor will be dark, approximately matching the background of Maya's native Node Editor.
  • When unchecked, the background color will be brighter, but not nearly as bright as the default color in Krakatoa MX using Light UI settings. It is similar to the Maya time slider color to ensure it still fits the overall dark color scheme of the application.
  • Note that changing the Background color between dark and light implicitly modifies the colors of connection wires and sockets to ensure good visibility and contrast. 

Dark Node Colors checkbox 

  • When checked, the Node Body color (the area containing the sockets) will be dark gray with a minimal bluish tint.
  • When unchecked, the node color will be based on a predefined color palette designed to distinguish between input nodes (mostly cold bluish colors), output nodes (green) and operator nodes (warm colors of the yellow-orange-reddish palette). These colors are mostly the same as the default ones found in the Krakatoa MX implementation of Magma.
  • The Node Body color uses slight transparency to reveal nodes behind it. The transparency is increased when the node is disabled.
  • The Node Body color is additionally darkened when the node is not connected directly or indirectly to an Output node. 

Dark Node Outline Colors checkbox 

  • When checked, the outline color of the node will be black.
  • When unchecked, the outline color of the node will be based on the node color as described above.
  • When a node is selected, the border is highlighted in white regardless of the Outline Color settings. 

High Contrast Node Outlines checkbox 

  • When checked, the outline will be fully opaque, producing a solid color (either black or the node-specific color).
  • When unchecked, the outline will have some transparency, mixing partially with the color of the editor background and the node's Body color described above. 

Dark Node Header Colors checkbox 

  • When checked, the header color (the top area behind the title text) will be drawn in a dark gray with a slight color tint based on the node color.
  • When unchecked, the header color will be a slightly darker version of the node color.
  • The transparency of the header will be lower than the body area's transparency below it, although not fully opaque. 

Dark Node Title Colors checkbox 

  • When checked, the Title text in the Header area will be drawn in black.
  • When unchecked, the Title text will use the same color as the node outline. 

High Contrast Node Tiles checkbox 

  • When checked, the Node Title will be fully opaque, producing a brighter, more contrasty color.
  • When unchecked, the Node Title will use some transparency, mixing its color with the Node Header's color. 

Saturated Socket Colors checkbox 

  • When checked, the input and output sockets will use a more saturated set of colors (green for unconnected sockets with defaults, blue for connected sockets, red for unconnected with no defaults).
  • When unchecked, the sockets will be drawn with lower saturation, but in the same general colors.
  • Note that output sockets of InputValue / Vector nodes will use the Vector's color value instead of the regular blue/green colors.
  • The sockets will be darkened when the node is disabled, unless it is the first input or output socket and there is a valid connection for passing through. 

Dark Socket Outline Colors checkbox 

  • When checked, the outline (one pixel wide regardless of zoom factor) of the sockets will be drawn in black.
  • When unchecked, the outline of the sockets will be drawn in a dark version of the socket's color (dark green, dark blue, dark red).
  • The only exception is the color value output socket of the InputValue / Vector node which will be the inverse color of the socket's fill color to retain contrast. For example a green socket will have a magenta (red+blue) outline, a blue socket will have a yellow (red+green) outline etc. 


SAVE Color Scheme... 

  • Selecting this menu item will open a file dialog allowing you to save the current color theme (the state of the above checkboxes) as a custom preset to restore later or share with others. 

LOAD Color Scheme... 

  • Selecting this menu item will open a file picker dialog to select a previously saved color theme. 

Note that the current color settings will be stored automatically in a dedicated setup file to restore the colors between Maya sessions each time you change a checkbox' state.

Help Menu

Online Help... 

  • Opens the default web browser and navigates to these Krakatoa MY Online Help pages.
  • It requires an active internet connection. 


  • Displays an About Krakatoa Magma dialog.