Extract a texture from a model for customization

So I’d need help, since I want to customize Father Grigori for the comics. The thing is, I’m a total retard for those things. Vtx, vmts, mdls, tgas, gcfs, hexs, it’s all Chinese for me. So far I extracted all the files that had “monk” for name (monk.dx80.vtx, monk.dx90.vtx, monk.sw.vtx, monk.vvd, monk_animations.ani, monk_animations.mdl, monk.phy, monk.mdl and monk.jpg) What do I do now?

Help!

The texture isn’t in the model for valve models, it’s in the materials section in vtf and vmf
formats.

But to have a model duped you need to hex edit it so you can rename it.

And in which file are these vtf and vmf?

Edit: Found this in the .mdl file:

IDST,   h‰žmonk.mdl 
monk_reference.smd 

Well, since the monk model files are found in the ‘Source Models’ gcf, the materials are found in the ‘Source Materials’ gcf.

To edit them, you’ll need VTFEdit.

Got it :smiley:

Thanks!

Double Post!

So now I have re textured the TGA, what do I do to put it on the model?

Write a vmt for it that hooks up your new texture to the model, then test it out in Gmod/Model Viewer/whatever.

Make sure the file paths are right so you don’t end up with purple and black checkers on your model.

VTFEdit can write vMTs for you, but you need to fiddle with them because sometimes the lighting isn’t right.

I tried to convert my TGA to a VMF but when I try to open StudioCompiler I get this:

The Procedure entry point Q_vsnprinf could not be located in the dynamic link libary vstblib.dll.

Edit: Got it to work

Double post again =/

Okay so I don’t get anything to StudioCompiler. Material, Model, Compile, Decompile, VTF Export, Normal Map, Shader, what the fuck are those thing meaning?

material, model are kind of self-explanatory

compile, decompile are too - convert the smd to mdl and vice versa

vtf export - convert tga to vtf

normal map - a map that can make a flat surface look bumpy, the engine interprets colors as depth. Basically it’s a very efficient way of making low poly models look high poly. the difference between bump and normal maps is that normal maps have direction, not just depth. See here and here. An example of the effect is here. It’s not a perfect technique, but it works pretty well.

Shaders are difficult to explain because there are so many types. Basically they’re what determines how things are rendered. Stained glass windows, the windows in portal, portals themselves, water, etc all make heavy use of shaders, but they’re just obvious examples. Absolutely everything uses shaders. And I mean literally everything, that’s just how source works. examples are $vertexlitgeneric for models and $lightmappedgeneric for world geometry, they’re the most common. See this and this for more info.

What’s a smd?

Anyway thanks, but how do I compile a model with StudioCompiler? Because I tried to follow the tutorial on their website, but I can’t understand a thing they say.

The model you make gets exported to an smd model - usually referred to as the reference smd. All of the animations get exported to their own smds as well, but these files don’t contain model information, just the animations themselves, ie the bone movements. The physics mesh gets exported to an smd as well. The qc file defines a lot of information about how source should be treating the model. Mass, paths to animations, etc. The whole mess gets compiled into an mdl (from the reference mesh), a .phy or whatever, animations, etc.

The vtf defines the texture and the vmt defines properties of the material. But besides being referenced by the qc, these are completely separate. So besides hacking the files for “monk,” you shoud only need to worry about the texture files.

But when I try to compile the model it says I need a SMD, so where do I get it?

Okay so I got the SMDs, I compiled my texture (or material), but now how do I modify my reference SMD so it will load my custom texture instead of the default one?

Ok guys.

I cleared this up in Steam Chat.

But in future, know your shit.

No, just place the texture in the folder where the installed game is (Materials/models/Monk/Monk_sheet.vtf). Unless you want to hex it, than just use this tutorial: Tutorial.

Edit: Darn it, I was ninjad.:ninja:

Founded in 2004, Leakfree.org became one of the first online communities dedicated to Valve’s Source engine development. It is more famously known for the formation of Black Mesa: Source under the 'Leakfree Modification Team' handle in September 2004.