S&box Wiki
Home
/
Edit Animations without 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
Animations without Animgraph
<cat>Model.Animation</cat> <title>Animations without Animgraph</title> # Introduction Animgraph is really powerful, but it currently has a bit of a performance bottleneck with many units on screen. Facepunch's own RTS gamemode experiment ran into this issue. And, after all, the tool can be pretty complex and way beyond your needs. You can choose to forego the Animgraph system altogether and do all your animation stuff within ModelDoc. This approach is similar to Source 1, except you're doing all your work through a GUI instead of editing a .QC file by hand. # Example compositing ## Adding a weapon pose onto anything Here's what we can do with just a small handful of animations: * Idle (just the static default pose) * IdleLayer_Breathe (a loop of some subtle motions) * Walk_N (walkcycle, no weapons) * Run_N (runcycle, no weapons) * Idle_Sniper (weapon pose, full body) We're going to assume that all of these are already imported as their own sequences. Our goal: we want to be able to generate a Walk and a Run that composites our weapon pose on top. Before we do anything, we're going duplicate the movement sequences. We're gonna name them *Walk_Sniper* & *Run_Sniper*. <upload src="a50a1/8d96cab0be4c16a.webm" size="2902047" name="dasp_movement_weapon.webm" /> First, we're going to duplicate our *Idle_Sniper* sequence, and name it *Pose_Sniper*. We'll apply a WeightList to this *Pose_Sniper* sequence, and we'll also tick the "WorldSpace" setting. The WeightList will define how much the bones fade into each other, and the "WorldSpace" setting (also named "Model Space" in Animgraph) makes it so that the mixing of those bones happens relative to the root of the model space, instead of relative to each bone (that would be "Parent Space"). Because we're not gonna be using IK here, the arms (including the shoulders) need to be 100%. We also can't be using the pelvis, this is strictly upper body. (If we move the pelvis, we move all children, including the legs, and again, no IK to put them back into place here...) <upload src="a50a1/8d96cab1f3f67c5.png" size="11834" name="dasp_weightlist.png" /> And that's it! We're done with our *Pose_Sniper* sequence, so we're going to add it as a layer on top of *Walk_Sniper* & *Run_Sniper*. See the video above. ## Idle layers This looks pretty nice as-is, but it's looking a little stiff. We should try to add a bit of weapon sway back in... and the way we're gonna do that is by duplicating *Run_N*. Let's name our new sequence *Run_layer*. We'll subtract it by itself (to make it an additive/delta sequence). Then we apply a WeightList to that sequence which only leaves the spine, neck and head bones in, weakened (10% at spine_0, slowly increasing towards 40% at the head). Then we just need to add that delta sequence as a layer on top of our Run_Sniper animation... and we have some nice weapon sway! <upload src="a50a1/8d96caafb60c216.webm" size="4163523" name="dasp_run_layer.webm" /> The subtle idle layer is added in very much the same way: without any duplication, it gets subtracted by itself (to make it additive/delta), it gets a WeightList to only affect the upper body and not the arms, and then it gets added as a layer on the Idle sequences. There is one caveat, though: all cycles are synced up to the parent animation. The idle layer is a few seconds long, but it's getting put on a 30-frame (1-second) sequence, so it gets sped up to match! There used to be a command to avoid this in Source 1, but the ModelDoc equivalent doesn't seem to be doing anything...
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
3
Guide to Sounds
Sound Events
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