Source Filmmaker

Source Filmmaker

Source Filmmaker > Dyskusje ogólne > Szczegóły tematu
Nefnoj 17 Lut, 2014 - 17:21
Tell me what I need to know about compiling!
I'm using the crowbar compiler, and my qc file is as following:

$modelname "models\grunty\grunty_head.mdl"
$cdmaterials "grunty\"

$scale 1
$surfaceprop "cardboard"

$model "studio" "grunty_head.smd"
$sequence idle "grunty_head.SMD" fps 1

$collisionmodel "grunty_head.SMD" {
$mass 50.0
$inertia 1.00
$damping 0.00
$rotdamping 0.00

Everything's turning out fine, except one thing: the Textures, I got the classic purple checker pattern. There are three textures that I'm using, two jpegs, and a tga. My guess? The qc file doesn't have any information about the textures in use. Everything's in the same folder. What am I doing wrong, what do I need to know? I'm new to compiling, and am excited about my newfound power of model-makage.

I did try to Google an answer, but alas, my Google got me naught but sadness.

Help me Private Jack or R234, you're my only hope.

Ostatnio edytowany przez: Nefnoj; 17 Lut, 2014 - 18:51
< >
Wyświetlanie 1-14 z 14 komentarzy
R234 17 Lut, 2014 - 18:37 
The material names are set in the 3D editor you use. If you use Blender that's where you do that:
Note that if you give the material name an extension, such as texture.bmp, that extension will be ignored and replaced by .vmt when the model is compiled.

Then, the QC command $cdmaterials sets the filepath to be used for the material file. For instance, for my enhanced Sniper Rifle model, I set $cdmaterials to "models\R234\EHsniperrifle", which means the material file has to be in materials\models\R234\EHsniperrifle\EHsniperrifle.vmt. Anywhere else and it won't be found, and the model will be covered in pink and black checkers.

I don't know what you named your material(s), but if you keep your QC code as it is it (they) should be situated in materials\grunty\[name].vmt.

Also note that material files are the only thing models can link to, and they in turn can only link to .vtf texture files. Regular image files such as .tga or .jpg won't work.

Oh, and you can get rid of the collision model section if the model is for SFM, it's not needed.
Pte Jack 17 Lut, 2014 - 18:46 
dang, you beat me.... DRAT YOU R234!!!! lol
Nefnoj 17 Lut, 2014 - 18:53 
dang, you beat me.... DRAT YOU R234!!!! lol

I'm at least ninety percent sure that you guys wait at the Source Filmmaker discussion page, just waiting for someone to ask for something, haha.

I'll try your help soon. Isn't there some sort of magic way to make physics apply in Source Filmmaker? I've seen people doing stuff, but never actually cared enough to figure out how they did it.
R234 17 Lut, 2014 - 19:02 
There's SFMphys, but as far as I know it doesn't use the physics data embedded in models, instead using preset shapes and configurable weight and such. Maybe the second version that's being worked on will, I dunno.

I'm at least ninety percent sure that you guys wait at the Source Filmmaker discussion page, just waiting for someone to ask for something, haha
I do sometimes, when I'm bored ;)
Does that mean I'd make a good teacher, I wonder...
raptornx01 17 Lut, 2014 - 19:56 
Sfmphys DOES use the model's hitboxes as a basis. if it doesn't have that the model either won't accept the rig or it won't work properly.

The base shape is really just for static props, giving them either a square/rectangular shape, or a sphere shape. But dynamic models like character models end up acting like regular ragdolls.

as an example the tf2 characters, when the rig is applied and the simulation run, will react as ragdolls. Pony models,on the other hand, don't have traditional hitboxes. The V3s will accept the rig, but act wildly and won't fall like a ragdoll, while the VN overhauls won't accept the rig at all.

If you want your model to react to physics you'll need to include hitbox data and probably collision data as well. I'd say study the tf models and learn from them.
R234 17 Lut, 2014 - 20:04 
I stand corrected.
imagitronics 17 Lut, 2014 - 22:29 
Bonus question that's been on my mind lately. How do you export the material from Blender? The Source export doesn't seem to generate any addition files (vmt, tga, png, or otherwise)? That's the only part I haven't figured out.
R234 17 Lut, 2014 - 22:54 
The material file is basically a text file that contains code. VTFedit can create material files, but I usually prefer to create my own from scratch, or use one that came with SFM as a base. They can be made in notepad, though some prefer to use a real programmer's editor like Notepad++.

I'm by no means a programmer, but .vmt code is relatively simple and straightforward. When in doubt about what a material parametre does or about its syntax, you can usually refer to the Valve Developer Wiki:

Texture files on the other hand require specialized software to create. My personal favourite process is to create them in GIMP (often with the help of a baked AO texture and UV map reference exported from Blender), and use a .vtf plugin to export them directly as Source-ready textures. You can also use VTFedit to convert standard image files into .vtf's. The only VTFedit feature I personally use however is its ability to turn a greyscale heghtmap image into a Source-usable bump map texture.
Pte Jack 18 Lut, 2014 - 1:06 
Dag nab it, does that mean I have to go back and add hitboxes to all the models I;ve removed them from??? snaklefickabrack
Nefnoj 18 Lut, 2014 - 14:55 
Dag nab it, does that mean I have to go back and add hitboxes to all the models I;ve removed them from??? snaklefickabrack
The language! I'm surprised at you, Jack, hahaha.
i had a similar issue. One of the only things I was unsure of was the "bodygroup" in the qc file.

$bodygroup "Cutter"
studio "Cutter.smd"

What is the "bodygroup"? I made it the name of the model file, but previously it had the name of the model it was based on.
R234 18 Lut, 2014 - 17:23 
A bodygroup is a removable and/ or replaceable part of a model. The TF2 Engineer's right hand is an example of that, it can either be replaced with the Gunslinger, or removed entirely (for use with the Short Circuit). His hardhat is also bodygrouped, so it can be removed.

In its current state, your bodygroup code is pretty much useless, or rather, it functions just like $model or $body would, with added complexity for no benefit. If however it looked like this:

$bodygroup "Cutter"
studio "Cutter.smd"

Then the "cutter" part of the model can be removed from the set bodygroup section of an animation set's contextual menu in SFM.
Ok thanks for clearing that up. The original only had one name in the bodygroup.
raptornx01 18 Lut, 2014 - 17:43 
Dag nab it, does that mean I have to go back and add hitboxes to all the models I;ve removed them from??? snaklefickabrack

Try using the script on them, see what happens.
< >
Wyświetlanie 1-14 z 14 komentarzy
Na stronę: 15 30 50

Source Filmmaker > Dyskusje ogólne > Szczegóły tematu
Data napisania: 17 Lut, 2014 - 17:21
Posty: 14