Category:Material System: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
Line 24: Line 24:
* [[Materials for Sprites]] - Slightly different again. <!-- please link this to available info if you know where to find it! -->
* [[Materials for Sprites]] - Slightly different again. <!-- please link this to available info if you know where to find it! -->
* [[Decals]] - How to make decal and overlay materials.
* [[Decals]] - How to make decal and overlay materials.
* [[Skybox (2D)]] - How to use and make the cubic materials used for the sky.
* [[Skybox (2D)]] - How to use and make the cubemap textures used by the [[toolsskybox]] material.
* [[Animated Texture]]s. <!-- please link this to available info if you know where to find it! -->
* [[Animated Texture]]s. <!-- please link this to available info if you know where to find it! -->
* Special [[Tool textures|Tool texture]] materials for invisble walls, etc.


==Advanced topics==
==Advanced topics==

Revision as of 18:00, 27 April 2008

Introduction

In Source, the Material System defines how the visible surfaces of an object are rendered on the Player's screen.

  • Each Valve Material Type (VMT) file specifies which VTF Textures to use to 'paint the polygons', which Shader (and Shader Parameters) to use for rendering those Textures, and a few surface collision effects such as the sounds and decals to use when bullet hits the surface. A Material file needs to specify at least two things: a Texture and a Shader.
    • A VMT file is an uncompiled script that can be tweaked and edited with any text editor.
  • Each Shader is a specific routine in the the Rendering Engine used to translate all the texture and lighting (etc) information into screen pixels. In Source, Per-Object Shaders are applied to Material Surfaces (eg Lightmappedgeneric, Vertexlitgeneric, Water) and Post Process Shaders are applied to the Player's Viewport (eg Bloom, Sepia, Fog). The Material System is only concerned with Per-Object Shaders.
  • Each object's UV map takes the name of one or more VMT files, and maps pixels from all the Texture layers specified for that Material to the appropriate polygons.
    • A UV map is part of an object's Geometry, see UV mapping for more info on editing UV maps.

Generally a Brush Material refers to a VMT designed for use with World Brushes (stored in game_dir/materials/), and a Skin is a VMT designed to be mapped onto a particular Model (stored in game_dir/materials/models). A Texture is a VTF file, used by either a Brush Material or a Skin - but rarely both. VTFs are usually stored in the same folder as the VMTs that use them.

Note.pngNote:Non-Surface Material Properties are handled by the Physics System(s), not the Material System; for example: Breakable objects derive some additional "material" properties from their propdata configuration.

Basics

Advanced topics

Useful applications

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.