Model Textures

Discussion in 'Mapping Questions & Discussion' started by Sel, Nov 23, 2009.

  1. Sel

    Sel Banned

    Messages:
    1,241
    Positive Ratings:
    1,119
    Hey, I recently started figuring out the process of exporting models to source, and tf2. Now while the model imports fine, the texture never seems to come through.

    [​IMG]

    Now, I'm guessing it's something in the QC file, or the shader/bitmap setup itself, as the texture is applied in 3ds.

    Code:
    $modelname "props_sel\TankBlue\TankBlue.mdl"
    
    $cdmaterials "models\props_sel\TankBlue"
    
    $scale 1.0
    $surfaceprop "Metal"
    
    $body "Body" "TankBlue"
    
    $staticprop
    
    $sequence "idle" "TankBlue_idle" fps 30
    
    $collisionmodel "TankBlue_phys.smd"
    {
    	$mass 100
    	$concave
    }
    
    
    
    I was told that the $cdmaterials command was supposed to point to the folder rather than the texture, but it would be nice if someone could confirm this. (The texture does not have the same name as the folder, however a VMF, and VTX files are created, so I'm not sure if that's a confirmation that the texture is found and compiled or not.

    Rexy, it would be grand if your offer from a few days ago to give importing this stuff to source, and find where I went wrong a go is still open :)
     
    Last edited: Nov 23, 2009
  2. SiniStarR

    SiniStarR L8: Fancy Shmancy Member

    Messages:
    585
    Positive Ratings:
    116
    check the vmf and make sure that its connecting to the vtf, that gets me alot when I do models.
     
  3. Jimbomcb

    Jimbomcb L1: Registered

    Messages:
    27
    Positive Ratings:
    2
    $cdmaterials should be set to the folder that contains the used materials
     
    Last edited: Nov 23, 2009
  4. YM

    aa YM LVL100 YM

    Messages:
    7,099
    Positive Ratings:
    5,742
    If you're using blender make sure you set the material properly. I'd take a screenshot of where you need to stick the texture name if i had it installed currently. You can perform a quick check of what texture its looking for in the .SMD by opening it as a standard text file. You'll see some header text then something like "material" (if done incorrectly) or <the texture name you set> followed by a load of numbers, then that repeated hundreds of times over.

    If it says "material" you haven't named the material correctly (or at all) and it's going to look for "material.vmt" in the cdmaterials location.
     
  5. Freyja

    aa Freyja ¯\_(ツ)_/¯

    Messages:
    2,851
    Positive Ratings:
    4,851
    Yes, and the .vmt name should be the same as the model name. The VTF doesn't matter because its pointed to in the VMT, but its easier to have it named the same
     
  6. Sel

    Sel Banned

    Messages:
    1,241
    Positive Ratings:
    1,119
    The SMD is referencing tankblueplaceholder.vtf in all the geometry lines, and I don't use blender, but there is a field similar to that in 3DS Max, but since the texture is referenced in the SMD, I'm guessing that it's not supposed to be included, or is taken from the bitmap path itself.

    This may be it, I'm guessing I need to recompile the model to see if it works though.

    Thanks for confirming that.

    The VMF appears to be referencing the texture.
     
  7. Psy

    aa Psy The Imp Queen

    Messages:
    1,705
    Positive Ratings:
    1,467
    Assuming that the material is in the folder 'TankBlue', your $cdmaterials line needs an extra backslash.

    Code:
    $cdmaterials "models\props_sel\TankBlue\"
    And to eliminate the possibility that it's the SMD itself get the 3DSMax VTF plugin and assign your VTF to your model then re-export.
     
    Last edited: Nov 23, 2009
  8. Sel

    Sel Banned

    Messages:
    1,241
    Positive Ratings:
    1,119
    Already installed :p

    Also changing the QC file now, and gonna give compiling a go.

    E: Ahhh, still no dice, though if Youme is right it's not on the 3ds side, and somewhere in the QC file or the model folder, any other ideas?
     
    Last edited: Nov 23, 2009
  9. Tyker

    Tyker L5: Dapper Member

    Messages:
    232
    Positive Ratings:
    141
    Is basically what went wrong, right there.
     
    • Thanks Thanks x 1