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:
- Syntax
- [GameObjectName : ScriptName]
- InputType : NameOfInput
- InputType is either Input or Output
- Clumped GameObjectName and ScriptName means that script is attached as a component to that gameObject
- NG = NodeGraph
- Node outputs of "value"
- generally means it's measuring some amount of something (usually normalized 0 - 1)
- 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
- Call for something to happen, generally in another gameObject
- Usually found at the end of Node Graphs
- because they take other actions in as inputs to determine when to do an event
- SignalMathCompare
- Has 2 inputs: in1, in2
- Output is 1 if both inputs are equal (the same); Output 0 otherwise
- also has an invertedOutput which is just the opposite out Output
- 1 when Output is 0
- 0 when Output is 1
Node Graph
- The Node Graph script itself creates entire Node Graph "shell"
- This creates two nodes within itself:
- Input Node: Only holds number of elements in the Inputs array Size
- Output Node: Only holds number of elements in the Outputs array Size
- 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
- This is different from the Node Graph script, which creates two nodes
- These nodes hold their inputs and outputs in the same node
- Examples:
- Button
- 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:
- another node script within the same gameObject
- node script within a gameObject that is a child of the current gameObject
- Changing Node Graph connections may not update in real time
- It visually appears to be updating, but does not seem to actually take in change
- 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
- NodeGraph can have 0 inputs and outputs
- Create children gameObjects that will hold main NodeGraphs for this overall object
- The NodeGraphs for these objects cannot have 0 inputs AND 0 outputs
- They must contaion AT LEAST 1 input or output
- Adding an input or output to them will make the node appear in the overall NodeGraph in the parent object
- The internal NodeGraph (the NodeGraph of this specific child gameObject) will have separate input and output nodes
- It will remove the corresponding node if you specify 0 inputs or 0 outputs
Comments
Post a Comment