Difference between revisions of "Talk:Material"

From Valve Developer Community
Jump to: navigation, search
(render order)
Line 13: Line 13:
  
 
: That would be interesting, Modal/TopMost for textures. I've noticed that my nVidia GeForce card does a lot better job of this than my ATI Radeon, might be system specific. --[[User:Mark WiseCarver|wisemx]] 10:53, 23 Jul 2005 (PDT)
 
: That would be interesting, Modal/TopMost for textures. I've noticed that my nVidia GeForce card does a lot better job of this than my ATI Radeon, might be system specific. --[[User:Mark WiseCarver|wisemx]] 10:53, 23 Jul 2005 (PDT)
 +
 +
::This is called a "sorting issue". It all depends on what type of object the material is applied to. Some classes of objects, such as standard world brushes and func_detail, are rendered (and sorted) together for speed reasons. Same goes for models (a single model is rendered as a batch). When this happens, the hardware has a hard time "sorting" -- determining what object with a translucent material should be rendered last (in front).
 +
 +
::One way to force a brush object to render seperately is to make it a brush entity, such as a func_brush. This obviously has its own share of limitations, including reduced performance and lighting differences, so it's not always a solution.
 +
 +
::The only way I know of to fix this in the .VMT itself is to make the material alphatested instead of alphablended, which has a high visual cost. Regardless, no simple addition to the .VMT will fix this problem without a performance or visual quality penalty. --[[User:JeffLane|JeffLane]] 15:43, 23 Jul 2005 (PDT)

Revision as of 22:43, 23 July 2005

I'm still confused as to options are available to me as a texture artist. I know there's a lot of good information above, but I'm not a programmer; I'm an artist. Is there a more detailed explaination of this procedure available? Or maybe, a program designed where I can enter the types of material effects I'm looking for (i.e. metallic, shiny, whatever) and have the code generated for me?

You want VTFEdit.

further additions

This article could use a lot more information about how to write proper VMT files, and the basic parameters that can be added. --JeffLane 09:09, 19 Jul 2005 (PDT)

Though on second thought, this has gotten pretty long, so any new information should probably be linked instead of added. It may have to be divided up at some point. The sections on creating .VMT files and .TXT parameters could probably be pulled out into their own smaller articles, for example. --JeffLane 14:34, 19 Jul 2005 (PDT)

render order

Does anyone know how to force the render order of translucent/additive textures? When I have multiple transparent textures in front of one another, the game gets confused about which is in front of the other and flips between them based on the view angle. Is there a shader parameter to force the game get it right? --Mungo 10:29, 23 Jul 2005 (PDT)--Mungo 10:29, 23 Jul 2005 (PDT)

That would be interesting, Modal/TopMost for textures. I've noticed that my nVidia GeForce card does a lot better job of this than my ATI Radeon, might be system specific. --wisemx 10:53, 23 Jul 2005 (PDT)
This is called a "sorting issue". It all depends on what type of object the material is applied to. Some classes of objects, such as standard world brushes and func_detail, are rendered (and sorted) together for speed reasons. Same goes for models (a single model is rendered as a batch). When this happens, the hardware has a hard time "sorting" -- determining what object with a translucent material should be rendered last (in front).
One way to force a brush object to render seperately is to make it a brush entity, such as a func_brush. This obviously has its own share of limitations, including reduced performance and lighting differences, so it's not always a solution.
The only way I know of to fix this in the .VMT itself is to make the material alphatested instead of alphablended, which has a high visual cost. Regardless, no simple addition to the .VMT will fix this problem without a performance or visual quality penalty. --JeffLane 15:43, 23 Jul 2005 (PDT)