model halp

Discussion in 'Mapping Questions & Discussion' started by The Asylum, Sep 15, 2013.

  1. The Asylum

    aa The Asylum

    Messages:
    1,658
    Positive Ratings:
    439
    so its like this:

    I commissioned a model from a guy. I got an SMD model along with two SMD animations (idle and spin). I got the model to compile correctly with GUIStudio 2.2, but the spin animation doesn't spin.

    Also, all the skins he gave me were in png format. I know there's more to skinning models than just running the image files though VTEX or VTFEdit.

    Here's the current contents of my qc file:

    Code:
    $staticprop // This means it will be usable as a static prop
    
    $modelname "props_meleefort\belt"  // this is where the model will be saved and under what name
    
    $model "body" "belt.smd" // this is the .smd you exported earlier
    
    $cdmaterials "models\props_meleefort\"  // this is the texture directiory, relative to materials/
    
    $surfaceprop "plastic"  // what material it's made from (for footsteps, bullet decals)
    
    $sequence idle "idle.smd" loop fps 10.00  // default animation (every model needs one)
    
    $sequence spin "spin.smd" loop fps 10.00
     
  2. Faux Rhinoceros

    aa Faux Rhinoceros Also known as Dr. Element

    Messages:
    1,479
    Positive Ratings:
    1,369
    i think it's because a staticprop can't have animations
     
  3. Beetle

    Beetle L9: Fashionable Member

    Messages:
    627
    Positive Ratings:
    141
    I had the same problem when I did it with Blender, and I posted it here. It was never solved.
     
  4. The Asylum

    aa The Asylum

    Messages:
    1,658
    Positive Ratings:
    439
    What abot the textures? Nobody knows how to convert them?
     
  5. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,769
    Positive Ratings:
    5,535
    Assuming the textures were created properly in the modelling app, converting them to VTF should be all you need (aside from making a corresponding VMT, of course).
     
    • Thanks Thanks x 1
  6. The Asylum

    aa The Asylum

    Messages:
    1,658
    Positive Ratings:
    439
    Textures still not working, wondering if I've got the right paths here:

    tf\materials\models\props_meleefort\belt
    skin0.vtf
    skin0.vmt
    skin1.vtf
    skin1.vmt

    The belt model itself (aptly named belt.mdl) is located in tf\models\props_meleefort
     
  7. theharribokid

    aa theharribokid

    Messages:
    867
    Positive Ratings:
    806
    the vmts and vtf just need to be in models\props_meleefort not \belt, judging by the snippet of the .qc you posted
     
  8. The Asylum

    aa The Asylum

    Messages:
    1,658
    Positive Ratings:
    439
    Still nothing

    maybe it's the content of the vmt

    "LightmappedGeneric"
    {
    "$basetexture" "models/props_meleefort/skin0"
    }
     
  9. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,769
    Positive Ratings:
    5,535
    Your QC: no belt directory
    Your VMT location: belt directory

    Your VMT: no belt directory
    Your VTF location: belt directory

    These things should all be the same, not different.
     
  10. Freyja

    aa Freyja ¯\_(ツ)_/¯

    Messages:
    2,879
    Positive Ratings:
    4,970
    Your textures are using the LightMappedGeneric shader. This is for lightmapped surfaces (ie, brushes, displacements)

    Model textures should use the VertexLitGeneric shader.
     
  11. Beetle

    Beetle L9: Fashionable Member

    Messages:
    627
    Positive Ratings:
    141
    I'll check later, but that might very well be the reason mine wasn't animated. Thanks in advance for highlighting such a stupid mistake on my part :p
     
  12. Beetle

    Beetle L9: Fashionable Member

    Messages:
    627
    Positive Ratings:
    141
    OK So I just had the same problem with textures, and I'm going to explain it the best way I can in hopes someone can explain why this worked.

    What I did was make sure the material I exported with the smd had the same exact name as the smd. I tried everything before that including changing the vtfs to match the name but nothing worked until I did that.

    I'm almost sure the problem is with the exporting and not with you.

    Also, it's important that if you have a collision mesh, you UV unwrap it (I also assigned the same material to the collision mesh).
    PS. I use Blender.
     
    Last edited: Sep 17, 2013
  13. The Asylum

    aa The Asylum

    Messages:
    1,658
    Positive Ratings:
    439
    So if we have multiple skins, how would we deal with that?
     
  14. The Asylum

    aa The Asylum

    Messages:
    1,658
    Positive Ratings:
    439
    On the bright side, I finally got it to spin! Deleted $staticprop from the QC and compiled again. From it's description, I thought $staticprop made the model useable as a static prop, not that it actually made it a static prop
     
  15. Beetle

    Beetle L9: Fashionable Member

    Messages:
    627
    Positive Ratings:
    141
    Code:
    $texturegroup skinfamilies
    {
    	{ "smallflower" }
    	{ "smallflower1" }
    	{ "smallflower2" }
    	{ "smallflower3" }
    	{ "smallflower4" }
    }
    
    That's code I used for my multiple skins. Those are the names of the materials.
     
  16. The Asylum

    aa The Asylum

    Messages:
    1,658
    Positive Ratings:
    439
    So your texture files were named smallflower0.png, smallflower1.png (or tga, or whatever), etc, and they were automatically assigned skin0 and skin1 et al designations when you ran your QC?
     
    • Thanks Thanks x 1
    Last edited: Sep 17, 2013
  17. theharribokid

    aa theharribokid

    Messages:
    867
    Positive Ratings:
    806
    smallflower.vtf and .vmt and yes they would
     
    • Thanks Thanks x 1
  18. Beetle

    Beetle L9: Fashionable Member

    Messages:
    627
    Positive Ratings:
    141
    I didn't need the vtf part for it to work.