Source Filmmaker

Source Filmmaker

CAT PRIME Feb 1, 2017 @ 5:30pm
Decompiling models to modify flex limits.
I've decompiled the HWM Heavy model in the hopes of remapping it's flex limits to produce garrysmod like expressions. (Previously i had tried to dig around in SFM's files to find the code for flex controllers but found nothing, probably embedded in a DLL file.)

Is it as simple as editing the flexcontoller range numbers in the QC or do i have to import it into blender?

Also, i got a lot of "Failed to parse expression" errors in the file.

< >
Showing 1-15 of 26 comments
Marco Skoll Feb 1, 2017 @ 6:06pm 
Originally posted by Mizar:
Is it as simple as editing the flexcontoller range numbers in the QC or do i have to import it into blender?
Unfortunately: Neither.

Many of the features in Valve's HWM models cannot be properly decompiled by tools currently available to the community. What you're wading into is an uncharted minefield where you'll have to manually reconstruct several controls, including some that are undocumented and/or unsupported by Blender.

There's a reason why even some of the community's most experienced modellers are often found wishlisting the idea of exaggerated face flexes, and why (almost) all of the "Enhanced" HWM models on the workshop are missing features from the official HWM models.

If you want to reconstruct it with just the controls supported by SMD and VTA, that's a relatively simple task (load it into Blender, multiply the flexes), but it will mean that several controls are missing when you reassemble the model.
Last edited by Marco Skoll; Feb 1, 2017 @ 6:08pm
CAT PRIME Feb 1, 2017 @ 6:33pm 
Originally posted by Marco Skoll:
Originally posted by Mizar:
Is it as simple as editing the flexcontoller range numbers in the QC or do i have to import it into blender?
Unfortunately: Neither.

Many of the features in Valve's HWM models cannot be properly decompiled by tools currently available to the community. What you're wading into is an uncharted minefield where you'll have to manually reconstruct several controls, including some that are undocumented and/or unsupported by Blender.

There's a reason why even some of the community's most experienced modellers are often found wishlisting the idea of exaggerated face flexes, and why (almost) all of the "Enhanced" HWM models on the workshop are missing features from the official HWM models.

If you want to reconstruct it with just the controls supported by SMD and VTA, that's a relatively simple task (load it into Blender, multiply the flexes), but it will mean that several controls are missing when you reassemble the model.

I did find some lua files in the sdk tools folder, but i'm not sure what these do exactly. I would think if they made a difference someone would have done it already.

I suppose someone could rig the faces like normal bones instead of flexes, i've seen a few models with these. Maybe using the regular game models.

ZeqMacaw Feb 1, 2017 @ 7:02pm 
The "Failed to parse expression" lines are simply an indication that Crowbar does not know how to decompile those flex controllers, probably because they can only be used in a DMX file and would not work in a QC file.
Last edited by ZeqMacaw; Feb 1, 2017 @ 7:03pm
Pte Jack Feb 1, 2017 @ 7:14pm 
Zeq and I have discussed this a couple of times.

All the Flex controllers and the corrective shape import into the model when you import the VTA. These "Unable to parse" errors may be actual parameters for setting up Advanced Shapekeys (we really don't know they aren't parsable) in a DMX file. As Crowbar only extracts SMD and not DMX (hint hint - wink wink) files, the parameters are of no use to a model that is being imported to Blender anyway.

As for Derpy Flexes, you would have to import the model into a 3D Editor like blender, maya or 3DS Max and edit the shapekey/blendshapes to go the way you want. Export the new SMD/DMX files and pray the model compiles properly. You would also want to rename the model so that is becomes its own identity in SFM.
Last edited by Pte Jack; Feb 1, 2017 @ 7:19pm
CAT PRIME Feb 1, 2017 @ 7:22pm 
Alright, now that i know this is basically impossible, I'll move on to a different but probably equally far fetched idea.
Pte Jack Feb 1, 2017 @ 7:24pm 
but it's not impossible... you just have to work to make it do it.
CAT PRIME Feb 1, 2017 @ 7:28pm 
Originally posted by Pte Jack:
but it's not impossible... you just have to work to make it do it.

I know, i'm gonna try a different method.
Marco Skoll Feb 1, 2017 @ 7:29pm 
Well, if what you want is the completely distorted expressions of Gmod (I don't personally like them, but hey), then chances are you probably won't get too teary-eyed over the advanced features you'd lose in a decompile.

It's stuff like the wrinkle maps (the model's textures actually change with the movement of the face. A raised eyebrow, for example, results in a creased brow) and corrective shapes (which are actually trying to avoid the torn vertices you can get from stacking flexes).

However, for the people who want to be able to have insane expressions and clever features in the same model, or just want to be able to move the flexes a little bit more*... implementing that is a pain in the jacksie.

* What I learnt when doing my first few face flex set-ups that I really do need to make the flexes about 50% bigger than I think I need them.
Pte Jack Feb 1, 2017 @ 7:34pm 
Jacksies ... I'm offended LOL hahahahahahahaha

If you know of a different method of doing something like this, I'm all eyes. I want to read about it.
CAT PRIME Feb 1, 2017 @ 7:42pm 
Originally posted by Pte Jack:
Jacksies ... I'm offended LOL hahahahahahahaha

If you know of a different method of doing something like this, I'm all eyes. I want to read about it.

Well i had the idea of removing the flexes and replacing them with bones.
I've seen a few models that use bones in the face instead of flexes, (I think the overwatch models do this actually) I'm not sure how difficult it would be to implement, but if it's possible, and done right, we could get some pretty absurd results.

Pte Jack Feb 1, 2017 @ 7:43pm 
That's one way I guess.
Marco Skoll Feb 1, 2017 @ 8:06pm 
Originally posted by Mizar:
Well i had the idea of removing the flexes and replacing them with bones.
Well, flex and bone animation aren't mutually exclusive.

Lots of games do use bone animation for faces, but flex animation does have considerable advantages in that role, in that the same flex key can move different vertices in different directions and doesn't need its weighting normalised between keys.

I wouldn't normally deliberately implement a face with both, but if you've already got (even only some of) one form, it's not worth deleting to implement the other. Keep both.

Originally posted by Pte Jack:
Jacksies ... I'm offended LOL hahahahahahahaha
(Adopts an even more exaggerated English accent than he already has). It's one's bottom, don't you know.



Pte Jack Feb 1, 2017 @ 9:03pm 
Originally posted by Marco Skoll:
(Adopts an even more exaggerated English accent than he already has). It's one's bottom, don't you know.

Butt, derrière, bum, and a few others that would be censored, but never Jacksies... lol
CAT PRIME Feb 1, 2017 @ 9:10pm 
Ah, ♥♥♥♥, i forgot about bone weighting.
Zappy Feb 1, 2017 @ 10:59pm 
Might I add that there are (outdated) HWM class model source files available with the Source SDK (but still HWM even though it's oudated, simply just missing some bodygroups and such)?
< >
Showing 1-15 of 26 comments
Per page: 1530 50

Date Posted: Feb 1, 2017 @ 5:30pm
Posts: 26