Search
Username:
Password:
Register or Reset Password
Remove the ads!
Advanced vmt trick & transparency
Difficulty: Intermediate
Category: CS:S > SkinningAuthor(s): modderfreak

This tutorial will cover how to hack off parts of models through the .vmt trick which are in one texture map. This will allow you to edit models which are enforcing consistency, for example playermodels.
With this method, transparency effects are also possible.


Required


Programs:
  • Photoshop or any other advanced picture editing software

  • WordPad, Notepad or any similar editor

Other:
  • A working, updated CSS installation

  • A model & skin you want to hack off parts

Optional:
  • Source-SDK with Half-Life Model Viewer

  • When using Photoshop, the .vtf plugin will come in very handy



Using the trick


Preparing
  • First of all, we need to open the skin we want to edit in our picture-editing software, I will use Photoshop CS3 and Valves default SAS skin for this tutorial.

  • If you have HLMV installed, start it and open the model whose skin you are editing - this will become very handy.



Editing
  • Decide which parts you want to hack off. At this point, it is very important to choose only model parts that have backfaces beneath them or your model will be verbatimly riddled.

  • Search matching parts of the model on the diffuse map. You can use HLMV to find the right places.

  • Now the important part starts: select the skin places with the line tool or any similar tool.
    Refer to screenshot #2.

  • Change to the alpha channel. In there, paint the whole selection black (the rest of the alpha chanell should be white). These parts of the skins will be invisible. Again, you can use HLMV to instantly check your selections - sometimes, you will have to expand your selection by about one pixel because you can still see parts of the hacked-off model part in HLMV.
    Refer to screenshot #3.

  • Note: you can also achieve transparency effects through filling the selection with a greytone instead of pure black. -The darker the grey, the less visible the model part will be.



Saving and .vmt code editing
  • Save your skin in a texture format that uses the alpha channel, for example DXT5 compression.
    Attention: if you save the skin in a texture format that has no alpha channel like DXT1, this will not work!

  • Open up the .vmt file of your skin with your text editor.
    In my case, the default .vmt of the SAS skin will look like this:
    "vertexlitgeneric"
    {
    "$baseTexture" "models\player\ct_sas\ct_sas"
    "$envmap" "env_cubemap"
    "$bumpmap" "models/player/ct_sas/ct_sas_normal"
    "$normalmapalphaenvmapmask" 1
    "$envmapcontrast" 0.3
    "$envmapsaturation" 0.7
    "$envmaptint" "[ 0.36 0.36 0.36 ]"
    }


    We will now add this line to it to activate the transparency effect:
    "$translucent" "1"

    If you don't want to make things transparent, but 100% invisible, you should add these commands to the .vmt to achieve a better outcome:
    "$alphatest" "1"
    "$translucent" "1"

    For all who don't know how to copy and paste, it should look like this:
    "vertexlitgeneric"
    {
    "$baseTexture" "models\player\ct_sas\ct_sas"
    "$alphatest" "1"
    "$translucent" "1"
    "$envmap" "env_cubemap"
    "$bumpmap" "models/player/ct_sas/ct_sas_normal"
    "$normalmapalphaenvmapmask" 1
    "$envmapcontrast" 0.3
    "$envmapsaturation" 0.7
    "$envmaptint" "[ 0.36 0.36 0.36 ]"
    }




You're done. If you followed every step correctly the parts you painted black in the alpha channel will be invisible and the greytones will be transparent ingame.
Screenshot #3 is a compare screen of the SAS model so you can see what I hacked off.
Added: 1 year agoTags: advanced, vmt, trick, transparency, hacking
Feedback (78)
Page of 8   1 2 3 4 ... 6 7 8 Next Page
v3n0m23 .
eNdUReY2M
Posted 24 days ago
Pros: very detailed well explained
Cons: none
Improvements: maybe a video but c'mon everyone will understand it's so f**king easy
Notes: thx man :)
W!peout .
Glove SpecialistY2M
Posted 1 month ago
Looks useful, might need it for my next release :D
Blacktm .
Hi :P.Y2M
Posted 2 months ago
Very nice tutorial.

However read your PMs please.
- Hi :P.
.
Phew, GCSE results are OK!Y2M
Posted 3 months ago
Thank you so much Modderfreak, this has helped me a great deal!
.
Respect is everything.Y2M
Posted 3 months ago
Posted by Ultrimo

Does this work with TF2?

Yes, but you'll have to move the phong exponent map from the alpha channel to a seperate map.
Ultrimo .
For mankind? moar liek for the lulz.Y2M
Posted 3 months ago
Does this work with TF2?
The3nd .
The End of your lifeY2M
Posted 4 months ago
Pros: Thanks man
Cons: none
Improvements: none
Notes: I love you ,This tutorial helped me a lot ,

Thanks
- The End of your life
.
Respect is everything.Y2M
Posted 5 months ago
It works with any texture, map textures included. Still, it would be cheating.
RedArmySoldier .
Compiler for hireY2M
Posted 5 months ago
Will this work with double doors at dust 2?

AHAHA I CHEAT
Kenab .
AKA Amber / SkyY2M
Posted 6 months ago
Very useful.

Nice explications bro, understood well.
Page of 8   1 2 3 4 ... 6 7 8 Next Page
Add Feedback
Provide constructive feedback. What is "constructive"?
You cannot post yet!
Get involved on FPSB by posting your thoughts. Give authors your feedback to help them develop.

To post in this submission register or login.
Assessment
The community's verdict.
User Rating [+]
9.8/10
bScore
9.9/10
You cannot assess yet!
Moderating FPSB is in your hands - when you assess a submission your vote determines its success or failure.

To vote on this submission register or login.
Stamps
This Tutorial in a nutshell...
Helpful & Well Written
You cannot stamp yet!
Stamps let you apply characteristics to submissions to help others understand them.

To stamp this submission register or login.




Brought to you by...
Avenger Corp.™
"Nobody's Banner Disapears More Often!"
Membership: Invite Only
Primary Skills: 3D Animation, 3D Art & Rendering, Compiling, Modelling, Sound Effects & Music, Texturing, UV Mapping
Inception: 2 years ago
Vote for Studio
Like this tut? Vote Avenger Corp.™ for one or more monthly awards.
You must login or register to access this!
Related Tutorials