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.
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)
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)
- 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)
- Thanks a lot. I should also mention that this is occurring in the 3D skybox specifically. There are two separate props I'm using in the sky. Could that be part of the problem? Do the shader parameters "$writez" and "$comparez" have anything to do with this? --Mungo 19:29, 23 Jul 2005 (PDT)
- I'm looking into the exact function of these variable for correctness, but no, I don't believe they will help you in this case. Dynamic props are not included in cubemap rendering because they are by definition dynamic, and may not always be present in the scene, which would make the cubemaps be an incorrect rendering. If you need it to be in the cubemap, you should make it a prop_static. --JeffLane 17:20, 25 Jul 2005 (PDT)