Modeling Question

Rizz

L5: Dapper Member
Dec 18, 2009
210
21
I'm having a bit of trouble with a model I made and having it set up in Hammer, and viewable in the Model Viewer.
My model looks like this, and looks like the following after compiled:
http://img41.imageshack.us/img41/8007/finishedcoatrack.png
http://img233.imageshack.us/img233/9671/strange.png

*I should note that even though the model is seamlessly transparent in Valves model viewer, it can detect that the model has vertices and detects the wires in wire frame mode.*


I exported my model in 3DS Max 2010 64-bit using "Wall Worm Tools". It created a .smd and a .qc file.
This is the content of the .qc file:
Code:
$modelname "Coat_Rack.mdl"
$model "Body" "Coat_Rack.smd"
$cdmaterials "models/props_cfi"
$staticprop
$body Coat_Rack "Coat_Rack.smd"
$surfaceprop "Wood_Solid" 
$sequence idle "Coat_Rack" loop fps 30

Since I'm using existing textures for the hat and the coat, I kept the vtf's and vmt's as they were. They show up in the model viewer as-is like they're suppose to.
The following is the vmt code for the coat racks body and the hooks.
Gold Hook
Code:
LightmappedGeneric
{
"$basetexture"  "models/props_gameplay/GoldHook"
"$surfaceprop" "metal"
}

Wooden Coat Rack Body
Code:
"LightmappedGeneric"
{
   "$basetexture" "models/props_gameplay/wood_mahogany"
   "$surfaceprop" "wood"
   "%keywords" "tf"
}



I've compiled all of this together with "StudioCompiler" and "GUIStudioMDL 2.2/Source", I've gotten the same results.
I'm thinking it may be the way I compiled the max file into an smd.

I tried two other ways of getting an smd file.
I have compiled the max file into an smd by using Wall Worm Tools as I stated above, and I've also exported the max file strait into an .smd using some plugin I found.
 
Last edited:

Rexy

The Kwisatz Haderach
aa
Dec 22, 2008
1,798
2,533
Well 2 things that might help, forget the wall worm exporter tool, I've seen it out there, but I can't verify it's functionality, instead I would suggest getting the .smd tools for 3ds max @ www.wunderboy.org. I've used this set of plugins lots of times and have never had any problems with it. It's pretty good stuff.

The second thing that's coming to mind is that you need to set up your shader system as a multi-sub object, so all your textures are in a single material. Exporting a .smd with multiple texture surfaces will typically end up broken/missing unless you're using multi-sub object in 3ds max.
 

Seba

DR. BIG FUCKER, PHD
aa
Jun 9, 2009
2,364
2,728
I think that Rexy's right, it's probably the shaders screwing you over - change the gold hook and wooden coat rack body to VertexLitGeneric (LightmappedGeneric is for brushes and throws errors in-game when used on models).
 

Sgt Frag

L14: Epic Member
May 20, 2008
1,443
710
I haven't had any issues with multi materials from Max and the wunderboy exporters. I have quite a few recent models like this and they work fine. I just put my tex on two different material slots in Max (no sub materials) and apply each to the correct polys.
(You are obviously getting two materials to export, but the vmt's are botched)

The invis material is definitely because you used LightmappedGeneric, I just did that accidentally on Wed and had the same effect.

The pink/black checkers seems more like a missing material, but does need to be Vertlitgen. too.
If you click the 'model tab' in the browser it will say if it's missing (possibly you added a material with wrong name, or typo in the vmt file).
 

Sgt Frag

L14: Epic Member
May 20, 2008
1,443
710
I haven't had any issues with multi materials from Max and the wunderboy exporters. I have quite a few recent models like this and they work fine. I just put my tex on two different material slots in Max (no sub materials) and apply each to the correct polys.
(You are obviously getting two materials to export, but the vmt's are botched)

The invis material is definitely because you used LightmappedGeneric, I just did that accidentally on Wed and had the same effect.

The pink/black checkers seems more like a missing material, but does need to be Vertlitgen. too.
If you click the 'model tab' in the browser it will say if it's missing (possibly you added a material with wrong name, or typo in the vmt file).
 

Rizz

L5: Dapper Member
Dec 18, 2009
210
21
Here's an update on my models status.

Because of you guys, I got the wood texture to show up. I wanted a bit of a reflection to show up on the wood (spec map), so I added a "$envmap" "env_cubemap", however it was way to shiney. I just want a little shiney. I'm going to try "$phong 1" and see if that helps really.
The gold texture still isn't showing up for whatever reason, I've check it's vmt and double checked it.


The wood texture now shows up whereas the gold doesn't.
Here are their vmt's:

Wood
Code:
"VertexLitGeneric"
{
   "$basetexture" "models/props_cfi/wood_mahogany"
   "$surfaceprop" "wood"
   "%keywords" "tf"
   "$envmap" "env_cubemap"
}

Gold
Code:
"VertexLitGeneric"
{
   "$basetexture" "models/props_cfi/goldhook"
   "$surfaceprop" "metal"
}