Texture issue

Discussion in 'Mapping Questions & Discussion' started by DrSquishy, Dec 4, 2017.

  1. DrSquishy

    DrSquishy L7: Fancy Member

    Messages:
    435
    Positive Ratings:
    80
    I know this isn't strictly mapping related, but this is the only place I know that I will get a proper, quick response..

    When I've compiled my model and such, ingame the texture isn't working properly. I have no idea why, as the .VMT and .VTF are properly done, and such. See for yourself:

    {
    "$baseTexture" "models\weapons\c_items/c_skistick"


    "$phong" "1"
    "$phongexponent" "5"
    "$phongboost" "10"
    "$lightwarptexture" "models\weapons\c_items/c_ambassador_lightwarp"
    "$phongfresnelranges" "[.25 .5 1]"
    // "$phongwarptexture" "models\weapons\c_items/c_ambassador_phongwarp"
    "$basemapalphaphongmask" "1"


    "$rimlight" "1"
    "$rimlightexponent" "10"
    "$rimlightboost" "1"

    "360?$color2" "[ 0.9 0.8 0.8 ]"


    "$glowcolor" "1"

    // Cloaking
    "$cloakPassEnabled" "1"
    "$sheenPassEnabled" "1"

    "$sheenmap" "cubemaps\cubemap_sheen001"
    "$sheenmapmask" "Effects\AnimatedSheen\animatedsheen0"
    "$sheenmaptint" "[ 1 1 1 ]"
    "$sheenmapmaskframe" "0"
    "$sheenindex" "0"

    "$yellow" "0"

    "Proxies"
    {
    "AnimatedWeaponSheen"
    {
    "animatedtexturevar" "$sheenmapmask"
    "animatedtextureframenumvar" "$sheenmapmaskframe"
    "animatedtextureframerate" "40"
    }
    "invis"
    {
    }
    "ModelGlowColor"
    {
    "resultVar" "$glowcolor"
    }
    "Equals"
    {
    "srcVar1" "$glowcolor"
    "resultVar" "$selfillumtint"
    }
    "Equals"
    {
    "srcVar1" "$glowcolor"
    "resultVar" "$color2"
    }
    "YellowLevel"
    {
    "resultVar" "$yellow"
    }
    "Multiply"
    {
    "srcVar1" "$color2"
    "srcVar2" "$yellow"
    "resultVar" "$color2"[/im
    }
    }

    the location of the files: C:\Program Files (x86)\Steam\steamapps\common\Team Fortress 2\tf\custom\CWeapons\models\weapons\c_items
     
  2. VEssex

    VEssex L2: Junior Member

    Messages:
    73
    Positive Ratings:
    53
    Go to your model in HLMV with the tab set to “model”, there are a variety of things you need to check.

    • Can it find the .vmt? If not HLMV will return an error.
    • Did you assign materials to the mesh whilst in Blender?
    • Is the .vtf header correct? Should be 7.2.
    • Is $cdmaterials correct? Should not have “materials/“ in it.
     
  3. DrSquishy

    DrSquishy L7: Fancy Member

    Messages:
    435
    Positive Ratings:
    80
    HLMV is returning a checkerboard texture
    The material in blender for the UV map is the same name as used in the .VTF
    EDIT: Yes, the header is 7.2
    $cdmaterials "models\weapons\c_items"
     
    Last edited: Dec 4, 2017
  4. VEssex

    VEssex L2: Junior Member

    Messages:
    73
    Positive Ratings:
    53
    So I presume HLMV is returning an error where it cannot find the .vmt. Correct?
     
  5. DrSquishy

    DrSquishy L7: Fancy Member

    Messages:
    435
    Positive Ratings:
    80
    Yes. It says 'Model attempted to load 1 or more VMTs that it couldn't find'
     
  6. VEssex

    VEssex L2: Junior Member

    Messages:
    73
    Positive Ratings:
    53
    Okay good, check the “$modelname” and make sure there is no “model/“ in it.
    Otherwise, post your .qc if you checked to no avail.
     
  7. DrSquishy

    DrSquishy L7: Fancy Member

    Messages:
    435
    Positive Ratings:
    80
    $modelname "weapons\c_models\c_battleaxe\c_battleaxe.mdl"
    Would this be good, or do I need to do just c_battleaxe\c_battleaxe.mdl?
     
  8. VEssex

    VEssex L2: Junior Member

    Messages:
    73
    Positive Ratings:
    53
    Should be fine just the way it is.
    But please post your .qc or PM me your model, I can solve it a bit faster from my end and can inform you on what you did wrong.
     
  9. DrSquishy

    DrSquishy L7: Fancy Member

    Messages:
    435
    Positive Ratings:
    80
    $modelname "weapons\c_models\c_battleaxe\c_battleaxe.mdl"

    $bodygroup "Body"
    {
    studio "c_battleaxe.smd"
    }


    $surfaceprop "metal"

    $contents "solid"

    $maxeyedeflection 90

    $cdmaterials "models\weapons\c_items"

    $cbox 0 0 0 0 0 0

    $bbox -2.138 -9.86 -10.895 2.172 9.844 46.171

    $definebone "weapon_bone" "" 0 0 0.00047 0 0 89.999983 0 0 0 0 0 0


    $sequence "idle" {
    "anims\idle.smd"
    fadein 0.2
    fadeout 0.2
    fps 30
    }

    $collisionmodel "c_battleaxe_physics.smd"
    {
    $mass 6.306724
    $inertia 1
    $damping 0
    $rotdamping 4
    $rootbone " "

    }
    [/SPOLER]
     
  10. VEssex

    VEssex L2: Junior Member

    Messages:
    73
    Positive Ratings:
    53
    Looks fine.

    And check your materials in Blender again, the material should match the .vmt name (not texture name) w/o extension.
     
  11. DrSquishy

    DrSquishy L7: Fancy Member

    Messages:
    435
    Positive Ratings:
    80
    In blender, the texture name being used is c_skistick - same as the .VMT
     
  12. VEssex

    VEssex L2: Junior Member

    Messages:
    73
    Positive Ratings:
    53
    Alright, this is the point where I’d like to ask if I can debug your model on my end if you don’t mind.

    Edit: I believe I have solved it
     
    Last edited: Dec 4, 2017