Welcome to PlagueFest.com! Log in or Sign up to interact with the Plague Fest community.
  1. Welcome Guest! to interact with the community and gain access to all the site's features.

Tutorial How to port Portal 2 textures to CSS

Discussion in Resources & Tutorials started by LadyMoOnLiGht, May 10, 2011

  1. Oct 10, 2010
    Posts
    Programs you need:

    -GCFScape
    -Any hex-editor of your choice
    -Portal 2 Authoring Tools (its free)

    1:
    get Portal 2 Authoring Tools.

    2: Start Hammer Editor

    3: search the texture you need

    4:
    open C:\Steam\steamapps\common\portal 2\portal2\pak01_dir.vpk
    with GCFScape

    5:
    search your texture of your choice,
    you before locate it with Hammer

    6:
    Extract all files what needed for this texture

    7:
    open all *.vtf with your hex-editor
    look in line 1 and find the 05,
    change it to 04 and save the file
    [IMG]

    thats it, ... near

    8:
    edit the .vmt

    the CSS engine cannot handle P2 .vmt's,
    you must remove something

    examples:

    original:

    Code:
    LightmappedGeneric
    {
    $basetexture "metal/black_floor_metal_bullseye_001"
    $surfaceprop metal
    $bumpmap "metal/black_floor_metal_001a_normal"
    $selfillum 1
    $reflectivity "[ 0.6 0.6 0.6 ]" 
    $envmap "metal/black_wall_envmap_002a"
    hdr
    {
    $envmap "metal/black_wall_envmap_002a_hdr"
    }
    $envmaplightscale 0.6
    
    $normalmapalphaenvmapmask 1
    $envmapcontrast 1.0
    $envmapsaturation 0.2
    $envmaptint 0.2 0.2 0.2
    "%noportal" 1
    $detail "detail\detail_dirt02a"
    $detailscale ".4"
    $detailblendfactor .45
    $detailblendmode 0
    }
    

    change it to this:

    non-shiny:

    Code:
    LightmappedGeneric
    {
    $basetexture "portal/black_floor_metal_bullseye_001"
    $surfaceprop metal
    $bumpmap "portal/black_floor_metal_001a_normal"
    $selfillum 1 // <-- this is special for the bullseye texture, in non shiny
    $reflectivity "[ 0.6 0.6 0.6 ]"
    $envmaplightscale 0.6
    
    $normalmapalphaenvmapmask 1
    $envmapcontrast 1.0
    $envmapsaturation 0.2
    $envmaptint 0.2 0.2 0.2
    "%noportal" 1 // <-- this can be ignored in CSS
    $detail "portal\detail_dirt02a" // <-- this also
    $detailscale ".4"
    $detailblendfactor .45
    $detailblendmode 0
    }
    
    shiny:

    Code:
    "LightmappedGeneric"
    {
    "$basetexture" "portal/black_floor_metal_bullseye_001"
    "$surfaceprop" "concrete"
    "%keywords" "portal"
    
    "$phong" 1
    "$envmap" "env_cubemap"
    "$envmapmask" "concrete_modular_floor001a_ref"
    "$normalmapalphaenvmapmask" 1
    "$envmapcontrast" 1
    "$envmapsaturation" 1
    "$envmaptint" "[0.6 0.5 0.5]"
    "$bumpmap" "portal/black_floor_metal_001a_normal"
    "$reflectivity" "[ .35 .30 .27 ]" 
    }
    
    so, you need only the base texture and the normalmap

    have fun ripping P2 textures


    i suggest:

    resize 1024 to 512, its almost enough for CSS
    • Like Like x 1
    • Apr 9, 2007
      Posts
      I'm sure this will come in handy down the road, thanks!
    • Oct 10, 2010
      Posts
      Portal 2 Authoring Tools are released,
      forget about Alien Swarm part...
    • Oct 10, 2010
      Posts
      edited first post