Blender

Blender

Jelli Aug 20, 2017 @ 4:21am
DMX to Blender to SMD? HWM help?
If I imported a DMX model (one that had properly working HWM faceflexes), then decompiled it into SMD (what I've been working with for QC compiling), would the faceflexes still work? Or, can I substitute any .SMD file for a .DMX file in the QC (I've never seen it done, but I've never seen it not done either.

P.S. if anyone wants to just help fix the underlying problem, I really just need someone to throw me a plain working HWM TF2 QC. That's really just it. Crowbar is great but can't give that to me. I've been trying to fix the code manually and I can really only fix one. All they can do is frown.
< >
Showing 1-13 of 13 comments
xdshot Aug 20, 2017 @ 4:44am 
> working HWM TF2 QC
There are HWM models sources (although a bit outdated) included in Source SDK.
Jelli Aug 20, 2017 @ 12:55pm 
yeah but is it in QC format already? I've seen the HWMs as DMXs, and the decompiler doesn't work with DMXs, meaning I have to do the whole DMX to Blender to SMD thing, and hope it works. Which seems unlikely at best.
Jelli Aug 20, 2017 @ 1:01pm 
And I'm not sure about the QCI's when changing a model...
Pte Jack Aug 20, 2017 @ 8:35pm 
If you import SMD models, the Facial flexes are contained in the VTA file. You have to import both. Not all Vertexes are going to match up and you'll have an exportable named VTA (something or other) that can be deleted. You'll have to step through the shapekeys to make sure they work. Any shapekey that has an underscore (_) in the name is a corrective shape.
Last edited by Pte Jack; Aug 20, 2017 @ 8:38pm
Pte Jack Aug 20, 2017 @ 8:39pm 
I talk about advanced DMX shapekeys and flexes in my guide. http://steamcommunity.com/sharedfiles/filedetails/?id=245723825
Last edited by Pte Jack; Aug 20, 2017 @ 8:39pm
Zappy Aug 21, 2017 @ 6:16am 
In case you're interested, VTA flexes literally can not be configured to do what Team Fortress 2's "HWM" class models' flexes do (besides the almost-flex-less Pyro). Firstly, they "wrinkle" and "compress", which is entirely DMX-exclusive, and secondly, there are lots of ways DMX flexes work that are said to not be convert-able to VTA... but I can't tell you for sure something exact that can't be done with VTA flexes (besides "wrinkling" and "compressing").


But would you mind explaining for what reason you want to use SMD and VTA in place of DMX with embedded flexes? If you do so, we might be able to say "nah, that won't work, use DMX instead" or know some other way to help you get what you want.
Last edited by Zappy; Aug 21, 2017 @ 8:14am
Jelli Aug 21, 2017 @ 6:03pm 
Well I've been wanting to use SMD because that's what I've been using in my .QC files, and the VTA is what my exporter spits out. Exporting DMXs has more hassle (material directory, DMX binary/model) than SMDs, and I've never seen an example QC with a DMX, and by now I've gotten used to using SMDs in QCs and compiling. That's why I wanted to use SMDs, I didn't realize that VTAs would not be able to replicate the DMX flexes.
Jelli Aug 21, 2017 @ 6:35pm 
I have not seen any DMXs used in a QC file to compile, which is why I started with and have been using SMDs.

Edit: I'm not aiming to make a model with complicated animations, just a (posable) ragdoll-- an MDL with bones and faceflexes. Just to put that out there.
Last edited by Jelli; Aug 21, 2017 @ 7:16pm
Zappy Aug 22, 2017 @ 6:22am 
Originally posted by Jelli:
- Exporting DMXs has more hassle (material directory, -
For your own good, please just ignore the material directory thing at all costs (unless there's already something in it, in which case get rid of it and then ignore it).

Originally posted by Jelli:
- Exporting DMXs has more hassle ( - DMX binary/model) -
As for this, you should simply set the "Engine Path" near the export button to the "bin" folder of the game you're compiling it for/with, and then the Blender Source Tools will automatically decide which DMX version to export. For example, this is what I have as the "Engine Path" for Source FilmMaker models:
D:\SteamLibrary\steamapps\common\SourceFilmmaker\game\bin\
When you put in a (valid) path, you may get a "Weight Link Cull Threshold" slider below the "Engine Path". Just drag it all the way to 1.0 and don't think more about it.

Originally posted by Jelli:
- and I've never seen an example QC with a DMX, -
If you download the Source SDK from Steam and then run it, then look in -/steamapps/common/
/sourcesdk_content/tf/modelsrc/player/[class]/scripts/[class and stuff ending in QC or QCI], you'll see lots of DMX files being used, and no SMD files being used.

But to put it simple, simply either get rid of ".smd" in file-names in your QC(s), or replace it with ".dmx", and then it'll support DMX rather than SMD.


Originally posted by Jelli:
I have not seen any DMXs used in a QC file to compile, which is why I started with and have been using SMDs. -
I do understand that, but trust me when I say that switching to DMX has almost been painless for me (and putting the "Weight Link Cull Threshold" slider to 1.0 will make it as painless as possible for you), and especially when flexes are involved (you don't have to set up anything in a QC to use DMX flexes (other than loading the DMX in $Body, $BodyGroup or $Model), and the flexes get exported to the same file as the 3D mesh, so it's SMD and VTA in one). You can still use VTA flexes on a DMX model if you want to (in the same way as for SMD models), though make sure the DMX model doesn't already have flexes on its own.


TL;DR: Using DMX and/or switching from SMD(+VTA) to DMX is about as painless as it can be.

Originally posted by Jelli:
- Edit: I'm not aiming to make a model with complicated animations, just a (posable) ragdoll-- an MDL with bones and faceflexes. Just to put that out there.
Well, is it supposed to have simple flexes (where using a flex slider simply enables a single flex on the model and there's nothing special going on), or "HWM"-like flexes?
Jelli Aug 22, 2017 @ 2:07pm 
I guess it's hard for me to say because in the workshop of SFM (that's the setting I aim to work in, too), HWM has a little bit of a fluid definition. I'm looking for sliders that can do more than just "smile" or "frown"-- they can control the left and right halves of the face, and do platysmus, multi_smile, etc. And if I'm understanding you correctly, I make sure the two DMX settings in blender are correct, and then "no touchy-touchy", and I can load the DMX as though it was a simple $model (or $bodygroup if it's just a gloves that I'll attach to hands or whatever). Adjusting the model's shape, texture, etc. is possible? (but NOT messing with the faceflex vertices, because that would defeat the entire point). Also, would it be DMX Binary 2 Model 1?

TL;DR: so I can just adjust the model, export as DMX instead of SMD, and if I do it carefully I basically just put ".DMX" instead of using SMDs before compiling?
Last edited by Jelli; Aug 23, 2017 @ 12:02am
Zappy Aug 23, 2017 @ 6:36am 
Originally posted by Jelli:
- I'm looking for sliders that can do more than just "smile" or "frown"-- they can control the left and right halves of the face, and do platysmus, multi_smile, etc. -
Well, the "left/right"-ness (stereo-ness) and the "multi_"-ness need "Advanced" flexes to work.


To get a simple set of flex controllers, just look in the "Source Engine Exportables" group (a bit beneath the SMD/DMX export button), select an object in the list that has flexes, switch the flex type from "Simple" to the "Advanced" setting, click the "Generate Controllers" button, switch to Blender's Text Editor (in the same way as you'd switch between the UV/Image Editor and the 3D View), and select the flex controller document (in the same way as you'd select an image in the UV/Image Editor).

This will be the same sort of controllers as would be used if you just set the flex type to "Simple".



To make a "left is one flex, half is neutral, right is another flex" slider, just assign two shape key names to one controller.

To make a "multi_" slider, just assign more than two shape key names to one controller.

To make a stereo slider, just change the "stereo" setting to 1.


Something like this:
"DmeCombinationInputControl" { "id" "elementid" "e6717cd1-5f55-3ec3-8490-533038476a2d" "name" "string" "ScalpD" "rawControlNames" "string_array" ["ScalpBack", "ScalpForward"] "stereo" "bool" "1" "eyelid" "bool" "0" "flexMax" "float" "1.0" "flexMin" "float" "0.0" "wrinkleScales" "float_array" ["0.0", "0.0"] }, "DmeCombinationInputControl" { "id" "elementid" "8ca9e5ca-ee09-3b5c-ab8a-97447330c0c1" "name" "string" "Smile" "rawControlNames" "string_array" ["SmileFlat", "SmileFull", "SmileSharp"] "stereo" "bool" "1" "eyelid" "bool" "0" "flexMax" "float" "1.0" "flexMin" "float" "0.0" "wrinkleScales" "float_array" ["1.0", "1.0", "1.0"] },
Here, the "ScalpD" flex controller uses the "ScalpBack" shape key when moved to the left, and the "ScalpForward" shape key when moved to the right, while no shape key is applied at the middle.
The "Smile" flex controller uses the "Smile" slider to determine the intensity, and the (auto-generated) "multi_Smile" slider to determine whether to use the "SmileFlat", "SmileFull", or "SmileSharp" shape key (or a blend of them).

The "ScalpD" and "Smile" flexes have stereo (left/right) controls as well. (Not sure about multi_Smile, but I doubt it.) Note that the amount of numbers in the "wrinkleScales" thing has to match the amount of shape keys in the "rawControlNames" thing, though the numbers can be whatever you want. (If you don't know what $CompressTexture and $StretchTexture are in materials, just keep the wrinkle numbers at 0.0.)

And yes, you can just have a single shape key name in the "rawControlNames" thing, which will just be a normal flex, and yes, you can also set a normal flex to be stereo.


Yes, this comment is a long read, but it can't be explained in simpler terms (even though it will be very simple once you learn it).



If you want to study the workings of "HWM"-ness, read the "readme.pdf" here: https://github.com/revzin/HWMToolkit



Originally posted by Jelli:
- Also, would it be DMX Binary 2 Model 1? -
No. Set the "Engine Path" just beneath the export button to the folder where the StudioMDL you want is located (the "bin" folder of the Source game), and the model/type selections will be replaced with that "Weight Link Cull Threshold" slider I was talking about (that you should set to 1.0), with the model/type being detected based on the StudioMDL.
Last edited by Zappy; Aug 23, 2017 @ 6:41am
Jelli Aug 23, 2017 @ 3:46pm 
Thank you for the link. Do you know what would happen if I exported with "Source Engine Exportables", but did nothing else? Would that damage the model or remove the flexes altogether? Also, there appear to be flexes for faces in the DMX files themselves found in the sourcesdkcontent (what I plan to work with), is there any relation? I guess those two questions kind of go together.
Zappy Aug 24, 2017 @ 5:25am 
Originally posted by Jelli:
Thank you for the link. Do you know what would happen if I exported with "Source Engine Export-ables", but did nothing else? Would that damage the model or remove the flexes altogether? -
I'm not sure what you mean by that. If you mean without setting the flex type to "Advanced", it'll default to "Simple", where every flex will have a completely normal slider for it. If you mean setting the flex type to "Advanced" but not assigning a "flex controller" file before exporting, the export will still have the shape keys, just not the controllers/sliders for the flexes to be usable in Source.

Just be aware that any shape keys with underscores ( _ ) in their names in Blender will be counted as "corrective shapes", regardless of whether you use "Simple" or "Advanced" flexes. For example, if you have a shape key called "A", one called "B", and one called "A_B", you will only get sliders in Source for A and B, but when they're both used, "A_B" is automatically applied (in addition to A and B on their own).

Originally posted by Jelli:
- Also, there appear to be flexes for faces in the DMX files themselves found in the sourcesdkcontent (what I plan to work with), is there any relation? I guess those two questions kind of go together.
As I said before, DMX files can embed flexes inside of them, so by "SMD and VTA in one", I didn't mean DMX could be used in place of both SMD files and VTA files, but can be used as a combination of them. (It can also be used without flexes, of course, being a fine substitute for just SMD.)


Note that the only flex-related things set in $Model for the Team Fortress 2 DMX models are the eyes_updown and eyes_leftright sliders, which are there so the eyes can be posed in Source FilmMaker. The same applies for all of my custom models with flexes, as I use DMX models.
Last edited by Zappy; Aug 24, 2017 @ 5:26am
< >
Showing 1-13 of 13 comments
Per page: 1530 50

Date Posted: Aug 20, 2017 @ 4:21am
Posts: 13