Kangaroo2525 Feb 15 @ 9:52pm
Adding Flexes to Body Groups?
Is it possible to add a flex (such as a facial flex) to a body group? The only result that worked for me only modified the original mesh and not the body group mesh.
Showing 1-14 of 14 comments
< >
6000 ANGRY BEES Feb 15 @ 10:02pm 
I haven't had any luck with doing so.
phillippi2 Feb 15 @ 10:19pm 
Originally posted by Kangaroo2525:
Is it possible to add a flex (such as a facial flex) to a body group? The only result that worked for me only modified the original mesh and not the body group mesh.
I don't believe it's possible. Flex animations don't necessarily use the armature, so it wouldn't make much of a difference anyways.

Are you making custom Flex Animations? What Program are you using?
Kangaroo2525 Feb 15 @ 10:21pm 
Ha, I actually JUST figured it out. You need to create a seperate .qc for the bodygroup, and define the flex in there. Then you just add the $include command to the original model's .qc.
You create the flexes using shapekeys in Blender (not sure what they're called in the other programs, but Blendshapes rings a bell),
Make sure you don't have Under_scores in the flex names or Blender/Studiomdl will thnk the flex is a corrective shape.

You if you export the object as a DMX, the flex infomation is sent to the dmx,

if you export as SMDs it will create a VTA file.

If you named your flexes properly and exported to DMX the only flex controllers you have to identify in your qc are the eyes, the rest will be transferred to the model.

Here are 2 examples the first is a qc for a DMX export, the second for a smd export requiring the generated vta file.

$modelname "mymdlname.mdl"
$model "model" "mymodel.dmx" {
eyeball "eye_0" "Head" -5.199999 -15.060000 39.889997 "eyeball_r" 10 -1 "iris_unused" 10
eyeball "eye_1" "Head" 5.200000 -15.060000 39.889997 "eyeball_l" 10 1 "iris_unused" 10
mouth 0 "mouth" "Head" 0 1 0
flexcontroller eyes range -90 90 eyes_updown
flexcontroller eyes range -90 90 eyes_rightleft
}
$bodygroup "body"
{
studio "abodypart.dmx"
blank // this will allow you to make the part disappear as "none"
}
$bodygroup "body"
{
studio "anotherbodypart.dmx"
studio "a_replacement_for_the_above_part.dmx"
blank // or nothing
}

Now for a smd with vta

$modelname "mymdlname.mdl"
$model "model" "mymodel.smd" {
eyeball "eye_0" "Head" -5.199999 -15.060000 39.889997 "eyeball_r" 10 -1 "iris_unused" 10
eyeball "eye_1" "Head" 5.200000 -15.060000 39.889997 "eyeball_l" 10 1 "iris_unused" 10
mouth 0 "mouth" "Head" 0 1 0
flexfile "mymodel.vta"
{
defaultflex frame 0
flex "l_angry" frame 1
flex "r_angry" frame 2
}
flexcontroller phoneme range 0 1 l_angry
flexcontroller phoneme range 0 1 r_angry
flexcontroller eyes range -90 90 eyes_updown
flexcontroller eyes range -90 90 eyes_rightleft
%l_angry = l_angry
%r_angry = r_angry
}
$bodygroup "body"
{
studio "abodypart.smd"
blank //or nothing
}
$bodygroup "body"
{
studio "anotherbodypart.smd"
studio "replacement_for_above.smd"
blank //or nothing}

Last edited by Pte Jack is away for a MONTH; Feb 16 @ 2:01pm
I thought I had created a studio "model.dmx" call with flexes, but I think it bombed out. I was trying to make a head that could be turned on or off. Studiomdl errors out when trying to define the eyeballs following the Studio "model.dmx" { flex options} command.


Kangaroo2525 Feb 16 @ 2:00pm 
Originally posted by Pte Jack:
Nope, wrong agiain.... You create the flexes using shapekeys in Blender (not sure what they're called in the other programs, but Blendshapes rings a bell),
Make sure you don't have Under_scores in the flex names or Blender/Studiomdl will thnk the flex is a corrective shape.

You if you export the object as a DMX, the flex infomation is sent to the dmx,

if you export as SMDs it will create a VTA file.

If you named your flexes properly and exported to DMX the only flex controllers you have to identify in your qc are the eyes, the rest will be transferred to the model.

Here are 2 examples the first is a qc for a DMX export, the second for a smd export requiring the generated vta file.

$modelname "mymdlname.mdl"
$model "model" "mymodel.dmx" {
eyeball "eye_0" "Head" -5.199999 -15.060000 39.889997 "eyeball_r" 10 -1 "iris_unused" 10
eyeball "eye_1" "Head" 5.200000 -15.060000 39.889997 "eyeball_l" 10 1 "iris_unused" 10
mouth 0 "mouth" "Head" 0 1 0
flexcontroller eyes range -90 90 eyes_updown
flexcontroller eyes range -90 90 eyes_rightleft
}
$bodygroup "body"
{
studio "abodypart.dmx"
blank // this will allow you to make the part disappear as "none"
}
$bodygroup "body"
{
studio "anotherbodypart.dmx"
studio "a_replacement_for_the_above_part.dmx"
blank // or nothing
}

Now for a smd with vta

$modelname "mymdlname.mdl"
$model "model" "mymodel.smd" {
eyeball "eye_0" "Head" -5.199999 -15.060000 39.889997 "eyeball_r" 10 -1 "iris_unused" 10
eyeball "eye_1" "Head" 5.200000 -15.060000 39.889997 "eyeball_l" 10 1 "iris_unused" 10
mouth 0 "mouth" "Head" 0 1 0
flexfile "vn_littlepip_ultimate.vta"
{
defaultflex frame 0
flex "l_angry" frame 1
flex "r_angry" frame 2
}
flexcontroller phoneme range 0 1 l_angry
flexcontroller phoneme range 0 1 r_angry
flexcontroller eyes range -90 90 eyes_updown
flexcontroller eyes range -90 90 eyes_rightleft
%l_angry = l_angry
%r_angry = r_angry
}
$bodygroup "body"
{
studio "abodypart.smd"
blank //or nothing
}
$bodygroup "body"
{
studio "anotherbodypart.smd"
studio "replacement_for_above.smd"
blank //or nothing}

I know how to export flexes in Blender and adding them, etc. etc. I was asking how use a flex in a bodygroup that has its OWN flexes (e.g. let's say that "abodypart.smd" had its own flex I wanted to add). Let's say you wanted to add a headband that streches or even maybe a seperate attached head with its own lip movements. The result I got before was strange and the flex slider ONLY affected the original mesh (as defined by the $model) and not the bodygroup that the flex belonged to.

I found a workaround where you would create a seperate .qc for the bodygroup and add the flex commands in there, and then you go back to the original .qc and use the $include command to attach the bodygroup to the original model. That way, the flex will work fine, but the downside is that I don't think there is any way to add toggles (e.g. having 'studio "replacement_for_above.smd"' and/or 'blank'). But, for my needs (just one .smd that is permanently attached), this method works just fine.
R234 Feb 16 @ 2:09pm 
So, it kinda doesn't work then? It's not really a bodygroup if you can't replace / remove it, now is it?

You could go the TF2 way and make it a separate model with the same flexes that you can bonemerge to the model. You can then copy the character's flex animation samples onto the headband model. Works perfectly fine and the headband would be replaceable.
Kangaroo2525 Feb 16 @ 2:11pm 
Originally posted by R234:
So, it kinda doesn't work then? It's not really a bodygroup if you can't replace / remove it, now is it?

You could go the TF2 way and make it a separate model with the same flexes that you can bonemerge to the model. You can then copy the character's flex animation samples onto the headband model. Works perfectly fine and the headband would be replaceable.

You could do that too I guess. If you really want it to be replaceable.
Yup, understood, and I was trying to find the qc that I thought I had managed to do it with, but when I found it I discovered that the bodygroup I added didn't have flexes after all. I thought there was a replacemodel type command, but I think that only works with LODs.

R234 Feb 16 @ 2:13pm 
Isn't that the whole point of a bodygroup? If it doesn't need to be, it might as well be part of the base model.
i wonder if this could be used to force vta instructions to the bodygroup item. I've never seen it used.

$fakevta
Kangaroo2525 Feb 16 @ 2:24pm 
Originally posted by R234:
Isn't that the whole point of a bodygroup? If it doesn't need to be, it might as well be part of the base model.

Well, in terms of what I use my specific bodygroup for, it is for simplicity. I don't want to make edits to the original mesh, and having something seperate that is compiled into the model later is easier for modeling and texturing. Sure, you can really call it not a bodygroup since it really isn't.
R234 Feb 16 @ 2:41pm 
Oh, right I guess that makes sense ;P
Vintage Feb 18 @ 9:06am 
I didn't bother reading the messages completely, nor do I care it's 2 days since the last post.
Has anypony mentioned using a .dmx with flexes as a bodygroup? I can confirm that it works, but also that it can end up creating multiple controllers of the same controller (like if you have a "Derp" flex controller on the $model mesh, and another "Derp" on the the bodygroup, it will create two, not one, but two flex controller sliders in the FilmMaker and the Model Viewer, one for $model and one for $bodygroup, and so on) if one isn't careful. (Can't be avoided, though.)
Showing 1-14 of 14 comments
< >
Per page: 15 30 50
Date Posted: Feb 15 @ 9:52pm
Posts: 14