Three modeling questions that I can't seem to wrap my head around

Ok so, I’m working on a large train map and decided to save brush faces by making models for the tracks.

So what I did was take brush prefabs I made in hammer, and exported them as DXF files, loaded it into 3dsmax, and flipped the normals. Everything seems ok. I started off with a model of two tracks side by side doing a 90 degree turn.

So my questions are:

  1. Collision models
    As I understand it, the collision model is what actually prevents one object from passing through another. I can appreciate why these need to be simple, but this is a 16 segment curve. A collision model would have to hug the rails otherwise it serves no purpose. So can’t I just use the exact same model for a collision model?

  2. Texturing and materials
    Ok, so I have a really nice iron texture, 1024x512 TGA file. It hasn’t been comforted into Valve’s format yet. My question here is, how does the model exported from 3dsmax know which texture is which? Obviously 3dsmax materials don’t translate into Valve materials, so is it just a matter of having the same name? Eg: I apply a material called ‘iron’ to the faces of my model that need iron texture. In my QC file, I put $cdmaterials “props/tracks/” and in there, I have a ‘iron.vtf’ which is the iron.tga file I created.

  3. Debugging
    My first few attempts at creating a model never worked and I have no idea why. studiomdl.exe never reported any issues at all, but when trying to load the model in HLMV, it simply doesn’t work. HLMV spits out an “ERROR LOADING MODEL” warning and that’s that. What steps would one take to debug issues with their models when studiomdl reports no problems at all?

thank you for all your help.

you need to get the vtf plugin, not just rename it as vtf

  1. is there a specific type of 3dsmax material I should be using?
  2. when exporting the SMD file from 3dsmax, it has 9 lines of text in the SMD file, and that’s it. Any idea why?

Get VTF Edit, you can import and export VTF files

And use this compiler (It’s hacked to make it easier)

That’s decompiler, you don’t need one yet.

There are only 9 lines because you didn’t export any textured polygons. Assign a texture to your model and then export. If the smd contains something like this

0 15.839056 -7.724810 41.612946 -0.085967 0.095331 -0.991727 0.046756 0.866297 1 43 1.000000 
0 18.196999 -8.032048 41.379017 -0.085967 0.095331 -0.991727 0.452830 0.866298 1 43 1.000000 
0 18.407017 -8.059414 41.358181 -0.085967 0.095331 -0.991727 0.483184 0.866298 1 43 1.000000 

your export was successful. This also solves your “debugging” problem.

No, you can’t use the same model for the collision mesh. The collision model needs to be made from separate primitives that build up the geometry. There are guides for it at hl2worlds wiki.

Export the tracks via Crafty, otherwise you will get unneeded faces and lose the UV coordinates.

Hi everyone. Thank you all for your replies.

I’m getting closer and closer to achieving my goal one one aspect still perplexes me and that is complex collision models.

This is a 90 degree track turn made up of 16 segments. That has to be 16 meshes for collision models as well, but do the collision models necessarily have to be BIGGER than the original model or just “simpler”?

Secondly, when decompiling models, do you get the collision model as well? I would like to decompile the PHX models and see how they did things for their track models.

Thanks again for all your help…

Just more simple