S&box Wiki
Home
/
Edit Morphs
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
Morphs
<cat>Model.Advanced</cat> <title>Morphs</title> We will be using *"Blender"* as it is the most widely used free modelling program, but the guide mostly applies to every other program. # FBX file format ## Exporting the mesh 1. Create the shape keys <upload src="a4aaf/8d93962437800af.jpg" size="41445" name="1.jpg" /> <note>Avoid using underscores <key>_</key> in Shape key names, as they're used for Corrective Shape Keys; Further reading can be found in [this page.](https://developer.valvesoftware.com/wiki/Flex_animation#Corrective_shapes)</note> 2. `Export` in **FBX** format, making sure to include the *mesh* and *armature*. <upload src="a4aaf/8dad935a4928bef.png" size="21282" name="image.png" /> <warning>The model will need at least one bone, even if it's a static prop, because Morphs are animation driven and Animations need bones.</warning> <warning>Reset all Shape Keys to 0 before export, as they will be applied, and change the default mesh if you do.</warning> # Adding the morphs in ModelDoc Morphs are animation-driven, even if morphs appear when importing the model, you won't be able to use them until there's at least 1 animation. 1. Import the Mesh in ModelDoc 2. Add any animation, use the model itself if it doesn't have/use any. 3. Add a material that supports morphs (in **"Material Editor"** check the `Morph Supported` box under *"Animation"*). If you go to **"Morph Explorer"** and press `Enable Manual Slider Control` you will be able to manually drive the sliders, this is only a debugging tool, if you want to then see the animations drive the sliders, press `Allow animation to drive sliders`. <upload src="a4aaf/8d93965a322ce25.jpg" size="228630" name="3.jpg" /> # Exporting Morph Animations in Blender The animations are stored in the *mesh*, this guide will not go over how to create them, as it is commonly used and already widely covered. 1. Create your shape key animation 2. `Export` in **FBX** format, making sure to include the *mesh* and *armature*. 3. Import the animation in Modeldoc as a **"Simple Animation"**. This will be the final result: <upload src="a4aaf/8d9396ca05584ce.mp4" size="230449" name="9.mp4" /> *`Note the morph sliders moving because of the animation, they are not limited by 0 and 1.`* # DMX file format You will need the *"Source Export Tools"* plug-in. ## Exporting the mesh 1. Same as FBX 2. Go to **"Scene Properties"** and then *"Source Engine Export"*, change *"Export Format"* to **"DMX"** 3. Use the latest *DMX version*, as of writing this it's *"Binary 9"* and *"Model 22"* 4. Select the checked *"MeshName.dmx"* under *"Source Engine Exportables"* (in my case "citizen.dmx", check if unchecked) 5. Go to *"Flex Properties"* and press `Generate Controllers` 6. Press `Export` to export the model. <upload src="a4aaf/8d939634d8baf38.jpg" size="119599" name="2.jpg" /> # Legacy Source 1 Morphs This part of the guide was originally made by user [Divined](https://wiki.facepunch.com/sbox/~user:680267) as its own page. ## Exporting the morphs After importing your .qc into Blender, simply bring up your head along with the .vta and select both and export it as a DMX like below: ![Flexes](https://i.imgur.com/ILLMY9b.png) <note>You are going to need the [Blender Source Tools](https://developer.valvesoftware.com/wiki/Blender_Source_Tools) for this to work, or any other software where you can import your .vta and .smd and export as .dmx</note> ## Importing morphs in ModelDoc Importing the morphs into ModelDoc is the same as importing any other mesh, just import the .dmx as a new mesh and your morphs will appear on the bottom right under morph explorer. If you want to play around with them, simply enable manual slider control.
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