Material extraction from model

If I got a water model from a gcf file how do I go about extracting the water material from it?
(The model is called “shaderslab3.mdl”)

Open the model in HLMV. Go to the “Model” tab, look at “VMTs loaded”. That will tell you the name and path of the material (.vmt). Extract it from the appropriate GCF.

Most materials will contain a pointer to a texture (.vtf), which you will also need to extract. Water shaders are usually exceptions to this, however.

I can’t open the model in that because it crashes…any other way?

Use the Source Engine 2009 version of HLMV, not the 2007. The 2007 HLMV is broken.

If it’s still crashing, it’s because your model is broken, probably because you extracted it to the wrong place, or messed up any hexing you did. Try just loading it from the GCF (HLMV can do that).

How do you use that one instead? Does it involve changing the game the SDK is set to (because that would be annoying).

It’s one of the drop-down menus. You’ve got the one for the current game, then you’ve got the one for the engine. You usually have to make different configurations for separate ones.

And yes, it is somewhat annoying. Especially since (last I checked) the 2009 Hammer was broken, so I had to change engines (which requires closing all open SDK programs) to switch between HLMV and Hammer.

Is the Source 2009 one TF2?

As of May 2010, it was:
2006 for HL2, CS:S, HL2DM and Episode 1
2007 for Episode 2
2009 for Portal, TF2 and DOD:S.

However, I’m pretty sure that’s changed. Unfortunately, when I tried to refresh my SDK to make sure I was giving you current info, something messed up, and I can’t access the 2007 SDK at all, and none of the HL2 games except HL2DM have any config at all.

humm, that is annoying. Also out of interest do you always have the SDK open when compiling or using the SDK programs?

Me? Always. It makes it quicker to get back into it when Hammer or HLMV crashes. Instead of reopening Steam, then relaunching the SDK, then reopening the program, I can just alt-tab back to the SDK and launch it again.

And the launcher does set some environment variables for you, so my scripts can just use “%sourcesdk%” instead of “c:/steam/steamapps/bob42/sourcesdk/”. Very useful.

Humm ok, because usually I just use a folder full of all the shortcuts to programs I would ever need and navigate them from there, but maybe it would be useful to have the SDk running also.