Learning the Node Graphs of Human Fall Flat Work Shop

May 8, 2019

Human Fall Flat Workshop – Node Graphs

Learning the Basics

General Notes

– Can modify button actions real time and they will adjust (press, hold, toggle)
– For Connections:
&nbsp&nbsp&nbsp&nbsp- Syntax
&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp- [GameObjectName : ScriptName]
&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp- InputType : NameOfInput
&nbsp&nbsp&nbsp&nbsp- InputType is either Input or Output
&nbsp&nbsp&nbsp&nbsp- Clumped GameObjectName and ScriptName means that script is attached as a component to that gameObject
– NG = NodeGraph
– Node outputs of “value”
&nbsp&nbsp&nbsp&nbsp- generally means it’s measuring some amount of something (usually normalized 0 – 1)
&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp- i.e. SignalAngularVelocity has an output of “value”, which is a normalized measure of the amount of angular velocity the object currently has (currentVelocity / targetVelocity)

Nodes

– SignalUnityEvent
&nbsp&nbsp&nbsp&nbsp- Call for something to happen, generally in another gameObject
&nbsp&nbsp&nbsp&nbsp- Usually found at the end of Node Graphs
&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp- because they take other actions in as inputs to determine when to do an event
– SignalMathCompare
&nbsp&nbsp&nbsp&nbsp- Has 2 inputs: in1, in2
&nbsp&nbsp&nbsp&nbsp- Output is 1 if both inputs are equal (the same); Output 0 otherwise
&nbsp&nbsp&nbsp&nbsp- also has an invertedOutput which is just the opposite out Output
&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp- 1 when Output is 0
&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp- 0 when Output is 1

Node Graph

– The Node Graph script itself creates entire Node Graph “shell”
&nbsp&nbsp&nbsp&nbsp- This creates two nodes within itself:
&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp- Input Node: Only holds number of elements in the Inputs array Size
&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp- Output Node: Only holds number of elements in the Outputs array Size
&nbsp&nbsp&nbsp&nbsp- At the higher level, it has both the inputs and outputs on its single node
– Other scripts can creates nodes within the Node Graph, but they will generally create a single node
&nbsp&nbsp&nbsp&nbsp- This is different from the Node Graph script, which creates two nodes
&nbsp&nbsp&nbsp&nbsp- These nodes hold their inputs and outputs in the same node
&nbsp&nbsp&nbsp&nbsp- Examples:
&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp- Button
&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp- Net Signal
– “Up” in the Node Graph will move to the Node Graph of the parent gameObject of the current Node Graph’s gameObject
– A Node’s output generally goes to:
&nbsp&nbsp&nbsp&nbsp- another node script within the same gameObject
&nbsp&nbsp&nbsp&nbsp- node script within a gameObject that is a child of the current gameObject
– Changing Node Graph connections may not update in real time
&nbsp&nbsp&nbsp&nbsp- It visually appears to be updating, but does not seem to actually take in change
&nbsp&nbsp&nbsp&nbsp- Need to stop playing, edit node connections, then start play again

Building a Node Graph

– Start with an empty gameObject that just has a NodeGraph script
&nbsp&nbsp&nbsp&nbsp- NodeGraph can have 0 inputs and outputs
– Create children gameObjects that will hold main NodeGraphs for this overall object
&nbsp&nbsp&nbsp&nbsp- The NodeGraphs for these objects cannot have 0 inputs AND 0 outputs
&nbsp&nbsp&nbsp&nbsp- They must contaion AT LEAST 1 input or output
&nbsp&nbsp&nbsp&nbsp- Adding an input or output to them will make the node appear in the overall NodeGraph in the parent object
&nbsp&nbsp&nbsp&nbsp- The internal NodeGraph (the NodeGraph of this specific child gameObject) will have separate input and output nodes
&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp- It will remove the corresponding node if you specify 0 inputs or 0 outputs