Source Filmmaker

Source Filmmaker

Number of flex shapes?
Does anyone have a solid answer to how many flex shapes (shapes, not controllers) can be supported by a single model in Source? Specifically DMX format models, because I know the limits are considerably higher.

All the Valve Developer Wiki has to say on the matter is "DMX supports 128 flex controllers and an unknown (but much higher) number of shapes", but maybe someone here has an idea - or maybe knows that the limit must be at least X?

I don't know to what extent it matters, but for the model I have in mind, the overwhelming majority of these shapes will be corrective.
The current version of the model has 29 master shapes and 80 correctives, but adding the next two master shapes that I would like to bolt onto the model will potentially require as many as an additional 160 correctives, as they both have to play nicely with all existing combinations of shapes.

This would put the model at 271 shapes, which exceeds a not-unlikely limit of 256.

Obviously, I'd rather not start on quite such a large task if I'd be stymied at the end, so I'm kinda hoping someone knows what the limit is.

After that, there's maybe the possibility of another 8 or 12 master shapes, but those will be mostly suppressed by domination rules and will require very few, if any, correctives, so will be relatively tame compared to everything else.

(Those of you who've been following what I've posted of late can probably guess that this is part of my attempt to fake dynamic clothing*... and can probably also guess why I'm probably not planning on doing it on quite the same level again, when doing it for a single top requires a few hundred flexes to be made.

Possibly I'll implement it for single axes on more clothing, but even as cool as implementing it in a full three axes looks, it takes days of work, so it's not something that can be done for more than rare cases**).

~~~~~

* Just two axes are working in this earlier WIP, but it gives an idea.

** This particular tanktop is just about worth it, because the character in question wears them a lot*** and I've got a heap of textures for different designs, so I can get a lot of use out of the one model. My other characters have much more varied wardrobes, so the idea of putting in this kind of effort into any one item they wear would be even dafter.

*** She has huge wings - it rather limits what will actually logically fit. If I'm not just going to go "frak it" and just have her wings clip straight through the back of her shirt (and I don't want to do that), then the order of the day is usually either sleeveless or shoulderless.
< >
Showing 1-3 of 3 comments
episoder Sep 9, 2018 @ 12:19am 
well. it's ofc not official, outdated and i haven't managed to compile an entirely working version, but let me quote the 2007 studiomdl code.

#define MAXSTUDIOANIMFRAMES 5000 // max frames per animation #define MAXSTUDIOANIMS 2000 // total animations #define MAXSTUDIOSEQUENCES 1524 // total sequences #define MAXSTUDIOSRCBONES 512 // bones allowed at source movement #define MAXSTUDIOMODELS 32 // sub-models per model #define MAXSTUDIOBODYPARTS 32 #define MAXSTUDIOMESHES 256 #define MAXSTUDIOEVENTS 1024 #define MAXSTUDIOFLEXKEYS 512 #define MAXSTUDIOFLEXRULES 1024 #define MAXSTUDIOBONEWEIGHTS 3 #define MAXSTUDIOCMDS 64 #define MAXSTUDIOMOVEKEYS 64 #define MAXSTUDIOIKRULES 64 #define MAXSTUDIONAME 128

that should be assumed as being relevant for smd only tho. i'm not sure if i tested it and/or if dmx works with this. it could be implied that dmx support is inclusive tho, since the dmx tools code is present, but i cannot confirm anything.
Last edited by episoder; Sep 9, 2018 @ 12:28am
Zappy Sep 9, 2018 @ 12:20am 
Take this with a grain of salt, but... Maybe 1024?
#define MAXSTUDIOFLEXDESC 1024 // maximum number of low level flexes (actual morph targets)
This is present in the 2013 Source SDK as well as Alien Swarm's public source code, in -/src/public/studio.h, which is referenced in many different files (including StudioMDL's stuff).
Last edited by Zappy; Sep 9, 2018 @ 12:46am
Marco Skoll Sep 9, 2018 @ 11:08am 
Well, it sounds like the answer is probably more than 256.

(Although, as StudioMDL has just reminded me on a compile of Cerys' main character model, the controllers are definitely still limited to 128. All of this experimentation with corrective and dynamic flexes is really starting to push her to the limits of what Source's flexes will allow.)

I guess I try risking it, find out, and hope I can do without a few of the correctives if it's too many.
< >
Showing 1-3 of 3 comments
Per page: 1530 50

Date Posted: Sep 8, 2018 @ 7:31pm
Posts: 3