Graph Plotters

This node, “Plot Graph in 3D View”, is used to plot a graph from an incoming “Float” number derived from another node. Here is a typical usage:

Example usage of the Plot Graph in 3D View node:

I have made multiple curves and then joined all the meshes together, then extruded various edge loops to get these shapes.

Here are some Speed/Acceleration Graphs made by the node having been fed by my Speed Acceleration node:

The highlighted graph was obtained by changing the keyframe handles for the previous speed graph – the one that reminds you of Mae West… 😉

I have modified this node to make it more “user friendly”, i.e. taken out the sub-procedure that kicks you in the nuts! The new node is on the GitHub, but not in the latest official release yet (as of 3 Mar 2018). I have also added another similar node that draws either cubes or spheres, where this one would have just drawn a vertex, here they are in use:

Here is the new Plot Graph in 3D View node, you can run multiple copies of this, but don’t run the Timeline too fast for your CPU to draw the vertices, advance the Timeline using your arrow keys is a good option, if you are in doubt:

The node has the following inputs:

  • Execute (Boolean)
  • Delete Existing Mesh (Boolean)
  • Jump Frame (Integer)
  • Start Frame (Integer)
  • End Frame (Integer)
  • X Scale (Float)
  • Y Offset (Floar)
  • Z Scale (Float)
  • Object (Object)

The node has one output socket that passes the object though for connection to another node if required. It draws graphs in the 3D View in the X-Z plane in the selected object.

Operation:

The checkbox Execute should be checked if you want the node to execute during the animation – this will be turned off by the node once it has completed its functions, i.e. gone past the End Frame setting. So to run the operation just press Play in the Timeline (ALT+A), or advance the timeline using your arrow keys. If you leave the animation cycling, the node will only run on the first cycle then it will switch itself off.

The checkbox Delete Existing Mesh, if checked, will empty all vertices from the target object prior to adding new meshes.

Select a mesh object in your project to receive the graph. It is preferable that this be an empty object, the node will connect the last existing vertex to the new graph if it is not empty. this object MUST have two material slots, one for Spheres and one for Cubes, or I suspect the node will crash, I will correct this potential loop-hole later in the process.

Connect your feed to be plotted over time to the Input socket, this expects a Float number. May your God(s) protect/help you if you use anything else!

Set the Start Frame and End Frame parameters. Start Frame must be greater than the Animation Start Frame of your project. So if your animation starts on frame 1, the Start Frame must be at least 2.

Set the Jump frame if required, this will only process every nth frame, so if you set this to 5, a point will be drawn every 5 frames from the start frame. The node will show “Skipping this frame” on frames where no point is to be drawn.

X Scale is used to determine the length of the graph, the node uses the current frame to set the X coordinates of the points along the curve, so a run over frames 10 to 100 will start at X = 10 and go to X = 100. In the image above I have set this to 0.2, so the graph is one fifth of the numbers given for Start Frame and End Frame, i.e. each point at every 0.2 units in X.

Y Offset is used to determine the Y coordinates of the graph, this expects a Float number, you know it makes sense not to argue with the node and use something else…

Z Scale is used to determine the vertical scale of the graph, so a value of 5 multiplies the incoming feed number by 5 to set the Z coordinates of the graph point. The Graph is drawn in the X-Z plane.

The output is a set of connected edges in the object mesh. You can of course do anything you like with this mesh afterwards, like extrude the edges, rotate it, scale it, whatever you like.


A Mixture of the two nodes’ work below, the graph has been extruded to make the ribbon.

Here is the new “Plot Spheres/Cubes in 3D View” node, you can run multiple copies of this, but don’t run the Timeline too fast for your CPU to draw the meshes, advance the Timeline using your arrow keys is a good option, if you are in doubt:

The node has the following inputs:

  • Execute (Boolean)
  • Jump Frame (Integer)
  • Start Frame (Integer)
  • End Frame (Integer)
  • Diameter (Float)
  • X Scale (Float)
  • Y Offset (Floar)
  • Z Offset (Float)
  • U-Segs (Integer)
  • Object (Object)

The node has one output socket that passes the object though for connection to another node if required. It draws graphs in the 3D View, generally in the X-Z plane in the selected object.

Operation:

The checkbox Execute should be checked if you want the node to execute during the animation – this will be turned off by the node once it has completed its functions, i.e. gone past the End Frame setting. So to run the operation just press Play in the Timeline (ALT+A), or advance the timeline using your arrow keys. If you leave the animation cycling, the node will only run on the first cycle then it will switch itself off.

Select a mesh object in your project to receive the meshes, this can contain meshes already without any adverse effects.

Set the Spheres/Cubes checkbox, when set it will draw Spheres, when not set it will draw Cubes. you can connect another feed to this, so in the example image above I connected an Expression node with the formulae x < 50 where x is the current frame – this sets the value to be True if the current frame is less than 50 and False if it is not – this causes the node to draw spheres to start with, then change to cubes after frame 50.

Connect your feed to be used as the mesh centres over time to the Input socket, this expects a Float number. May your groin be infested with the fleas of a thousand camels if you use anything else.

Set the Start Frame and End Frame parameters. Start Frame must be greater than the Animation Start Frame of your project. So if your animation starts on frame 1, the Start Frame must be at least 2.

Set the Jump frame if required, this will only process every nth frame, so if you set this to 5, a mesh will be drawn every 5 frames from the start frame. The node will show “Skipping this frame” on frames where no mesh is to be drawn.

Set the Diameter parameter, this is used to determine the size of the Spheres/Cubes drawn.

Set the U-Segs parameter to at least 8 – anything less than this and the node gets very upset with you. This is used to draw spheres and represents the number of U segments, V segments is half the value you enter here, but if you enter 9 for users, the node will set V-Segs to 4, that being the nearest integer to half the U-Seg value.

X Scale is used to determine the length of the plotted meshes, the node uses the current frame to set the X coordinates of the points along the curve, so a run over frames 10 to 100 will start at X = 10 and go to X = 100. In the image above I have set this to 0.2, so the graph is one fifth of the numbers given for Start Frame and End Frame, i.e. each mesh at every 0.2 units in X.

Y Offset is used to determine the Y coordinates of the mesh centres, this expects a Float number, you know it makes sense not to argue with the node and use something else…

Z Offset is used to determine the Z coordinate of the mesh centres and the node expects a Float number. The meshes are generally drawn in the X-Z plane, Unless, of course, you alter this by putting a variable feed into Y-Offset and a fixed feed into Z-Offset for example.

This image was produced with the Plot Spheres/Cubes in 3D View node and the mesh has a Curve Modifier to bend it around into a spiral:

The mesh was drawn with two passes of the node, one with a Cosine feed, the next with a Sine feed to the Z Scale input, also, I reversed the Expression node that changes the Sphere/Cube switch from x < 50 to x > 50  x is the current frame. Other than that, I also changed the Y-Offset vale so the two strings of meshes did not collide with each other.

The node is hard wired to set the faces to Smooth display, rather than Flat, you can always change this afterwards. It is also set to change the cubes to one material and the spheres to another, so you object must have two materials in it. I may alter the node to check this, but at a later date, once all other testing is complete.


Here’s a quick video showing the nodes in use, including my Speed/Acceleration node:


NOT FINISHED YET 😛

Actually I think this page is finished…