|
|
(17 intermediate revisions by 10 users not shown) |
Line 1: |
Line 1: |
| These are all the rendering modes present in [[Source]]. | | {{lang|Render modes}} |
| | {{tabsBar|main=gs|base=render modes}} |
| | These are all the rendering modes present in {{Source|4}}. |
|
| |
|
| == General functionality in Source == | | == Description == |
| [[Image:RenderModes Additive WSGlow comparison.jpg|thumb|250px|The ''Additive'' mode sprite on the left cuts through the lamp prop, while the ''World Space Glow'' mode sprite on the right is only rendered if nothing blocks it.]] | | [[File:RenderModes Additive WSGlow comparison.jpg|thumb|250px|The ''Additive'' mode sprite on the left cuts through the lamp prop, while the ''World Space Glow'' mode sprite on the right is only rendered if nothing blocks it.]] |
|
| |
|
| In [[Source]] (where most rendering modes have been crippled) there are only three reasons for changing the ''Render Mode'' keyvalue to anything else than its ''Normal'' setting: | | In [[Source]] ''Render Mode'' ({{mono|rendermode}}) keyvalue controls how an entity's appearance is drawn. Example of use is rendering a sprite properly and applying draw effects onto models. |
|
| |
|
| # You want to render a sprite correctly (without its black box).
| | There are 4 Render Modes that render transparency correctly: ''Glow'', ''Additive'', and their alternatives ''Additive Fractional Frame'' and ''World Space Glow''. The ''Additive'' modes are rendered so that the sprite will cut through any surrounding geometry, while the two ''Glow'' modes are designed to be used for glowing sprites. Of the two Glow modes, ''Glow'' has a fixed size ''on screen'', while ''World Space Glow'' has a fixed size ''in the world''. |
| # You want to make an entity transparent.
| |
| # You don't want to render the entity at all.
| |
|
| |
|
| * If you want to render a sprite correctly, there are four modes that can do this: ''Glow'', ''Additive'', and their alternatives ''Additive Fractional Frame'' and ''World Space Glow''. The two ''Additive'' modes are rendered so that the sprite will cut through any surrounding brushwork, while the two ''Glow'' modes are designed to be used for glows and other light source sprites. (See picture on the right.) Of the two Glow modes, ''Glow'' has a fixed size ''on screen'', while ''World Space Glow'' has a fixed size ''in the world''. This is perhaps best demonstrated [[:Image:RenderModes Glow WSGlow comparison.jpg|visually]].
| | [[File:RenderModes_Glow_WSGlow_comparison.jpg|thumb|250px|A comparison of the Glow (above) and World Space Glow (below) rendering modes, for sprites.]] |
| | |
| * If you want to render an entity as transparent, you need to change the mode from ''Normal'' to enable the ''FX Amount (0 - 255)'' parameter. You can use any of the other eight modes for this, except the ''Don't Render'' mode (unless you want to make it completely invisible).
| |
| | |
| * If you don't want to render an entity at all, simply use the ''Don't Render'' mode (The entity will still be there, but remain invisible).
| |
|
| |
|
| == Normal (0) == | | == Normal (0) == |
| This is the normal rendering mode. Default according to entity type, its materials settings and API compatibility (on '''DX7''' some of materials have cheaper preporties to render).
| |
|
| |
|
| Setting the ''FX Amount (0 - 255)'' keyvalue will have no effect on entities rendered with in this mode.
| | The default Render Mode. |
|
| |
|
| This mode is not recommended for sprites. (Will not render sprite alpha transparency.)
| | Transparency keyvalues/inputs will have no effect on entities rendered with this mode. |
|
| |
|
| == Color (1) == | | == Color (1) == |
| {{TODO|This mode will render entities in degrees of both color and opacity, but so will most of the other modes, so this mode seems to be obsolete.}}
| |
|
| |
|
| This mode is not recommended for sprites. (Will not render sprite alpha transparency.)
| | Behaves like the Normal Render Mode, but allows transparency. |
|
| |
|
| == Texture (2) == | | == Texture (2) == |
| Works exactly like the ''Color'' rendering mode. {{TODO|Does it really?}}
| | Same as color. Leftover from GoldSrc, where it would render as fullbright. |
| | |
| This mode is not recommended for sprites. (Will not render sprite alpha transparency.)
| |
| | |
| Look into: Is this how the texture tool in Garry's mod works?
| |
|
| |
|
| == Glow (3) == | | == Glow (3) == |
| This render mode is intended for glow sprites. (It will not make entities glow in the dark - sprites will always glow in the dark.) It will of course render sprite alpha transparency correctly.
| | Intended for glowing sprites. Allows transparency, and forces the sprite or model to be rendered unlit. |
| | |
| The size of a sprite rendered with Glow is consistent with the screen size (unlike World Space Glow), making it seem larger at a distance, in comparison to the world. (See [[:Image:RenderModes Glow WSGlow comparison.jpg|picture]].)
| |
|
| |
|
| {{TODO|Is this and ''World Space Glow'' the only ones to use the ''GlowProxySize'' keyvalue of sprites?}}
| | The size of a sprite rendered with Glow is consistent with the screen size (unlike the alternative World Space Glow), making it appear larger at a distance, in comparison to the world. |
|
| |
|
| This rendering mode could be used to discreetly make the player notice something, like for instance a specific glowing button at a console.
| | The ''GlowProxySize'' keyvalue affects this Render Mode on sprites. |
|
| |
|
| == Solid (4) == | | == Solid (4) == |
| This rendering mode is also referred to as ''Alphatest''.
| | Enables [[$alphatest|Alphatest]]ing. Legacy port from [[Goldsource]]. Obsolete in Source due to Alphatesting being handled in materials. Does not allow translucency. |
|
| |
|
| Alphatesting is the process of comparing each pixel of the texture(s), rendering pixels of a certain shade of blue (seen in <code>debug/debugluxels</code>) as transparent.
| | == Additive (5) == |
| | |
| This is very useful for rendering see-through grates, bars and fences, that would otherwise require a complex and detailed brushwork to accomplish, using just a single texture.
| |
| | |
| {{TODO|Picture: A texture previously used for Solid, with its blue parts visible, compared to the same grate in-game.}}
| |
| | |
| While this rendering mode was required to alphatest textures in [[Goldsource]], alphatesting is now (in Source) handled automatically by materials, making this rendering mode obsolete.
| |
| | |
| There´s one use, though, for this. With entities that don´t allow the ''disable'' input. They can be set to this render mode (instead of normal) and toggle their visibility by the ''alpha'' output, with a ''parameter override'' where 255 will be normal and 0 will be invisible. ''Prop_dynamic_override'' is one of these entities where the ''disable/enable'' inputs don´t work.
| |
| | |
| {{TODO|Fix last paragraph´s grammar if neccesary.}}
| |
| | |
| This mode is not recommended for sprites. (Will not render sprite alpha transparency.)
| |
|
| |
|
| == Additive (5) ==
| | Add the material's color values to the existing image, instead of performing a multiplication. Sprites will appear through world geometry and the sprite/model will always brighten the world. Allows transparency. Good for big sprites because it wont disappear near the edge of the screen. |
| {{TODO|This rendering mode doesn't seem to work any different than the ''Color'' mode when it comes to adding its color to its background. Is this mode for sprites only? ...like an older Goldsource version of the ''Glow'' rendering mode?}}
| |
|
| |
|
| This mode will render sprite alpha transparency correctly, making it one of the few rendering modes for sprites. However, as it still tests the Z buffer, rendering sprites as thin layers that will penetrate any surrounding brushwork, it is not ideal for this.
| | == Environmental (6) == |
| | {{not in FGD}} |
|
| |
|
| {{note|Rendering mode 6 does not exist. ''Additive Fractional Frame'' is rendering mode 7.}}
| | Causes the material to be not be drawn at all, similarly to Don't Render. |
|
| |
|
| == Additive Fractional Frame (7) == | | == Additive Fractional Frame (7) == |
| Blends between animation frames. {{TODO|What does that means? Animated sprites - what? Just like the ''Additive'' mode otherwise? Write a better description.}}
| | Functions like Additive, but also blends between animation frames. Requires the material to have a functioning animating texture. Allows transparency. |
|
| |
|
| {{TODO|This rendering mode doesn't seem to work any different than the ''Color'' mode when it comes to adding its color to its background. Is this mode for sprites only? ...like an older Goldsource version of the ''Glow'' rendering mode?}}
| | == Alpha Add (8) == |
| | | {{not in FGD}} |
| This mode renders sprite alpha transparency correctly, making it one of the few rendering modes for sprites. {{TODO|How does it handle surrounding brushwork? Does it handle it as poorly as the ''Additive'' mode?}}
| |
|
| |
|
| == Alpha Add (8) ==
| | Functions similarly to ''Additive'', except that the alpha channel controls the opacity of the sprite. |
| {{warning|This mode is not recommended for sprites. (Will not render sprite alpha transparency.)}}
| | An example of use is for dark sprites, with an example material being sprites/strider_blackball.vmt. |
| This rendering mode is not in the [[FGD]], but can be achieved through turning SmartEdit off and then giving the ''rendermode'' field the value of <code>8</code>.
| |
|
| |
|
| {{TODO|Write description. It doesn't seem to differ from the ''Color'' mode though.}}
| |
| == World Space Glow (9) == | | == World Space Glow (9) == |
| This mode renders sprite alpha transparency correctly, making it one of the few ideal rendering modes for sprites. It has no Z buffer checks, so it's much like the [[#Glow|glow]] mode, except that it is rendered like it has a place in the world, it's size being relative to the world rather than the screen. (See [[:Image:RenderModes Glow WSGlow comparison.jpg|picture]].)
| | Functions similarly to Glow, with the exception that the size of the sprite is relative to the world rather than the screen. |
|
| |
|
| This effect is most useful for having lamp props (like bulbs) glow properly.
| | The ''GlowProxySize'' keyvalue affects this Render Mode on sprites. |
|
| |
|
| == Don't Render (10) == | | == Don't Render (10) == |
| This rendering mode is also referred to as ''None''.
| | Also referred to as ''None''. |
|
| |
|
| This rendering mode simply tells the renderer not to render this entity. (The player can still interact with the entity, but it will not be drawn.)
| | The entity is still being drawn and networked albeit invisible, therefore not making this Render Mode ideal for performance reasons. |
|
| |
|
| {{note|The entity is still networked in this mode. To avoid transmitting this entity to clients, see [[EF_NODRAW]].}}
| | To completely avoid drawing and networking an entity, see [[EF_NODRAW]]. |
|
| |
|
| [[Category:Technical]] | | [[Category:Source]] |
These are all the rendering modes present in
Source.
Description
The
Additive mode sprite on the left cuts through the lamp prop, while the
World Space Glow mode sprite on the right is only rendered if nothing blocks it.
In Source Render Mode (rendermode) keyvalue controls how an entity's appearance is drawn. Example of use is rendering a sprite properly and applying draw effects onto models.
There are 4 Render Modes that render transparency correctly: Glow, Additive, and their alternatives Additive Fractional Frame and World Space Glow. The Additive modes are rendered so that the sprite will cut through any surrounding geometry, while the two Glow modes are designed to be used for glowing sprites. Of the two Glow modes, Glow has a fixed size on screen, while World Space Glow has a fixed size in the world.
A comparison of the Glow (above) and World Space Glow (below) rendering modes, for sprites.
Normal (0)
The default Render Mode.
Transparency keyvalues/inputs will have no effect on entities rendered with this mode.
Color (1)
Behaves like the Normal Render Mode, but allows transparency.
Texture (2)
Same as color. Leftover from GoldSrc, where it would render as fullbright.
Glow (3)
Intended for glowing sprites. Allows transparency, and forces the sprite or model to be rendered unlit.
The size of a sprite rendered with Glow is consistent with the screen size (unlike the alternative World Space Glow), making it appear larger at a distance, in comparison to the world.
The GlowProxySize keyvalue affects this Render Mode on sprites.
Solid (4)
Enables Alphatesting. Legacy port from Goldsource. Obsolete in Source due to Alphatesting being handled in materials. Does not allow translucency.
Additive (5)
Add the material's color values to the existing image, instead of performing a multiplication. Sprites will appear through world geometry and the sprite/model will always brighten the world. Allows transparency. Good for big sprites because it wont disappear near the edge of the screen.
Environmental (6)
!FGD
Causes the material to be not be drawn at all, similarly to Don't Render.
Additive Fractional Frame (7)
Functions like Additive, but also blends between animation frames. Requires the material to have a functioning animating texture. Allows transparency.
Alpha Add (8)
!FGD
Functions similarly to Additive, except that the alpha channel controls the opacity of the sprite.
An example of use is for dark sprites, with an example material being sprites/strider_blackball.vmt.
World Space Glow (9)
Functions similarly to Glow, with the exception that the size of the sprite is relative to the world rather than the screen.
The GlowProxySize keyvalue affects this Render Mode on sprites.
Don't Render (10)
Also referred to as None.
The entity is still being drawn and networked albeit invisible, therefore not making this Render Mode ideal for performance reasons.
To completely avoid drawing and networking an entity, see EF_NODRAW.