nyuuzyou/wikis huggingface dataset:
Source 2/Docs/Level Design

Welcome to Source 2 Level Editing.
This page contains articles relating specifically to level design for .
== Getting started with ==
* Navigation
* Hammer Overview
* Basic Construction
* Creating Your First Room
* Prefabs and Instances
* Mesh Entities
* Lighting
* Visibility
* Addon Sounds
* 3D Skybox Creation
* Import Tool Documentation
* Post-Import Cleanup
* Hotspot Texturing
* Light Cookies
* SmartProps
* Compiles and Post-Compile Cleanup
== Working with Legacy ==
* Maps Workshop - Port maps and assets over to .
** Import Tool Documentation - Import the contents of the Source 1 map using a Python script.
** Post Import Fixup steps
== General ==
* Entity List
== Other Engines ==
* GoldSrc Level Creation
* Source Level Creation
== Specific Games ==
: Dota 2
: Half-Life: Alyx
: SteamVR Home
: S&box (coming soon)
: Counter-Strike 2
__NOTOC__
Category:Source 2
Source 2/Docs/Level Design/Basic Construction

Geometry construction in has undergone a significant improvement from the previous iteration (). Brushes are no longer used and there is no longer a distinction when rendering static props versus mesh geometry. It is still possible to construct geometry in a similar fashion as before but new geometry manipulation tools make this somewhat inefficient compared to new methods.
* Mesh Editing 1 - Introduction to the basics of mesh editing.
* Mesh Editing 2 - Creating an arch, sewing meshes together, bridge tool, and face cut tool.
* Mesh Editing 3 - Creating a tunnel and introducing the pivot tool.
* Mesh Editing 4 - Local space axes and using the work plane.
* Mesh Texturing Basics - Texturing
Next: Creating Your First Room
Category:Level Design/Source 2
Source 2/Docs/Level Design/Basic Construction/Mesh Texturing

__TOC__Texturing in Hammer is similar to previous iterations of Hammer except that it has a few more methods to apply textures due to the change in how geometry can be generated.
== Basic Texturing ==
thumb|right|300px| 
With some geometry created, click Browse on the Active Material pane located in the bottom left by default. It likely is currently still set to the default developer material. Type "reflect" and several shades of grey materials will show up. Selecting one of them will move it to the Active Material pane.
Switch to Faces mode and right-click on any of surfaces you want to apply the active material. To change scaling, rotation and so on, use the Align, Scale, Shift, Rotate, Fit and Justify buttons in the Face Editing tab. Select the appropriate faces and click a button to make changes.
To transfer the UVs from an existing face to a new face use and the texture along with the alignment will be transferred to the new face.
== Maintaining Texture Alignment ==
Added to Hammer are new forms of texture lock which are accessible through buttons to the right of the toolbar at the top. These can allow some advanced manipulations.
=== Texture Lock ===
thumb|right|300px| 
With this mode active and Translate meshes around in the Meshes, Objects or Groups selection modes, and texture alignment will be maintained. Disabled, texture alignment will not be maintained. Potentially useful if you're duplicating, say, chunks of brick wall or cliff face and you don't want the same texture alignment to appear in each segment.
=== Texture Lock Scale ===
thumb|right|300px| 
When active and Scale meshes up and down in the Meshes, Objects or Groups selection modes, and again texture alignment will be maintained. As before, texture alignment will not be maintained when disabled - of use if scaling a section of wall and you don't want textures to be stretched.
=== Texture Lock Component Manipulations ===
thumb|right|300px| 
In any selection mode, texture alignment will be maintained on faces - it locks the underlying UV representation so that you can significantly deform the mesh and still have it attempt to keep the same texture alignment.
For example if texturing a bent or destroyed object - start with a correctly-textured undamaged version, switch on Texture lock component manipulations, then move vertices, edges and faces around to introduce some bends. If you're not careful, you can cause some serious texture-stretching.
== UV Peel ==
thumb|right|300px|Before UV Peel 
thumb|right|300px|After UV Peel 
Useful for texturing around curvy arbitrarily-shaped meshes such as arches or road surfaces is the UV peel mode.
In the Edges selection mode, at the bottom of the Tool Properties tab is the UV peel section. Select World Space to keep texture scaling and repetition relative to the world, select an edge loop that spans the length of the curve, then click the UV Peel button. The active texture should now "flow" around your mesh, maintaining alignment at all points.
Next: Creating Your First Room
Source 2/Docs/Level Design/Mesh Entities

A mesh entity is a mesh that's been turned into an entity. These are commonly used to make things like trigger regions.
== Mesh Entity Tutorial ==
This tutorial assumes you've already created a map, if not, follow the tile editor introduction to set up a map.
To make a mesh entity, create a block using the Block Tool and then go to Tools > Tie To Entity, or use +. This will convert the mesh into an entity. The default entity will be .
With the new mesh entity selected, the Object Properties pane now shows an entity class has been assigned to it. It will default to whichever entity class is set to default in your options, but you can change the class type at any time.
Change it to a secret shop region. To this, change the entity class to and hit to confirm the entity class change. Next scroll to the bottom of the entity's property fields and change its Shop Type to "Secret" using the drop-down menu.
Since your mesh is a trigger, you should apply a trigger material to it, because you want the mesh to be invisible and not collide with anything. In the Active Material pane, click Browse and type "trigger" in the filter field at the top. The material you're looking for is called . Double-click to make it your active material, then apply it to your selected mesh with +.
Switch to Translate mode with and drag your mesh to the location that your player spawns in -- if you haven't manually added an entity, the playerstart location will simply be the location of your basic_entities prefab (which contains playerstart entities for both the Radiant and Dire). Build your map with and then run it in-game. When you select a hero and spawn in, you'll be in the radius of the invisible secret shop trigger you created. Pressing the shop key will allow you to buy secret shop items.
Source 2/Docs/Level Design/Navigation

== 3D Viewport ==
There are various methods to navigate in Hammer's 3D viewport.
=== Right-Mouse-Button WASD Toggle ===
Hold right-mouse-button to swivel the camera around and use WASD to move.
	
	Swivel the camera around
	Move the camera forward
	Move the camera back
	Moves the camera left
	Moves the camera right
=== Fly Mode ===
Pressing enters "fly" mode without the requirement of holding the right-mouse-button. WASD is still used to control movement.
=== Navigation Around a Point ===
This method is useful when working on a piece of geometry that you want to focus on and move around rapidly.
	
	Rotate around the center of the screen
	Reset the center point on selected geometry
	Zoom
	Camera look movement
== Active Viewport ==
In previous iterations of Hammer, the active viewport was determined by your current cursor position. This has changed. The active viewport in Hammer is now shown by a red bounding box around the active viewport. To change the active viewport, you must hover over it with your cursor and press one of the mouse buttons. It's recommended to press-and-drag or press to change the active viewport since can deselect or select different objects.
== 2D Viewports ==
* - Hold down to pan in a 2D viewport
* - Zooms in/out
* - Cycle between Top, Front, and Side 2D views
* - Top 2D view
* - Front 2D view
* - Side 2D view
Next: Hammer Overview
Category:Level Design/Source 2
Source 2/Docs/Level Design/Visibility/Load Compiled Vis Data

You can import the result of the visibility compile step in Hammer. This is useful when trying to improve the visibility generated for a level by placing visblocker surfaces or visibility hint entities.
== Loading the visibility data ==
To view the visibility for a map, you must first have compiled the map with visibility. Once that has been done you can load the viability data into Hammer from the menu: Map → Load Compiled Vis Data
This will create a "Compiled Vis Data" object with a number "Vis Cluster" child objects. Each Vis Cluster represents a volume of space for which the the visibility has been computed. The visibility is defined as the set of other clusters which can be seen from that cluster. They can be viewed and selected in the Outliner pane.
Note: the Compiled Vis Data and child Vis Cluster are temporary objects and are not saved with the map. 
== Viewing visibility ==
The clusters are displayed in the 3d view and can be selected in the 3d view or from the Outliner.
When a cluster is selected it will be highlighted in yellow. All of the clusters that can be seen from the selected cluster are outlined in blue.
You can expand the selection to include the clusters visible to the currently selected cluster by using the [ + ] key.
Vis Clusters are normal objects and can be hidden or deleted just like other objects. This can be useful when trying to narrow down on an issue with a specific cluster.
There is a Visibility Data entry under the Auto selection set which can be used to quickly hide all of the Vis Clusters.
== Viewing lines of sight between clusters ==
If you have built the map, in addition to loading the vis cluster data, the lines of sight data will be loaded from the *.los file. 
When lines of sight data is available, selecting two clusters will display the lines of sight causing them to be visible to each other, drawn as green lines.
Category: Half-Life: Alyx Workshop Tools
Source 2/Docs/Porting Legacy Content

models, materials, maps, and all of it's content is completely different to how handles the same files. These files are now unsupported, but with some built-in tools and some know-how, you can learn to import content to .
== Some Context and Preamble ==
 uses new file formats for it's content. Maps are now instead of , materials are now instead of , models are now instead of . See the pattern yet? Almost every file used in is now some form of . Some of them haven't changed much, like files are just old-school files from renamed. But what is unique about these files is that for models, maps, materials, sounds, etc. they all use a compiled version of said file.
Take for instance the .vmat file. If you open a .vmat file inside of your 'Half-Life Alyx/content' directory, it will be in plain-text and can be edited. However, find that same material in 'Half-Life Alyx/game' and it will become a file. Think of as just a plain-text version of , which is the real material file loaded by the engine. So, if you're making new content or have the sources of the content, you should probably just convert your content using the regular paths, as it's much easier to retain your ideal look with the new GUI tools offers.
== Guides For Converting Content ==
The Counter-Strike 2 Workshop Tools come bundled with a map importing script, which uses various tools behind the scenes to import legacy content.
Source2Converter builds off of SourceIO and allows mass porting for models and their textures. 
* REDxEYE's Source2Converter
You can also port from Source 1 using these methods 
* Importing .MDL Files
* Converting .VMT to .VMAT Files
* Importing .VMF Files
If you'd like to port over your own content to , modeling and material creation guides are here:
* Modeling and Using ModelDoc
* Materials in Dota 2 (still applicable to HL:A)
Category:Source 2
Source 2/Docs/Porting Legacy Content/Materials

== Prerequisites ==
VTFEdit https://valvedev.info/tools/vtfedit/
== Exporting From Source 1 ==
Open VTFEdit.
Find the material you want to port to Source 2 (will be in source 1's .Vtf format).
Open it in VTFEdit (by file open, or by dragging it onto VTFEdits window)
Export to .Tga to your Source 2 Materals Folder.
== Importing Into Source 2 == 
Open The Material Editor.
Create new materal.
Save with name of the wanted material.
Apply the .Tga format to the color field (also any normal or bump maps you also exported for that texture)
save
Now you have your Source 1 material in Source 2
Category:Source 2
Category:Tutorials
Source 2004

is the original build of the engine that , and shipped with. It was succeeded by the engine branch with the release of . 
No current Valve titles hosted on Steam use this particular engine branch, as it is outdated.
 still runs on a custom version of the engine, similar to the engine used in the Half-Life 2 Beta leak. However, it uses a proprietary texture format, for scripting and BSP version 17, and support Bink videos.
 also likely used the last? build of Source 2004, or possibly an early version of the Source 2006 branch previously used by , combined with Source 2004 code, which contains few commands related to the HDR Rendering which was non-functional ("mat_hdr_enabled").
The engine versions for this branch are up to ().
== Features ==
;Support for game console
;Steam Friends & Parlor Games menu (removed in later version of in 2009)
;Shader Model 2.0 only
;Anti-aliasing
:Up to 6x MSAA. 8x MSAA unofficially supported through , but will reset to 4X on next launch. MSAA 8X can be also forced through GPU drivers control panel.
:6x MSAA does not work on modern graphics card. Only 4x works.
;DirectX 9.0
:Uses Direct3D 9.0, with support for these hardware levels:
:DirectX 6.0 () level (not officially supported, but works)
:DirectX 7.0 () level
:DirectX 8.0 () level
:DirectX 8.1 () level
:DirectX 9.0 () level
; Inputs
:Support DirectInput controller only
== Availability ==
Source code for this branch is no longer officially available. Most Valve games introduced with are now currently using or .
An archive of the 2004 SDK is available on GitHub.
== Usage ==
The following games are still based on, or currently using .
=== Valve ===
* 
=== Third-Party ===
* (Beta version)
* 
== System Requirements ==
Minimum Specs :
*OS: Windows 98 / ME, 2000, XP or later
*CPU: 1.2 GHz 
*RAM: 256 MB 
*Nvidia GeForce FX 5700, ATI Radeon 9500 (with 128MB VRAM)
*Direct3D 9.0 compatible video card (with atleast DirectX 6.0 compatibility level or higher)
Category:Official Engine Branches
Source 2 Animation System VScript API/CModelVScriptCompile.CreateIKChain

== Function Description ==
 int CModelVScriptCompile::CreateSequence(string chainName, string end_bone, table parameters) 
Creates an Inverse Kinematics chain, similar to the $ikchain QC command. The function only seems be available in run-time animation VScripts. Several IK solvers seem to be available, including Ken Perlin's two bone solver and the FABRIK solver.
== Parameters ==
Type 	Name 	Description
string	chainName 	Name to refer to the chain by.
table 	parameters	IK chain parameters (see below).
== Returns ==
int - Index of the IK chain.
== Sequence Parameters ==
The parameters are added as keys in the parameters table. 
Name 	Type 	Description
bones_point_along_positive_x	boolean	
constraints 	array 	List of IK constraints. Syntax: { { < type = "$" >, ... }, ... }
ik_root_bone 	string 	Name of the first bone in the IK chain. Required.
ik_end_effector_bone 	string 	The end bone in the IK chain. Required.
ik_end_effector_target_bone 	string 	
rules 	array 	List of IK rules. Syntax: { { < type = "$" >, ... }, ... }
solverInfo 	array 	Solver configuration. Possible syntax: { < type = [ "perlin" / "fabrik" / "maya_two_bone" ] > }
lockInfo 	array 	Possible Syntax: { boneInfluenceDriver = "$", reverseFootLockBone = "$", lockBoneInfluenceDriver = "$", maxLockDistanceToTarget = #, hyperExtensionReleaseThreshold = #}
=== IK Rules ===
IK rules in the rules array.
Name 	Syntax 	Description
ground 	{ rule = "ground", trace_diameter = #, height = # } 	Attempts to place the end bone on the ground.
touch 	{ rule = "touch"} 	
procedural_target	{ rule = "procedural_target", name = "$", bone= "$" }	Attempts to set the end bones position and orientation to values supplied by code. A VScript method for the CBaseAnimating class exists to control this.
=== IK Constraints ===
IK constraints in the constraints array.
Name 	Syntax 	Description
hinge	{ type = "hinge", joint="$", min_angle = #, max_angle = # }	
Category:Scripting
Source 2 Animation System VScript API/CModelVScriptCompile.CreateIKControlRig

== Function Description ==
 int CModelVScriptCompile::CreateIKControlRig(string type, table parameters) 
Creates an Inverse Kinematics rig out of a set of IK chains.
== Parameters ==
Type 	Name 	Description
string	type 	Type of the rig. Two types are known, "biped" and "bug".
table 	parameters	IK rig parameters (see below).
== Returns ==
int - Index of the IK rig.
== Biped Parameters ==
When the type is set to "biped", a bipedal leg rig is created, suitable for humans and similar creatures. The parameters are added as keys in the parameters table.
Name 	Type 	Description
pelvisBoneName 	string 	
tiltBone 	string 	
maxCenterOfMassDifference	unknown	
leftFootChain 	string 	Name of the left foot IK chain.
rightFootChain 	string 	Name of the right foot IK chain.
== Bug Parameters ==
The "bug" type creates a rig for insect legs. The parameters are added as keys in the parameters table.
Name 	Type 	Description
legs 	array of strings	Names of all the IK chains for the individual legs.
pivot_bone 	string 	
pivot_influence	float 	
Category:Scripting
Source 2 Filmmaker/FAQ

== S2FM - Frequently Asked Questions ==
; Can I import my standalone SFM session into the S2FM?
: There is no straightforward path for migrating sessions between different versions of the SFM. The standalone SFM and Source 2 version of SFM are built on different versions of the engine, and all asset types have changed significantly. Exporting animation between versions of the SFM should be possible, however.
; Should I switch from the standalone SFM to the S2FM?
: If you're starting a new Dota short for example, then you will most likely find the S2FM easier and faster than the standalone SFM. If you're creating a short in any other universe, you will likely find the standalone SFM better suits your needs. If you're in the middle of creating a Dota short in the standalone SFM, then you'll have to decide whether it's worth switching, but remember that you'll have to recreate much of your short from scratch in S2FM, since there is no straighforward migration path.
; Will the Source 2 Filmmaker replace the standalone SFM?
: No. The Source 2 Filmmaker will stay in all Source 2 games, alongside Hammer, the Particle Editor, and the other tools. There are currently no plans for it to ship as a separate application, and it will not replace the existing standalone SFM application.
; I've found a bug, how do I report it?
: You can post bugs to the SFM Discussion Forum, or the GitHub Issues page (for only). The SFM Team reads both of those forums for common problems and suggestions. Please include screenshots and reproduction steps as appropriate, so the team can find and fix your problem. In addition, community members may know of workarounds to your problem.
; Where can I find the release notes for ongoing updates?
: While the new Dota 2 and SFM are in beta (aka the Reborn update), release notes for day to day updates will be here: http://www.dota2.com/reborn/updates
; How do I add and use custom sounds?
: You can put your custom mp3 and wav files under your content directory, and they'll be automatically compiled into vsnd files under your game directory. It'll look something like this: D:\Steam\steamapps\common\dota 2 beta\content\dota_addons\MY_ADDON_NAME\sounds\MY_SOUNDS\MY_SOUND_FILE.wav
; How do I select transform controls under the transform manipulator?
: In general, the easiest way is to press Q to switch to selection mode, which hides the transform manipulator, select the control and then press W (or E or R) to return to translation mode. (or rotation mode or screen mode) In many cases, you don't need to switch modes, and you can simply start a drag selection just outside the manipulator, (which hides the manipulator), and you can drag select around the control.
Category:Source Filmmaker
Category:Source 2 Filmmaker
Category:FAQ
Source 2 General Discoveries

__NOTOC__
== What is this? ==
This is a page for brand new discoveries made in the Source 2 Engine that aren't ready to have their own dedicated Wiki page yet, but are useful for archiving weird functionalities with Source 2, just so the main pages aren't cluttered up with messy/unorganized information.
==Models and Materials ==
* S2General/Converting Source 1 Models to Source 2
==VScripts and Scripting==
*Half-Life Alyx Scripting API
==Hammer 2 Editor ==
* S2General/Importing .VMF Files to Source 2
* Installing Source 2 Bootleg Tools for Aperture Desk Job
==Other/Not Categorized==
* S2General/Importing VCDs to Source 2
==Source 2 Wiki Pages==
* Source 2
* Dota 2 Workshop Tools
* SteamVR/Environments
==External Resources==
* Source 2 Research Center Discord
* Half-Life: Alyx Unofficial SDK
* Half-Life: Alyx -novr/-dev Patch
Category:Source 2
Source 2 Material Editor

An overview of the layout of the in the .
== 1. File Menu ==
; File
* Common file operations such as New, Open, Save, Close, etc.
* Force Compile To Disk - Most operations will automatically recompile the material on a change but this allows a compile to be done on command.
; Tools
* Options for tool usage.
; View
* Controls various panel visibility options. Some panels are initially hidden by default.
; Help
== 2. Hosted Materials ==
The list of hosted materials in the editor. 
* This panel supports extended selections, with a right-click context menu for common batched file operations (i.e. Save, Close, etc)
* This panel is a material or model drop target. Materials can be dragged/dropped here from the Asset Browser. A dropped model will be decomposed into its dependent materials.
== 3. Shader Features ==
This panel contains the supported features for the material's current shader.
* Disabled feature options display their enable requirements via tooltip triggered by mouse hover. The options will enable when their requirements are satisfied.
* Enabled features determine the availability of a material's variables.
== 4. Material Variables ==
Options for various material variables. The panel will update depending on what shader and what shader features have been selected.
* The title bars represent a variable grouping. Clicking on the title bar can collapse or expand a group.
* The title bar menu provides variable actions restricted to that group.
* A variable can be reset to it's default by selecting the drop down caret and choosing "Reset To Default".
* Some variable's provide help notes. Clicking on a variable's name while underlined will pop up contextual help.
== 5. Material Preview ==
Rendering preview of the currently selected material. The common view manipulation controls affect this panel.
=== Navigation ===
; Camera Movement
* +
* 
; Center Model
* 
* If the material fails to preview due to a compilation error, the "Log" Tab will show the failure information. The preview will not be available until compilation succeeds. Common compilation errors are due to bad image file paths or image files not found (as specified by the various material's texture variables).
== 6. History Capture ==
Provides a snapshot as editing changes are made. Selecting a different snapshot will put the material back to that snapped state. This provides a rapid method for comparing across changes.
* Captures can be marked as "Favorite" and annotated as necessary.
* Favorite captures are saved into the material as a means to recover important material recipes or experiments.
Category:Tools
Category:Official Tools
Category:Official Source 2 Tools