Render modes: Difference between revisions
m (→Don't render) |
|||
Line 44: | Line 44: | ||
This rendering mode could be used to discreetly make the player notice something, like for instance a specific glowing button at a console. | This rendering mode could be used to discreetly make the player notice something, like for instance a specific glowing button at a console. | ||
== Solid | == Solid == | ||
This rendering mode is also referred to as ''Alphatest''. | This rendering mode is also referred to as ''Alphatest''. | ||
Line 54: | Line 54: | ||
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. | 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, 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. | |||
This mode is not recommended for sprites. (Will not render sprite alpha transparency.) | This mode is not recommended for sprites. (Will not render sprite alpha transparency.) |
Revision as of 12:35, 31 March 2012
These are all the rendering modes present in Source.
General functionality in Source
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:
- You want to render a sprite correctly (without its black box).
- 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 visually.
- 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
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.
This mode is not recommended for sprites. (Will not render sprite alpha transparency.)
Color
This mode is not recommended for sprites. (Will not render sprite alpha transparency.)
Texture
Works exactly like the Color rendering mode.
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
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.
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 picture.)
This rendering mode could be used to discreetly make the player notice something, like for instance a specific glowing button at a console.
Solid
This rendering mode is also referred to as Alphatest.
Alphatesting is the process of comparing each pixel of the texture(s), rendering pixels of a certain shade of blue (seen in debug/debugluxels
) as transparent.
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.
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, 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.
This mode is not recommended for sprites. (Will not render sprite alpha transparency.)
Additive
The precise formula is: <math>...</math>(?)
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.

Additive fractional frame
Blends between animation frames.
This mode renders sprite alpha transparency correctly, making it one of the few rendering modes for sprites.
Alpha add
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 8
.
This mode is not recommended for sprites. (Will not render sprite alpha transparency.)
World space glow
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 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 picture.)
This effect is most useful for having lamp props (like bulbs) glow properly.
Don't render
This rendering mode is 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.)
