Support SFMLab on Patreon

Flesh Proxy Script


A tool that lets you control the Flesh shader of VertexLitGeneric within SFM

Pic 1

After applying the script to a model, you can control most of the shader's parameters from inside SFM, without having to worry about messing with the Element Viewer.

The shader requires a bit of manual setup. Don't bother if you don't know how to work with VMT files!
Here's a template VMT containing the essential parameters. Since VertexLitGeneric is used, you can use parameters such as $phong just fine.

To install, simply place it where other rig scripts go (.../game/platform/scripts/sfm/animset/). Launch SFM and right-click an animation set -> rig -> setup_flesh. New controls will be added for each material.

What's wrong with the shader/tool:

  • Does not work with SFM's lights, you have to cleverly work with map lighting here.
  • Due to the script's nature, your rootTransform's rotation has to be set to Zero for it to work! You can rotate other bones just fine, however.
  • The interior texture is rendered on top of the basetexture, meaning you can't set it to be transparent without a lot of workarounds.
  • Generated override materials are using the wrong paths at times. If the script doesn't seem to work, make sure the mtlName is correctly set and you're editing the right VMT.
  • Material changes (especially effect centers) are delayed, making animation hard.
  • The script might not work well when rigs are applied, and removes override materials.
  • The black interior color of the effect's border seemingly can not be changed.

And because I'm a timelord from a day in the future, here's some tips for you:

  • Don't add/bother me for help with this tool.
  • This tool is not perfect.
  • The shader it relies on is not perfect (read above for more info).
  • I don't know everything about this shader or this tool.
  • This tool's code is based off of Doc's Color Script, as I'm no Python genius when it comes to SFM's API.
  • If you don't understand something about the shader, I won't either since it's a weird thing.

Pic 2



Nice work. Took a bit to set up fully, but it works like a charm. One quick question though: how did you do the invisibility in the first preview? I tried adding $alpha, I made a transparent .vtf to see if it would work, but couldn't get invisibility working. Everything else is working otherwise.

Pyrtov posted 1 year, 8 months ago


Never mind, tried adding $alpha to the model's texture instead of trying to make the flesh alpha and got a similar result. If that's not what you did, I would still like to hear what your process was. This is definitely an interesting shader.

Pyrtov posted 1 year, 8 months ago


@Pyrtov Setup indeed is a bit annoying, but that's the nature of the shader (and my python skills, as well)... Regarding transparency, I believe it was simply using $alpha 0 (or maybe $cloakfactor 1, I don't really remember) and the flesh effect to make the model appear. You can't really use transparency on the interior texture, since the shader simply renders a second pass over your VertexLitGeneric (and the alpha channel works as a mask), so turning your base model transparent is the only way to go in this case.

RedMser posted 1 year, 8 months ago

Commander Shepard

I'm Commander Shepard, and this is my favorite tool on SFMLab.

Commander Shepard posted 11 months, 3 weeks ago

Leave a reply

You need to be logged in to leave a comment.

Support SFMLab on Patreon