My first model import

Mystic Monkey

L5: Dapper Member
Jan 24, 2011
224
12
So what am I doing wrong here? Here is a step-by-step on what I'm trying to acomplish.
To sum it up, I'm trying to make this intro a prop for my TF2 map. Said map has brush-made entidy item boxes but would much rather use model props.
  1. Got Blender and set it up with Blender Source Tools.
  2. I downloaded the .zip folder from The Models Resource. With VTFEdit. I converted all the image files. I kept their original names, very basic .vmt files.
  3. After setting up Blender preference with the Source Tool, I imported the "item box ground.obj". At first I figured I'd have to configure the textures but surprised that it was already mapped. I just had to rename the materials to the .vtf (saves me the trouble of renaming them with word documents).
  4. I set the Export Path for where I want the .smd to end up and the and Engine Path for Garry's Mod bin.*
  5. I animated the "display icon" to spin.
  6. I noticed there was no _physic.smd, given they are slightly different from regular reference.smd I do not know how to set them. Will put a pin in it for now.
  7. I noticed a .qc was not included, so I made a rough one. I plan on adding the reflectivity on it later.
  8. After some trial and error, I got Crowbar to recognise and compile it.
    Code:
    $modelname    "Mystic_Monkey\sa_itemboxes\sa_itembox.mdl"
    
    $BodyGroup "base"
    
    {
        studio "sa_itembox_base.smd"
    }
    $BodyGroup "capsule"
    
    {
        studio "sa_itembox_capsule.smd"
    }
    
    $BodyGroup "lid"
    {
        studio "sa_itembox_lid.smd"
    }
    
    $BodyGroup "display"
    {
        studio "sa_itembox_display.smd"
    }
    
    $surfaceprop "glass"
    
    $Contents "solid"
    
    $cdmaterials    "\models\Mystic_Monkey\sa_itemboxes\"
    
    $texturegroup "skinfamilies"
    {
        { "baneside" "board_ura" "boxbtm1" "boxfoot" "boxside" "fine_sky_ref" "item_1up"       }
        { "baneside" "board_ura" "boxbtm1" "boxfoot" "boxside" "fine_sky_ref" "item_explosion" }
        { "baneside" "board_ura" "boxbtm1" "boxfoot" "boxside" "fine_sky_ref" "item_muteki"    }
        { "baneside" "board_ura" "boxbtm1" "boxfoot" "boxside" "fine_sky_ref" "item_nbarrier"  }
        { "baneside" "board_ura" "boxbtm1" "boxfoot" "boxside" "fine_sky_ref" "item_ring5"     }
        { "baneside" "board_ura" "boxbtm1" "boxfoot" "boxside" "fine_sky_ref" "item_ring10"    }
        { "baneside" "board_ura" "boxbtm1" "boxfoot" "boxside" "fine_sky_ref" "item_ringq"     }
        { "baneside" "board_ura" "boxbtm1" "boxfoot" "boxside" "fine_sky_ref" "item_ring5"     }
        { "baneside" "board_ura" "boxbtm1" "boxfoot" "boxside" "fine_sky_ref" "item_speed"     }
        { "baneside" "board_ura" "boxbtm1" "boxfoot" "boxside" "fine_sky_ref" "item_tbarrier"  }
        { "baneside" "board_ura" "boxbtm1" "boxfoot" "boxside" "fine_sky_ref" "item_tstop"     }
    }
    
    $sequence "ref" {
        "sa_itembox_base.smd"
    }
  9. I doubt I set $sequence "ref" right.
  10. When Crowbar opens HLMV for me it shows my model with error texture.
    Untitled.png

  11. Figured maybe I should move the files from the compile folder and put them in their designated folder as addressed in the .qc I written.
  12. The sa_itembox_display shows up... well, one side of it does, but the rest of the prop is invisible. There is still wireframe and such, just invisible. The display doesn't appear to be spinning as intended to.
    Untitled.png
*I'm making them for my Team Fortress 2 map and I know where the /bin directory for it is. But I also want to put it on Garry's Mod workshop purely for the conveniance of anyone else who need these models as much as I do.

So now I'm pretty much stump on what to do. As an experiment I figured "what if I made all the .smd parts file have the sa_itembox_display.smd image file given it's the only one to show up?" and it... sorta works, it covers the model with the display icon and I notice the model sort of X-rays and hollows itself at parts.
(I'd rather not do it all over again just for an image)

I figured maybe the polygons needed to be inverted but that doesn't seem to work either.
Untitled.png
Looks the same as previous image when put in it's addressed folder.

So what exactly am I doing wrong here? I mean I know the .qc is shoddy and doesn't have a _physics.smd (will need help with that later) but I'd rather see if I can get this model looking right before I can add those things.
 
Last edited:

Mystic Monkey

L5: Dapper Member
Jan 24, 2011
224
12
Untitled.png
It appears to know where the textures are.
There are 16 textures for it. "Material Used" know all the textures but for some reason the .VMTs "item_nbarria" and "item_tbarria" are not on the list.

I checked the skinfamilies and it's all addressed correctly and the .vmt that the barrier displays have are the same as the other .vmt for display_icon.

Turns out I mislabled them wrong. Accidentally spelt them as "item_nbarrier" and "item_tbarrier" in the .qc

But the rest of the model is still invisible and the sa_itembox_display should present it's texture on both sides, not just one. I don't know why just one side of that part of the model is visable.
 
Last edited:

Mystic Monkey

L5: Dapper Member
Jan 24, 2011
224
12
Good news!
Untitled.png
I was simply using the wrong shader for the materials. They had "LightMappedGeneric" instead of "VertexlitGeneric". I knew of these shaders but not really what they properly do.

For some reason fine_sky_ref is broken, but the model still acknowledge it's there. And zooming into the model the sa_itembox_display is still not double-sided, or animated for that matter but thats the next step.
Still, a leap of progress since my last post. I'm rather excited I nearly finished this! I want to put it on GMods workshop for everyone to freely use.

And of course the matter of the Physics. Blender didn't give me a .smd file on it so I do not know how they are made.
 

DrSquishy

we've all had better times to die
aa
Feb 10, 2017
1,297
974
And of course the matter of the Physics. Blender didn't give me a .smd file on it so I do not know how they are made.

You need to create and export a seperate mesh for your physics SMD afaik
 

Mystic Monkey

L5: Dapper Member
Jan 24, 2011
224
12
Woild that require me merging all the model parts together, or do I need to make the mesh seperately or something? Given the item box as a single model consist of seperate .smd parts.
 

DrSquishy

we've all had better times to die
aa
Feb 10, 2017
1,297
974
Woild that require me merging all the model parts together, or do I need to make the mesh seperately or something? Given the item box as a single model consist of seperate .smd parts.
Create a seperate mesh that's basically just a simplified version of your overall thing then export it
 

Mystic Monkey

L5: Dapper Member
Jan 24, 2011
224
12
Sorta cheated and used a model rendering program I'm more decent at, but as long as it can be imported thats what count.
Adventure item box.png
Will this do for the physics?

Though it won't import. Says it doesn't have any polygons. I thought a polygon was just another word for the squares and triangles that made up a model?
 
Last edited:

Mystic Monkey

L5: Dapper Member
Jan 24, 2011
224
12
I figured wireframe alone wasn't enough so I made it a solid model and exported it. Using other _physics.smd as reference I replaced where the texture is usually written for "phys" and put spaces before all those zeroes.
Adventure item box.png
I also fixed the fine_sky_ref.vmt, I dunno what was wrong with it, I simply deleted and redid it again. While the Display icon is not suppose to be over the glass, I kinda like it this way.

Now all my model needs now are two things, both involving the sa_itembox_display.smd or "Display Icon".
  • It's suppose to be textured double-sided. It looks exactly how I want it on one side but it's other side is invisible. (Edit: figured it out and fixed it.)
  • It's also suppose to be spinning. I'm sure I set it's animation in Blender but for some reason it did not export over with it.
This is so that players can recognise the content of the item box from any horizontal angle they approach it at.

Once I figure out these things I'll finally be ready to put together this item pack for the workshop as well as be able to use them in my map.

(I have to say I'm very thankful and excited that I nearly finished this. I never figured I'd have such a model in my map and now I'm learning how to do it myself. I am very thankful for the help I've been getting.)
 
Last edited: