Category:Material System: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (begun a proper introduction - still needs work - please don't delete stuff)
m (Nesciuse moved page Category:Material System/en to Category:Material System without leaving a redirect: Move en subpage to basepage)
 
(45 intermediate revisions by 17 users not shown)
Line 1: Line 1:
In the Source Material System, the visible ''Surface'' of a Brush, Model, Sprite, etc. is defined by it's '''Valve ''Material'' Type''' ([[VMT]]) file. Breakable physics prop models also derive some additional material properties from their [[Prop Data]] configuration.
{{LanguageBar}}
__NOTOC__


Generally a '''Brush Material''' is a [[VMT]] designed for use with World Brushes (stored in <code>game_dir/materials/</code>), and a '''Skin''' is a [[VMT]] designed to be mapped onto a particular Model (stored in <code>game_dir/materials/models</code>). A '''Texture''' is a [[VTF]] file, used by either a ''Brush Material'' or a ''Skin'' - but rarely both. Usually VTFs are stored in the same folder as the VMTs that use them.
{{category header|background-color=#E0E0E0|border-color=lightgray}}
{{category newcolumn|rowspan=6|width=50%|background-color=#F7F7F7|border-color=lightgray}}


* Each [[VMT]] file defines which [[Shader]] and [[Shader Parameters]] to use to render the textures, which [[VTF]] textures to use to 'paint the polygons', and a number of surface collision effects such as the sounds and decals to use when bullet hits the surface.
== Terms ==
* [[VMT|Valve Material Type]] (<code>.vmt</code>)
* [[Valve Texture Format]] (<code>.vtf</code>)
* [[Half-Life Wads]] (<code>.wad</code>)
* [[VMAT|Source 2 Vmats]] (<code>.vmat</code>)
* [[Texture]]
* [[Shader]]


* Each [[VTF]] or '''Valve ''Texture'' Format''' file, is basically a rasta image file or pixel-map. Most material surfaces will use more than one [[VTF]]; eg in addition to the ([[$basetexture]]) colormap or diffusemap , a normalmap, specularmap, [[:Category:VMT Texture Reference|etc]]. Specialist types of VTF include [[Animated Textures]], [[Normal Maps|Normalmaps]], [[Heightmap]]s etc
== Basics ==


* '''Texture Mapping''' is the process of ''aligning'' and ''adjusting'' how a VTF is applied to a specific mesh or piece of geometry. For Brushes, this is done using the [[Hammer Face Edit Dialog]]. For Models, using the [[XSI Texturing|XSI Texture Editor]]. The resulting '''Texture Map''' is an index specifying which area of the relevant [[VTF]]s to apply to each specific polygon of the mesh. The ''Texture Map'' itself does not contain any pixel values (colour, etc), it only indexes the mesh vertices and corresponding 2D pixelmap coordinates. Each ''Texture Map'' is therefore specific to a mesh rather than a texture file, and so it is stored as ''part of the mesh'' file. A mesh may only have one Texture Map, but it can use multiple or alternate skins, so long as the layout (coordinates) of each VTF skin is the same.
*'''[[Creating a Material]]'''
* [[Material optimization]]
* [[Decals]]
* [[Skybox (2D)#Creating a 2D Skybox|Skybox (2D)]]
* [[VTFEdit]], [[VMT Editor]] and [[VTF Shell Extensions]]
* <code>[[Patch]]</code>


* Models tend to have a more complex mesh than brushes, which makes texture mapping much more fiddly. Model VTFs therefore tend to be created specially to map easily and efficiently onto one specific model only. Models may use multiple (alternative) skins, so long as the layout of each VTF corresponds to the model's ''Texture Map''.
== Shader Commands ==


*[[:Category:Shaders|List of Shaders]]
*[[:Category:List of Shader Parameters|List of Shader Parameters]]


{{category newcolumn|rowspan=1|width=50%|background-color=#FBF7EA|border-color=#E4DCCD}}


==Basics==
== Common Shader Effects ==
* [[Creating a Texture using VTFEdit]]
* [[Material Creation]] - The basics of material creation.
* [[Materials for models]] - These are slightly different to Brush Materials.
* [[Materials for Brush Displacements]] - These are slightly different to ordinary Brush Materials.
* [[Decals]] - How to make decal and overlay materials.
* [[Skybox (2D)]] - How to use and make the cubic materials used for the sky.


==Advanced topics==
=== Lighting ===
* [[Material Proxies]] - Advanced materials that can vary based on changing data.
*[[Bump map]]
* [[Water Shader]] - Description of the special water shader.
*[[Parallax mapping]]
* [[Half-Life 2 Shader Fallbacks]] - Fallback settings of Half-Life 2 shaders on different platforms.
*[[Half Lambert]]
* [[DirectX Versions]] - How shaders are rendered on different versions of DirectX.


==Useful applications==
=== Reflection ===
* See [[:Category:Tools]] and [[:Category:Third Party Tools]]
*[[Phong]]
*[[Specular]]
*[[Water Shader|Water]] / [[Refract]]


=== Blending ===
* <code>[[WorldVertexTransition]]</code>
== Troubleshooting ==
* [[Fixing DXT Green Tint Compression]]
== Proxies ==
*[[Material Proxies]]
*[[List Of Material Proxies]]
*[[material_modify_control]]
*[[Procedural Materials]]
{{category end}}
[[Category:Modding]]
[[Category:Modding]]

Latest revision as of 15:43, 12 July 2024

Subcategories

This category has the following 5 subcategories, out of 5 total.

G

R

S

Pages in category "Material System"

The following 133 pages are in this category, out of 133 total.