nyuuzyou/wikis huggingface dataset:
Half-Life: Alyx Workshop Tools/Modeling

Half-Life: Alyx ships with two model editors in-engine. Model Editor is the legacy form of the two, which has been around since Dota 2's Workshop Tools, and ModelDoc, which is what Valve has been using internally since then. Valve has not provided much documentation on ModelDoc, but hopefully as the community digs their toes in more, they can find out more info on it. Please make sure to check out ModelDoc Editor to learn more about creating a simple model.
== Getting started ==
* Model Creation
* ModelDoc Editor
* Viewing Models
* Common ModelDoc Nodes
* Basic Box Model 
* Simple Static Prop
* Physics Prop
* Custom Character Basics
* Model Troubleshooting
 
== Advanced features ==
* Jointed Physics Prop
* Material Groups 
* LODs
* Breakable Props 
* Advanced Breakable Props
* Houdini Vertex Animation Export
* Animgraph
* Cloth Simulation
* .MDL Importer
== Supported model formats ==
* FBX
* DMX
* SMD
Category:Half-Life: Alyx Workshop Tools
Half-Life: Alyx Workshop Tools/Modeling/Advanced Breakable Props

== BreakPiece Options ==
The BreakPiece node has a variety of options, for example "Random Spawn Chance" can be used to add additional variety to breakages.
== Multi-Tier Breakables ==
BreakPieceEmbedded nodes can be nested within each other, to make the spawned pieces themselves breakable. (Each breakpiece is a separate physics prop, so use this judiciously!)
== Break Commands ==
Break Commands are nodes you add to the parent model's gamedata to trigger additional behavior when the model breaks. For example the break_create_particle command spawns a particle system when the object breaks:
Other commands can apply custom forces, create physics joints, modify materialgroups, or change how damage is done to spawned breakpieces.
== BreakPieceSimpleParticles ==
This is an advanced node that can be used to spawn non-physical and non-interactive mesh particles, which are cheaper to simulate than prop_physics and can be used in larger numbers than normal breakpieces. (But lack the interactivity of normal breakpieces.)
It takes a DMX/FBX file and when the parent model compiles this node will resolve into a helper model with a bodygroup choice for each component, a particle snapshot that positions them in the appropriate places, and a breakcommand that spawns a particlesystem to manage the simulation of the pieces.
== BreakPieceExternal ==
This node references a separate VMDL to spawn as a breakpiece, compared to the BreakPieceEmbedded where the piece is authored inline in the parent model. This is similar to the Source1 breakable workflow, where pieces were manually authored as separate models, and can be used to more share pieces between multiple breakable parent models.
Half-Life: Alyx Workshop Tools/Modeling/Basic Box Model

This tutorial demonstrates how to create a simple model with the ModelDoc editor. This type of model is really only used for testing or demonstration purposes, but it is a good way to learn the most basic operation of the editor.
== Open the ModelDoc Editor ==
From the asset browser click on the icon for the ModelDoc editor to open it.
The editor will open with a new empty document ready to start editing.
== Add a box primitive ==
A model is composed of multiple 'nodes'. Nodes are added to the document using the Add button. 
Click the add button to get a list of all of the nodes that can be added to the document
Clicking the add button will bring up a list of all of the possible types of nodes that can be added to the document. Selecting a node type will provide a description of what the node does.
There a large number of node types that can be added to the document. The best way to navigate this list is to use the filter to narrow the list down to what you are looking for.
Type 'Primitive' into the filter box
This will filter the list of nodes to the basic primitive shapes.
Select the 'RenderPrimitiveBox' and click the 'OK' button
You will now be prompted for a name. For this model the name isn't important. In more complex documents other node can reference each other by name.
Type in a name and click 'OK'
You will also be prompted to assign the box to a bone. There are no bones in this document. Simply select 'None' and click 'OK'.
== Move and resize the box ==
After creating the box, it will show up in the outliner and will be selected.
Because the box is selected, it will have manipulators visible in the viewport. 
Click and drag the manipulators to resize the box
Additionally because the box is selected, its properties will be displayed in the Node Editor.
You can use the Node editor to change the material assigned to the box, adjust uv mapping, or to type in exact dimensions.
In this case the box has been adjusted to be 32 x 32 x 32, where it was originally 10 x 10 x 10
== Save and compile the model ==
As soon as you made changes to the document, the compile status button should have highlighted and changed to 'Needs Compiling'. This indicates that the document has changes that have not yet been compiled into the final model.
Click on the 'Needs Compiling' button
This will prompt you to save the file. Choose a filename and save the file.
Note that the name you choose for your model here will be the one you use to find it in the asset browser.
== Place your model in a map ==
Now that you have compiled the model, it should appear in the asset browser, and can easily be added to a map.
Open Hammer from the asset browser
Create a new document by selecting File > New
If you have Hammer in the default configuration, the lower right panel should contain an asset browser view.
Select the models tab and type in the name you gave your model in the previous step
You can now place one or more instances of your model in the map simply by dragging it into the 3d viewport
Category: Half-Life: Alyx Workshop Tools
Half-Life: Alyx Workshop Tools/Modeling/Breakable Props

== Create a Physics Prop ==
Start by creating a simple box physics prop out of primitives.
This tutorial uses primitive shapes for rendering and physics, but references to mesh files (.fbx, .dmx) can be directly substituted. Import filters make it easy to create a single FBX file that contains many mesh parts that can then be referenced by separate breakpieces.
* Add RenderPrimitiveBox and PhysicsShapeBox nodes with origin (0,0,8) and dimensions (16,16,16)
* Apply the 'prop.wood_box' surface property to the physics box
* Add a prop_data node to indicate that this model is intended to be used as a physics prop.
* Now use the ModelDoc game preview to verify that you can spawn the model as a prop_physics and move it around
== Add a BreakPiece ==
* First edit the prop_data to specify a health - this will allow the prop to take damage and break if it has any breakpices:
* Add a BreakPieceEmbedded node - this node will contain everything required to have a simple breakpiece without authoring it as a separate model.
* Under the BreakPieceEmbedded node, add a RenderPrimitiveBox and PhysicsShapeBox with origin (0,4,8) and dimension (15,7,15) - you can do this by copy-pasting the boxes you created earlier.
* For clarity assign the renderbox the primary_red.vmat material so it's very clear when the object breaks.
Each BreakPieceEmbedded node is effectively a small embedded sub-document that can contain most nodes. (NOTE: Due to a limitation in the editor it may warn about some nodes but most will work just fine.) When the parent model compiles, each BreakPieceEmbedded will be extracted and compiled into a separate vmdl_c that is then referenced by the parent model's break info.
== Add a Second BreakPiece ==
Breaking something isn't very interesting if it only breaks into a single piece. Right-click your BreakPiece and select "duplicate" then change the origin of the new boxes to (0,-4,8)
We made breakpieces slightly smaller than the original box in order to guarantee that they don't overlap when they're spawned. The physics engine is fairly resilient in the face of overlapping objects, but it's always better to avoid when possible!
== Test Your Breakable ==
Use the game preview to spawn a prop_physics and use the shoot tool to verify that it takes damage and breaks as expected. Congratulations, you've made your first breakable model!
Half-Life: Alyx Workshop Tools/Modeling/Common ModelDoc Nodes

ModelDoc uses a node-based system for putting together models, but maybe not in the way you'd think. Nodes are stored in the Outliner, which is organized by Categories, each with their own unique settings and properties that are worth taking a once over.
If you want to take a look at every available node, simply right-click the outliner in the ModelDoc editor and click Add. You can also view Node Categories, which also have their own unique settings. To utilize ModelDoc to it's fullest capabilities, it's important for you to understand what it can do. Here is a couple example Nodes that might prove useful to you.
== Common Nodes ==
=== "Add..." Nodes ===
These Nodes are simple ways to add commonly used functions, like meshes, animations, cloth, and gibs (break pieces.) They do nothing different other than provide an easy way to access these functions at the top of the list.
=== RenderMeshFile ===
Adds a mesh to your model. Will also import the skeleton
=== AnimFile ===
Adds an animation by using a file. This file can be a DMX, SMD, or FBX.
=== EmptyAnim ===
Adds a blank reference animation. Can be useful for making sequence blends, or if you're trying to quickly import a model that needs morphs to work (morphs require a material with "Morphs Supported" ticked on and an animation file alongside the mesh.)
=== GenericGameData ===
Adds certain nodes that seem to correspond with specific games/projects. Some important things exclusive to HLVR are in here, like AO proxies or handpose data.
== Common Categories ==
=== RenderMeshList ===
Stores all our RenderMeshFiles. No properties.
=== PhysicsShapeList ===
Stores PhysicsShapes. Used for collisions (available nodes: Capsule, Sphere, Box, and Mesh File)
=== PhysicsJointList ===
Stores PhysicsJoints. Used for setting up joints for ragdolls and restricting/allowing certain movements.
=== BoneMarkupList ===
If your model imports with no skinning on certain bones, the model will by default cull these bones. It's important to go to this category and set "Bone Cull Type" from Aggressive to "None."
Half-Life: Alyx Workshop Tools/Modeling/Model Creation

All Half-Life: Alyx models start from meshes. These can be authored in two ways: From a pre-existing mesh file created in external 3D software, or alternatively, a mesh made wholly within Hammer and exported as a model.
== Creating a model ==
There are two separate ways you can create a model using the applications present in the Half-Life: Alyx Workshop Tools.
=== From an existing mesh ===
To create a model using an existing mesh made with in an external program:
# Launch ModelDoc Editor if it is not already open.
# Select the yellow star button.
# Select "Add Meshes..."
# From the window that opens, navigate to, and open a mesh that is within your addon's content folder. It should be placed in your addon content's "models" folder. If you do not have one, create it.
=== From Hammer ===
Hammer can be used to create models without the use of third-party software. Simply create something that you wish to make a model out of, and do the following:
# Select the meshes you wish to create a model from
# Right click on them
# From the context menu, select "Selected Objects" > Create Model From Selection
# From the save dialog, save it somewhere in your "models" folder in the content folder for your addon.
Half-Life: Alyx Workshop Tools/Modeling/Model Troubleshooting

ModelDoc is a very powerful, but incredibly mysterious beast. And it has some weird quirks that probably make a lot of sense for how Valve's models work, but maybe aren't normal to us modders. So here's some quick troubleshooting steps if you're having issues with certain features.
==Basic ModelDoc Function==
As a refresher, ModelDoc uses a node-based system for putting together models, but maybe not in the way you'd think. Nodes are stored in the Outliner, which is organized by Categories, each with their own unique settings and properties that are worth taking a once over.
To preview your model as you're working on it, you have to manually compile it, using the button.
To add a mesh to your model, you will need to right click the Outliner, and add a Mesh Node to your model. This can be done by either finding the desired mesh node (usually RenderMeshFile) or more easily, clicking the "Add Meshes..." button which does the same thing.
Now, click the "Compile Model" button and your model should render! Usually though, your model won't spawn with its textures, as it'll look for materials that aren't there. To override your materials from the FBX file, add a new node called "DefaultMaterialGroup" which will override your default materials.
==Making Morphs/Flexes Work==
By default, morphs (or shapekeys) will not appear to work in the ModelDoc editor. Morphs can be imported using .FBX or .DMX, ideally the latter if you can because .DMX retains more data. For models with morphs, Valve requires three things:
* A Mesh with Morphs
* A Material with "Morphs Supported" ticked on
* An Animation
To accomplish this, the best way to go about it is to set up your model with a DefaultMaterialGroup node, directed to a material with morphs enabled. Then, give it an EmptyAnim node, so it has some animation. Now, morphs will work.
You can technically preview your morphs using the Morph Explorer in ModelDoc, but it requires you to recompile every time you adjust them. This seems to be a glitch, as the ol' Model Editor didn't have this requirement.
==Missing Bones/Joints on Import==
If you're missing bones on import, don't fret. Valve has a weird default setting on ModelDoc that will aggressively cull bones that have no skinning. You can disable this by, in the outliner, selecting "Show Empty Categories" then selecting BoneMarkupList near the bottom. Select "Bone Cull Type" to be "None", or "Leaf" if you prefer and your favorite modeling software exports them against your wishes.
==See also==
* Model Creation
* ModelDoc Editor
* Common ModelDoc Nodes
Half-Life: Alyx Workshop Tools/Modeling/Simple Static Prop

This tutorial demonstrates how to create a simple static prop from an existing .fbx or .dmx. Static props are models which are used decorate a level, they have no gameplay functionality and cannot be moved, but they may have collision.
== Select the static prop archetype ==
From the Archetype drop down at the top of the outliner, select Static Prop Model.
Selecting a model archetype isn't required, but it allows the editor to provide error checking relevant to the specific model type.
== Add a reference to a mesh file ==
Click the add button, select the RenderMeshFile node and click OK.
Use the open file dialog to select your input mesh file (fbx or dmx).
If needed, adjust the scale of the model using the Import Scale property in the node editor.
If your model wasn't built at the correct scale or units you may need to adjust the scale of the model to compensate.
You should now see the model in the 3d viewport.
== Add a physics representation ==
Your model is usable as is, but it will have no collision and the player will be able to pass through it.
To add a physics representation to your mesh click Add and select the PhysicsMeshFile node.
Use the open file dialog to select your input mesh file (fbx or dmx).
Note that the file can be the same file as your render mesh. However, for performance this is not recommended, it is much better to create a low resolution version of your mesh to use for collision.
As with your render mesh, you may need to adjust the import scale.
You should now have a preview of your physics mesh. Since we didn't select a specifically authored physics mesh in this case, the result is more complex than ideal. In the next step we will simplify the mesh.
== Simplify the physics representation ==
If you didn't build a custom physics mesh you can simplify the mesh directly in ModelDoc.
Adjust the Simplify and Max Vertices Per Mesh parameter to reduce the triangle count of the physics mesh..
As you adjust the parameter the Shape info in the upper right will show the current number of vertices.
The Simplify parameter will attempt to reduce the mesh in a way that doesn't change the overall shape, while the Max Vertices will put a hard limit on the vertex count but may dramatically change the shape.
The results here are still not ideal. If you cannot get good results with the automatic simplification you can either author a simpler input mesh, or use other physics node types to specify the physics for your model.
* See the Physics Prop and Jointed Physics Prop tutorials for examples of other methods of creating physics shapes.
== Compile Your Model ==
Press the Needs Compiling button to compile your model.
This will prompt you to save your model if you haven't already.
Your model should now show up in the asset browser and can be placed as prop_static entity in Hammer.
Half-Life: Alyx Workshop Tools/Postprocessing

__TOC__
Source 2 allows for a variety of postprocessing settings you can adjust:
* Tone mapping / camera exposure
* Color correction
* Bloom
* Screen blur
* Custom look up tables
These postprocessing settings are created with the Postprocessing Editor and placed in Hammer using post_processing_volume entities. A .vpost file stores these settings.
= Using post processing in Hammer =
Postprocessing settings are placed in a map using volumes. You can create a volume by creating a mesh with the Block tool and tying it to the post_processing_volume entity. This automatically assigns the "tools_post_processing" material.
== Master Volume ==
To set up post processing settings that affect the entire level, you can create a volume and set it to master:
A master volume can be any shape or size, so in the example maps you will usually find a small one somewhere.
The master volume will take effect until the player enters another volume. When the player exits a volume, the post processing settings will change back to the master volume.
== Exposure Control ==
In the volume properties, there are settings to control the range of camera exposure, and exposure speed controls. Having a wide range will allow for the largest variety of lighting situations, but will also cause the largest amount of brightness fluctuation depending on the scenario.
The exposure range of the active volume will be reflected in Hammer's tone map scale foldout menu. You can use this to test how different exposure values work in your map.
When working on lighting, it's recommended to override the scale to a good middle value (often this is just 1.0), so the exposure doesn't change as you are adjusting lights.
A starting range of 0.5 to 2.0 works for most situations in VR.
== Editing resource files ==
The Postprocessing Editor is used to edit .vpost files and give control beyond exposure.
By sharing the same post processing resource between different volumes you can maintain a consistent look in your level.
== Summary ==
Post processing volumes give a lot of control to the look and feel of a map and can be used to set the exposure to look just right in specific areas.
Nice transitions can be built between interior and exteriors, and get even more granular by nesting volumes inside each other.
== Sample map ==
* workshop_examples/postprocessvolume_example.vmap
Half-Life: Alyx Workshop Tools/Source Filmmaker

__NOTOC__
==Getting Started==
* Getting Started
* Source 2 Filmmaker Theory
* Changes in Source 2 SFM
* Source 2 SFM FAQs
* Source 1 Filmmaker Wiki
==Lighting==
* Lighting Fixes and Crashes
* Working with Source 2 Volumetrics
==Workshop==
* Extracting Assets From The Workshop
==Advanced==
* Using In-Engine Constraints
* Porting Source 1 Content to Source 2
Category:Source Filmmaker
Half-Life: Alyx Workshop Tools/Source Filmmaker/Extracting Assets From The Workshop

When you install an asset from the workshop, you might find that it doesn't show up in your Source Filmmaker addon. Not to worry, you can still find these assets, but it's going to take a lil' bit of effort.
== Requirements ==
* GCFScape
== Instructions for Models and Materials ==
# Download the addon from the workshop. Make sure to note the addon ID, located in the URL.
# Once it is fully downloaded, it will be in your workshop folder for HL:A; i.e. C:/Steam/steamapps/workshop/content/546560/addon_id
# Inside the addon ID folder, you will find a .vpk file. Open this .vpk with GCFScape.
# Drag the folders (models, materials, etc.) to your personal addon folder (inside game/hlvr_addons/addon_name.)
Your models should now be accessible by SFM, Hammer, and all the other Source 2 tools.
== Instructions for Maps ==
# Download the addon from the workshop. Make sure to note the addon ID, located in the URL.
# Once it is fully downloaded, it will be in your workshop folder for HL:A; i.e. C:/Steam/steamapps/workshop/content/546560/addon_id
# There will be a .vpk in there. The .vpk is your map file that you will want to drag to your personal addon folder.
Your maps are now available in SFM2.
Category:Source_Filmmaker
Half-Life: Alyx Workshop Tools/Source Filmmaker/Using In-Engine Constraints

==Imported objects==
In Source 2 Filmmaker when an asset is ported from source 1 there is a chance it looses its rigging, before you start open modeldoc and check that the bones on the model are where they are meant to be.
==Exporting mp4==
With most versions of Source Filmmaker exporting to mp4 for any amount of time longer than 30 seconds may cause graphical glitches, it best that instead you export it as an image slideshow and put them together via belder or other video editing software.
Half-Life: Alyx Workshop Tools/Source Filmmaker/Working With Volumetrics

While volumetrics can still be enabled using old SFM Projected Lights in the classic way, (see previous article discussing Game/SFM lights here) Half-Life Alyx introduces new volumetric effects from the new PBR lights. However, some extra steps need to be taken in order to enable them.
== Prerequisites ==
To utilize volumetric lights, you either have to use a map that already has them enabled (all Half-Life Alyx maps have fog volumes enabled in a lot of locations) or you must enable volumetrics in your own custom map by placing an env_volumetric_fog_controller entity. More info on this can be found in the Level Design documents.
Much like the new Physically Based shader in Source 2, the volumetrics system is also physically based around volumes, hence why it's a per-map decision rather than available on a per-light basis.
== Tips ==
Volumetric Fog is supported on Ortho, Point, and Spot lights.
By default, spawning a light will instantly cast full-strength volumetric fog if the map has an env_volumetric_fog_controller, and the light is within the fog volume.
You can disable, or adjust the strength of the volumetrics by adjusting the "fogContributionStrength" slider on any light.
The new Source 2 volumetric lights have a finite range (due to VR performance reasons) and will fade out over a fairly short distance. This means volumetric fog is not great for larger scenebuilds or exterior environments. In these cases where the light needs to be further from the camera, it's recommended to use a Projected Light with Volumetrics enabled, and add fog to the scene the same as in Source 1.
Because of the way the fog reacts to lights, having the fogcontributionStrength set too high / max will often completely blow out the colour and cause a washed out / white look to the light. It's often recommended to lower either the fog strength on the light, or the light intensity itself to preserve the colour and detail of the volumetric fog.
== See also ==
* Working with Lighting (Source 1)
* Fixing Game Lighting (Source 2)
Category:Source_Filmmaker