Home
  • II Home
  • II SDK Home

  • Mapping
  • Naming

  • Tools
  • Conversion Unit

  • Modeling an Insect
  • Reference Pictures
  • Outline
  • Setup
  • First Cylinder
  • Moving Vertex
  • Adding Edges
  • The Legs - 1
  • The Legs - 2
  • The Wings
  • The Head
  • The Eyes
  • Head And Details
  • Hairs On The Body
  • Result

  • Modeling
  • Introduction
  • Setup
  • 3DSMAX to HL2
  • MAYA to HL2
  • MS3D to HL2
  • XSI to HL2
  • FRAG to HL2
  • Material
  • QC File
  • Unit Conversion
  • F.A.Q.

  •  
    Modelings by Anders Jenbo aka NoBody

    Material
    All the textures for you materials must be saved as TGA some in %sourcesdk%\..\..\SourceMods\II\materialsrc\models, but you can add sub folder if you like.

    In PhotoShop, go to file->save as and set the format to "Targa (*.TGA;*.VDA;*.ICB;*.VST)" if the option is available you need to switch off "alpha channels". When you hit save you will be presented with a few more options select 24bits/pixels and compress (RLE).

    Now go to the %sourcesdk%\..\..\SourceMods\II\materialsrc\models folder, to compile a VTF file from the TGA we will need to feed it to valves vtex program, to make this easier and set up some safety net's we will make a bat file for this instead of just dumping the texture on vtex.exe.

    Make a file called II-material.bat and open it in notepad then copy past this to it and save it.

    Now drag and drop you tga on the bat file. Some of the advances of having this bat file is that you can have it in any folder you would like and it always compiles the textures to "II".

    Now go to %sourcesdk%\..\..\SourceMods\II\materials\models folder hers you new vtf and here you will need to make your vmt file, create a empty text file and rename it to "<texture name>.vmt".

    In the vtm you will need to tell the engine what textures to use for this material and how to display them. As this is only a simple material with no effects this is all you will need till fill in to your vmt.

    If you want the texture to have transparent parts you draw the transparency in the alpha mask, the white parts will be opaque and the black will be fully transparent, the grays will then be in between.

    Then when you save it set it to 32bits/pixels instead of only 24bits/pixels.
    (Note: If you are using Photoshop 7 you need to download a update that fixes the way it saves .tga images)

    The last thing that needs to be done to make the transparency work is to add the line the vmt fil you need to add this line "$translucent" 1".

    I have experienced some problems with some transparent materials where the polygons where rendered in the wrong order, so fare the only fix i have found is to use ""$alphatest" 1" instead of "$translucent" 1". This how ever causes every thing lower then 50% white to go fully transparent and the rest to be opaque.


    
    Poll!