Render modes

From Valve Developer Community
Revision as of 03:57, 23 September 2006 by Andreasen (talk | contribs) (Though I leave a lot of work to be done, a full description of all 9 modes. Enjoy.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

These are all the rendering modes present in Source.


Normal

This is the normal rendering mode.

Todo: Default according to entity type, or according to the renderer?

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

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.)


Texture

Works exactly like the Color rendering mode.

Todo: Does it really?

This mode is not recommended for sprites. (Will not render sprite alpha transparency.)


Glow

This mode renders sprite alpha transparency correctly, making it one of the few ideal rendering modes for sprites. (Sprites will always glow in the dark.)

Todo: Is this and World Space Glow the only ones to use the GlowProxySize keyvalue of sprites?
Todo: Picture: Glow sprite inside a prison lamp, compared to an Additive sprite.
Todo: Picture: Glow at two distances. "The size of a sprite rendered with Glow is consistant with the screen size (unlike World Space Glow), making it seem larger at a distance, in comparison to the world."


Solid (Obsolete)

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.

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.

This mode is not recommended for sprites. (Will not render sprite alpha transparency.)


Additive

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?

The precise formula is: <math>...</math>(?)

This mode renders 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.

Todo: Picture copy: A sprite inside a prison lamp, one rendered with the Additive mode, and the other rendered with the Glow mode, to show how differently the modes handle surrounding brushwork.


Note.pngNote:Rendering mode 6 does not exist. Additive Fractional Frame is rendering mode 7.


Additive Fractional Frame

Blends between animation frames.

Todo: What does that means? Animated sprites - what? Just like the Additive mode otherwise? Write a better description.
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 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

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.

Todo: Write description. It doesn't seem to differ from the Color mode though.

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.

Todo: Picture: WSG at two distances. "The World Space Glow mode has a constant size compared to the world instead of compared to the screen."

This effect is most useful for having lamp props (like bulbs) glow properly.


Dont 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 be 100% transparent.)

Todo: Actually this doesn't seem to be an actual rendering mode, so much as it seems to be setting a value that the renderer won't find, like rendermode 6.

This is useful for completely invisible entities. You could for instance hide button tool brushes used for interaction with an underlying button model.