S&box Wiki
Home
/
Edit Animgraph
View
Edit
History
No Category
Developer Overview
The Project System
Publishing To Asset Party
Getting Started With Hammer
Mapping Basics
Mapping Entities
Advanced Mapping Techniques
Getting Started with Modeldoc
Animgraph & Animation
Physics
Modeldoc Nodes
Advanced Modelling
UI Basics
Styles & Stylesheets
Razor Templates
Game Menus
Materials
Built In Shaders
Shaders
Shader Reference
Sounds & Audio
Particles
Getting Started
Making Games
Input
Networking
Physics
Rendering
Editor & Tools
VR
Misc
Playing Guides
Console Commands & Variables
Dedicated Server
Log in to edit
Animgraph
<title>Animgraph</title> <cat>Model.Animation</cat> # What is the Animgraph The Animgraph works as a node based system. you have your final pose node, and going left up to each next node in your node tree it will either change the pose, or direct the flow of the nodes to the next pose altering node, until it reaches the end and giving you your final pose for the given rendered frame. <upload src="70317/8db7748b519423f.mp4" size="6417113" name="2023-06-27 20-56-09.mp4" /> The Animgraph has the advantage over code of easily combining animations to create new poses, without the need to make a whole new animations just for it, or dealing with IK easily and so on, you can get easy amazing results using it. like dabbing while walking! No need for a whole new animation, just use the legs for the walk, and upper body for dabbing just blend between the dabbing and walking to combine them into a new pose! <upload src="70317/8db77499f0dfb8d.mp4" size="3413528" name="2023-06-27 21-02-26.mp4" /> Although the Animgraph is used instead of game code to control the animations, you can still set various [parameters](https://wiki.facepunch.com/sbox/Animgraph_breakdown#4parameters) every frame. nodes can reference these parameters to see how they should blend animation, what animations to use and much more. You can also choose to bypass this system altogether, either for performance or simplicity reasons. See this article: [Animations without animgraph](https://wiki.facepunch.com/sbox/Animations_without_Animgraph) <note>The Citizen animgraph is largely self-documented. Just open it up, and look around at comment boxes, and comments on individual nodes!</note> <warning>The rest of the page is quite rough, follow at your own risk</warning> ## 1 - Preview window The preview window is Contains your model thats being animated within the animgraph. It is most useful when you are testing your final pose within the graph itself via [playback control](https://wiki.facepunch.com/sbox/Animgraph_breakdown#9playbackcontrol) <upload src="70317/8db774681caba92.gif" size="7109414" name="sbox-dev_jLOx4S9zxJ.gif" /> ## 2 - Main Inputs <note>This was a common set of base [Parameters](https://wiki.facepunch.com/sbox/Animgraph_breakdown#4parameters) that were common through most animgraphs, although i dont recommend using it, just make and use your own parameters</note> ## 3 - Motors Motors are what deal with where the inputs for the graph come from. For example player input motor - says the inputs for this graph is player driven. and will be receiving more direct inputs like forwards, back, left, right from the player. Where the Path motors, says that this model will be moving along a set path instead of multiple directions, basically like an NPC. Motors update twice: - Before the nodes update, so that they can process any input from the game and make it available to the nodes - After the nodes have finished updating, so that they can perform any necessary fix-up on the root motion calculated during the node update ## 4 - Parameters Parameters are what you will use to communicate between your c# code and your Animgraph to tell it what is happening in game (jumping, running forwards, running speed, pose state) <upload src="70317/8db774324157e8a.png" size="18914" name="image.png" /> Parameters come in 6 different types, bool, enum, float, int, vector and quaternion. Each one having their own ideal reasons you would use them. For example - bool - on and off. - Enum - to choose between multiple animation states. - Float - precise vale input. - Int - less precise value input. - Quaternion - rotation input. - Vector - position input. When you create these parameters you will have setting on them pop up in the [Properties window](https://wiki.facepunch.com/sbox/Animgraph_breakdown#6properties) <upload src="70317/8db77433a82c78f.png" size="10363" name="image.png" /> Here you can set base settings, value limits, networking and so on of this specific Parameter. ## 5 - Tags If Parameters are used for external code to communicate values INTO the animgraph, then Tags are mainly used for INTERNAL nodes to communicate OUT of the animgraph. Tags can be changed by nodes, and then sent to other systems within the engine, its just a way to communicate an animation event thats happening to everyone else. Tags can also affect nodes within the animgraph. <upload src="70317/8d9955e8152c17d.png" size="28942" name="image.png" /> <note>There are also tags that trigger sound, particles, and change stuff set in a model and so on but as far as i know currently i dont think they are used in sbox, or even work? So the only tags i know of currently are the Internal ones</note> ## 6 - Properties The properties window allows you to change specific properties, basically settings within something selected that has properties like... - motors - parameters - nodes - tags - animations Obviously there are lots and lots of different properties that do completely different things between every different thing you select. but dont worry, *most* properties can be hovered over and they will have a description of what they do! Like so! <upload src="70317/8db774478b5f5ab.png" size="13165" name="image.png" /> ## 7 - Properties Description / Preview window If you dont see this window when you have something selected. you can view it like so. <upload src="70317/8db77468b9e9be0.gif" size="70366" name="sbox-dev_xAm96BqLCQ.gif" /> This little window will give you a description of selected thing, which you can look at if you are ever confused what a node does, it will have a description of what it does! Also with certain nodes this window can become another Preview window for animations and so on, or will display a basic example of what's going on inside Complex nodes (like the state machine node) without having to double click and enter it. <upload src="70317/8d995464dfd65c0.png" size="216822" name="image.png" /> ## 8 - Node Workspace This is where all your nodes are and connect together, here you will be creating, connecting and messing with all your nodes. here is a basic example of how it works <upload src="70317/8db7747ca9e1721.mp4" size="4463357" name="2023-06-27 20-49-47.mp4" /> Note the workspace will change on nodes with a little white arrow on them. This little white arrow indicates you can go inside the node and do more! ## 9 - Playback Control The playback control window allows you to preview what your animgraph will output without having to boot up a game and code inputs to the parameters. it shows you a live path of your node final pose flow. and allows you to easily set whatever values on your properties to see how they will change the final animation. just click the little man and it will send you into playback mode. <upload src="70317/8d99547262634bb.png" size="9017" name="image.png" /> as you can see its super powerful to quickly test your graph <upload src="70317/8db7745d568e8d3.mp4" size="14103661" name="2023-06-27 20-35-38.mp4" /> As you can see, this is really useful to make sure everything is working right, and helps give an idea of what needs to be fixed. ## 10 - console This is just like a normal console to spit errors out to you if anything goes wrong, but for the most part you dont need to have this open. # this page is WIP and still has stuff that needs to be added, so feel free to make changes or correct any mistakes!
S&box Wiki
Development
Developer Overview
6
Editor Overview
General FAQ
System Requirements
The s&box wiki
Troubleshooting
Useful Links
The Project System
4
Adding Assets
Creating a Game Project
Project Settings Window - Games
Project Types
Publishing To Asset Party
2
Uploading assets
Uploading projects
Hammer
Getting Started With Hammer
3
Getting Started With Hammer
Making Your First Map
Mapping Resources
Mapping Basics
7
Cordons
Hotspot Materials
Selection Sets
Standard Mapping Dimensions
Tool Materials
Tools Visualisation Modes
Using Entities That Require a Mesh
Mapping Entities
2
Creating a Door
Light Entities
Advanced Mapping Techniques
8
Collaborating With Prefabs and Git
Instances
Prefabs
Quixel Bridge Plugin
Tilesets
Tilesets-Advanced
Tilesets-Proxies
VIS Optimizations
Models & Animation
Getting Started with Modeldoc
7
Automatic Model Setup
Breakpieces
Creating a Model
Guide to Models
Importing Rust Weapons
LODs
ModelDoc FAQ & best practices
Animgraph & Animation
4
Animations without Animgraph
AnimEvents, AnimGraph Tags, Attachments
Animgraph
Delta Animations
Physics
3
Cloth Physics
Collisions, Physics & Surface Types
Jiggle Bones
Modeldoc Nodes
1
Custom ModelDoc nodes
Advanced Modelling
6
Bodygroups
Citizen
First Person
IKChains and Stride Retargeting
Morphs
Vertex Normals
User Interface
UI Basics
7
Custom Fonts
Embedding Websites
Enabling Pointer Events
Events and Input
Localization
UI Basics
UI with Components
Styles & Stylesheets
1
Video Backgrounds
Razor Templates
4
A Razor Overview
Aliases and SetProperty Attributes
Generic Components
Templates
Game Menus
1
Making a Custom Pause Screen
Materials & Shaders
Materials
5
Guide to Materials
Material Attributes
Material Resources
Texture Settings
Using Dynamic Expressions
Built In Shaders
2
Foliage Shader
Glass Shader
Shaders
4
Compute Shaders
Constant Buffers
Material API
Shading Model
Shader Reference
5
Anatomy of Shader Files
Getting rid of Tex2D macros
Shader Reference
Shader States
Texture Format Cheat-Sheet
Other Assets
Sounds & Audio
4
Guide to Sounds
Sound Events
Sound Occlusion
Soundscapes
Particles
5
Creating animated sprites
Creating your first particle effect
Understanding Particle Editor
Using custom sprites
Using particle systems from C#
Coding
Getting Started
5
Cheat Sheet
Learning Resources
Setting up Rider
Setting up Visual Studio
Setting up Visual Studio Code
Making Games
2
Components
GameObjects
Input
4
Commands
ConVars
Input System
Speech Recognition
Networking
7
Auth Tokens
Http Requests
Lobby System
Networked Types
Networking Basics
RPCs
WebSockets
Physics
5
Collisions
Hitboxes
Joints
Traces
Triggers
Rendering
3
Render Tags
RenderHooks
Scenes
Editor & Tools
7
Creating a Tool
Custom Asset Types
Guide to Widgets
Hammer API
Hammer Gizmos
Hotload Performance
Widget Docking
VR
3
Getting Started
VR Input
VR Overlays
Misc
13
Asset Types
Attributes and Component Properties
Backend API
Cloud Assets in code
Code Accesslist
CPU Performance Profiling
DisplayInfo
FileSystem
Mounting assets at runtime
package/find
Setting Up A Navigation Mesh
Threaded Tasks
TypeLibrary
Playing
Playing Guides
3
Default Keybinds
Proton
s&box on macOS (Experimental)
Console Commands & Variables
1
Launch Arguments
Dedicated Server
1
Dedicated Servers