Texture Problem

Discussion in 'Mapping Questions & Discussion' started by stuntguy3000, Jul 18, 2011.

  1. stuntguy3000

    stuntguy3000 L1: Registered

    Messages:
    8
    Positive Ratings:
    0
  2. Zabidenu

    Zabidenu L1: Registered

    Messages:
    26
    Positive Ratings:
    4
    It simpyly indicates that the texture is reflective - nothing is wrong.
     
    • Thanks Thanks x 1
  3. stuntguy3000

    stuntguy3000 L1: Registered

    Messages:
    8
    Positive Ratings:
    0
    Oh. Is their i can stop or turn off the reflection? Or will it work in game?
     
  4. Fr0Z3nR

    aa Fr0Z3nR Creator of blackholes & memes. Destroyer of forums

    Messages:
    6,391
    Positive Ratings:
    4,906
    You don't really turn off reflections, its a reflective texture.

    To get rid of that ingame, you need to do 2 things, you need to add an env_cubemap entity. This creates pictures of the area surrounding them, and will project said images onto the appropriate surfaces. Its good to put them at 64units above the ground of whatever area you are in, and to put them roughly in each individual room.

    To build cubemaps you need to type the following commands, ingame into the developer console.

    mat_specular 0
    buildcubemaps
    mat_specular 1
    disconnect
    sv_cheats 1
    mat_reloadallmaterials
    map ________

    where _____ is the file name of your map (ie, ctf_stuntguy)
     
    • Thanks Thanks x 1
  5. Fr0Z3nR

    aa Fr0Z3nR Creator of blackholes & memes. Destroyer of forums

    Messages:
    6,391
    Positive Ratings:
    4,906
    You don't really turn off reflections, its a reflective texture.

    To get rid of that ingame, you need to do 2 things, you need to add an env_cubemap entity. This creates pictures of the area surrounding them, and will project said images onto the appropriate surfaces. Its good to put them at 64units above the ground of whatever area you are in, and to put them roughly in each individual room.

    To build cubemaps you need to type the following commands, ingame into the developer console.

    mat_specular 0
    buildcubemaps
    mat_specular 1
    disconnect
    sv_cheats 1
    mat_reloadallmaterials
    map ________

    where _____ is the file name of your map (ie, ctf_stuntguy)
     
    • Thanks Thanks x 1
  6. stuntguy3000

    stuntguy3000 L1: Registered

    Messages:
    8
    Positive Ratings:
    0
    I am really new to this.

    I am a bit confused... So i place the env_cubemap and type those things into the dev console?

    With the env_cubemap do i place it in each room or once only?

    I just am new to this and i am confused a bit.
     
  7. Pocket

    aa Pocket func_croc

    Messages:
    4,489
    Positive Ratings:
    2,216
    Cubemaps are like scaled down cameras used to draw reflections, so any reflective object will reflect whatever the nearest cubemap entity is "looking at". This means you'll want at least one in every room, otherwise you'll have objects and textures reflecting the contents of a different room. This can be especially jarring if the rooms have different themes.

    I would recommend for any long, winding tunnel system to have a cubemap entity for each section. If it has two 90-degree bends in it, for example, it would need three cubemaps. Technically, since a tunnel made of air ducts is the same texture on all four sides, you can probably get away with just one in the middle somewhere in this case; it's up to you.
     
    • Thanks Thanks x 1
    Last edited: Jul 18, 2011
  8. clayton

    clayton L1: Registered

    Messages:
    44
    Positive Ratings:
    23
    while i'm working on a map i tend to place a single env_cubemap in the centre of the map (it doesn't matter how high for now, just drop it on the ground). compile the map, load it up. when you're in the map, open the console and type the commands in the exact order fr0Z3n lists. when the map reloads you won't see those reflective checkerboards (both on textures in the map, like on glass and metallic stuff, or tile floors, nor on weapons like the sniper rifle, or demoman bottle).

    one other thing, you must be running at minimum 800x600 resolution to build cubemaps.

    [edit: one last thing, if you see this: "Error: Skybox vtf files for skybox weren't compiled with the same size texture and/or same flags! Can't load skybox file skybox to build the default cubemap!" ignore it :) ]
     
    • Thanks Thanks x 1
    Last edited: Jul 18, 2011
  9. stuntguy3000

    stuntguy3000 L1: Registered

    Messages:
    8
    Positive Ratings:
    0
    So this will replace a pink-black checked reflection I see on my weapons and with that error message I see that message and ignore it.

    Thanks alot for the help and all.

    PS With those commands why do I have to run them?
     
  10. English Mobster

    English Mobster L6: Sharp Member

    Messages:
    355
    Positive Ratings:
    224
    You have to run the commands just because of the way TF2 works; the maps in the game don't come with a default cubemap like most other Source games, so you just need to do it manually.
    mat_specular 0:
    This disables your reflections, so the game can then edit them.
    buildcubemaps:
    This looks at each individual env_cubemap you have on your map, then captures the appropriate images to build your reflections.
    mat_specular 1
    This turns reflections back on. You may still see the checkerboard, however, and to fix that, we need to reload the game.
    disconnect
    Disconnects.
    sv_cheats 1
    Turns on cheats; they are required to execute the next command.
    mat_reloadallmaterials
    Redoes all your lightmaps, with the new reflections. This will get rid of those checkerboards!
    map *mapname*
    Reload your map.

    Keep in mind, this has to be done with each compile, so it's best just to use it when making a build for public release or taking screenshots/video, so as to save yourself time and headache. You can do everything normally without this, you just get those checkerboards.
     
    • Thanks Thanks x 1