Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
Additional dependencies for these instructions: Notepad++, VTFEdit (later).
Useful QC commands: https://developer.valvesoftware.com/wiki/Category:QC_Commands, although I'll tell you all you need to know for now.
- First thing you wanna do is open Notepad++, go to Plugins > Plugin Manager > Show Plugin Manager, find "NppExec", tick it on, install it, and reboot Notepad++ (though you can close it for now).
- In Blender, select the armature, go to pose mode, and make sure the vertices of the mesh move around with the bones of the armature. If you haven't done that, look up a tutorial on weight-painting/rigging for Blender.
- Select the mesh(es) you want to export, go to the scene properties, configure it like http://sta.sh/013zscme7uoj and try exporting. (Click "Export", then choose the files you want to export.) It will export to the export directory chosen, with the file names of the Blender object names (or group names, if things are grouped together).
- If you get an error about too many weights, you can set the "Weight Link Cull" to 1, or use SMD instead. Just make sure to keep the Blender session saved somewhere! If you plan on using flexes ("shape keys" in Blender) at any point, I recommend DMX.
- Now you can go back to Notepad++. Copy-paste the following:
- Save that file together with your DMX or SMD file(s), and call it whatever you want (for example "Scout.qc"), as long as you make sure the extension is QC, not QC.TXT or anything like that.
- Now press F6 in Notepad++ with that QC file still open. You should get a little "Execute..." box pop-up. In that box, copy-paste the following:
- Launch Source FilmMaker, but choose "Open SDK" instead of "Launch Source Filmmaker". Now click "Model Viewer", and go to File > Load Model..., and browse to "usermod" of Source FilmMaker's directory, then go to models and whatever you put as $ModelName. If everything has gone good, you should now get your model... except pink-black checkered.
Tell me when you've done this, and I will go to the texturing part.
My custom character's name is "Steve"
"C:\Program Files (x86)\Steam\steamapps\common\SourceFilmmaker\game\bin\studiomdl.exe" -nop4 -r -game "C:\Program Files (x86)\Steam\steamapps\common\SourceFilmmaker\game\usermod" "C:\Program Files (x86)\Steam\SteamApps\common\SourceFilmmaker\game\usermod\models\Steve.qc"
Process started >>>
qdir: "c:\program files (x86)\steam\steamapps\common\sourcefilmmaker\game\usermod\models\"
gamedir: "C:\Program Files (x86)\Steam\steamapps\common\SourceFilmmaker\game\usermod\"
g_path: "C:\Program Files (x86)\Steam\SteamApps\common\SourceFilmmaker\game\usermod\models\Steve.qc"
Building binary model files...
Working on "Steve.qc"
DMX Model c:\program files (x86)\steam\steamapps\common\sourcefilmmaker\game\usermod\models\Steve.dmx
ERROR: Too many bone influences per vertex!
ERROR: Aborted Processing on 'C:\Program Files (x86)\Steam\SteamApps\common\SourceFilmmaker\game\usermod\models'
<<< Process finished. (Exit code -1)
================ READY ================
$ModelName "C:\Program Files (x86)\Steam\SteamApps\common\SourceFilmmaker\game\usermod\models"
$Body "Body" "Steve.dmx"
$Sequence Ref "C:\Program Files (x86)\Steam\SteamApps\common\SourceFilmmaker\game\usermod\models" FPS 1
$CDMaterials "C:\Program Files (x86)\Steam\SteamApps\common\SourceFilmmaker\game\usermod\models"
QC
$ModelName "C:\Program Files (x86)\Steam\SteamApps\common\SourceFilmmaker\game\usermod\models"
$Body "Body" "Plane.dmx"
$Sequence Ref "C:\Program Files (x86)\Steam\SteamApps\common\SourceFilmmaker\game\usermod\models" FPS 1
$CDMaterials "C:\Program Files (x86)\Steam\SteamApps\common\SourceFilmmaker\game\usermod\models"
Console
Process started >>>
qdir: "c:\program files (x86)\steam\steamapps\common\sourcefilmmaker\game\usermod\models\"
gamedir: "C:\Program Files (x86)\Steam\steamapps\common\SourceFilmmaker\game\usermod\"
g_path: "C:\Program Files (x86)\Steam\SteamApps\common\SourceFilmmaker\game\usermod\models\plane.qc"
Building binary model files...
Working on "plane.qc"
DMX Model c:\program files (x86)\steam\steamapps\common\sourcefilmmaker\game\usermod\models\Plane.dmx
ERROR: Too many unified vertices
ERROR: Aborted Processing on 'C:\Program Files (x86)\Steam\SteamApps\common\SourceFilmmaker\game\usermod\models'
<<< Process finished. (Exit code -1)
================ READY ================
2. A model always needs an armature, (almost) no exceptions.
Also, it should be $ModelName "Steve.mdl", $Sequence Ref "Steve.dmx" FPS 1, and for example $CDMaterials "models/steve" (if you want materials to be in usermod/materials/models/steve).
Also in Addition, not really a big problem but point me in the right direction, only the spine bones appear has bones while everything else is in the unknown section as dots.
- Go to File > Import, find one of your model's textures (if you have them saved outside Blender), and an import dialogue should pop up. Make sure "Texture Type" is RGB888 for Normal, RGBA8888 for Alpha, and the "texture type" is "Animated Texture". Make sure "Generate Mipmaps", "Resize", and "Generate Normal Map" are all turned off. Go to the "Advanced" tab, and make sure the version is 7.4 or 7.5 (preferably 7.5). Click "OK" at the bottom-right, and provided your texture has power-of-two width and height, your texture should now appear in VTFEdit! Horray! Don't worry, the settings will be saved for next time you import another texture.
- Now go to File > Save As..., and navigate to SourceFilmmaker/game/usermod/materials. If the "models" folder doesn't exist (materials/models, not usermod/models!), create it, and go in, otherwise just go in. Make a folder called "steve", go in there too, and save the VTF texture as what name you want (for example "body"). Usually you should make the VTF texture have the same name as the Blender material you want to use it for (unless it's shared between multiple materials).
- Import and save the rest of the textures, if there's more than one.
- Now for setting up the material(s). Go to Notepad++, double-click to the right of the file tabs to make a new empty file, and copy-paste the following:
- If you've done and named it correctly, your model should now appear textured in both Source FilmMaker and the model viewer. If not, let me know. If you want shiny or transparent textures, let me know for that too. Or if you have normal maps.
ill be sure to post this on the workshop when i get a change when i finish the other characters im working on. Ill give acknowledgments to you.
You saved my modeling hobby!!
There was a problem, I have glasses on the model but it only appears if i look at it from behind. I remember on blender I put everything together as one mesh.
Oh and another thing, just in case i might need the other stuff you mention. can you post how to make the shiny or transparent textures and other things like that because i might need to make a custom window or something transparent eventually down the road like for a map.
However, unless there are parts that are only partially transparent, you should preferably use $AlphaTest 1 instead of $Translucent 1, and you should only have transparent parts use a transparent material for the sake of ambient occlusion.
Speaking of ambient occlusion, for transparent things, whether it's $Alpha, $Translucent or $AlphaTest, you should always change $AmbientOcclusion to 0.
To make stuff shiny, either increase $PhongBoost and/or $PhongExponent, or add $EnvMap Env_CubeMap. The first uses phong (the white highlights on models), the second a cubemap. For $EnvMap, you can also add $EnvMapTint "[R G B]" to control the intensity, with 1 being full, and 0 being no shininess. Useful if an object gets too bright or is only supposed to be a little shiny.