STEAM GROUP
Blender Source Tools BleST
STEAM GROUP
Blender Source Tools BleST
376
IN-GAME
2,115
ONLINE
Founded
8 November, 2013
All Discussions > Help > Topic Details
Jpuffle5 17 Aug, 2017 @ 7:09pm
Shape Keys Problem
I made shape keys for a model. I exported the model as dmx and a smd to get the vta. After
compile my shape keys are not the same as they were in Blender. Here is the QC -

$modelname "zp models\jeffery_2\jeffery.mdl"

$model "body" "jeffery (2).dmx" {

flexfile "jeffery.vta"
{
defaultflex frame 0
flex "eye_blink" frame 1
flex "l_eye_mad" frame 2
flex "l_eye_bored" frame 3
flex "l_eye_sad" frame 4
flex "r_eye_mad" frame 5
flex "r_eye_bored" frame 6
flex "r_eye_sad" frame 7
}

flexcontroller phoneme range 0 1 l_eye_mad
flexcontroller phoneme range 0 1 l_eye_bored
flexcontroller phoneme range 0 1 l_eye_sad
flexcontroller phoneme range 0 1 r_eye_mad
flexcontroller phoneme range 0 1 r_eye_bored
flexcontroller phoneme range 0 1 r_eye_sad
flexcontroller phoneme range 0 1 blank
flexcontroller phoneme range 0 1 eye_blink1
flexcontroller phoneme range 0 1 eye_blink2


%l_eye_mad = l_eye_mad
%l_eye_bored = l_eye_bored
%l_eye_sad = l_eye_sad
%r_eye_mad = r_eye_mad
%r_eye_bored = r_eye_bored
%r_eye_sad = r_eye_sad
%eye_blink1 = eye_blink1
%eye_blink2 = eye_blink2
}

$mostlyopaque

$cdmaterials "models\zp models\jeffery"

$surfaceprop "default"
$jointsurfaceprop "bip_body_2" "default"
$jointsurfaceprop "whale" "default"
$jointsurfaceprop "blender_implicit" "default"


$sequence "idle" "jeffery.dmx" {
fps 1
}

$CollisionModel "jeffery_physics.dmx"
{
$mass 0.002
$inertia 1
$damping 0
$rotdamping 0
$rootbone " "
$concave

}
Last edited by Jpuffle5; 18 Aug, 2017 @ 6:23am
< >
Showing 1-15 of 20 comments
xdshot 17 Aug, 2017 @ 7:40pm 
> %eye_blink1 = eye_blink1
> %eye_blink2 = eye_blink2

You don't seem to have these flexes, but you have eye_blink. Replace those lines with:

%eye_blink = eye_blink

Also, your dmx should already include those flexes if you exported with 'Simple' flex controllers, so you don't need .vta file and vta-related stuff in qc.
xdshot 17 Aug, 2017 @ 7:41pm 
> my shape keys are not the same as they were in Blender

Would be better to see the differences.
Zappy 18 Aug, 2017 @ 5:40am 
As xDShot™ (on vacation) said, DMX models have flexes and flex controllers embedded inside them. And the way you tried to set up the flexes in the $Model command gets (almost) the exact same result as how the Blender Source Tools automatically implements flex controllers when using the "Simple" flex type for the DMX.

The only exception to that is that flex "decay" is enabled by default for VTA and disabled by default for DMX, but as that just makes flexes take some time to "settle in" (which also doesn't work right in Source FilmMaker when exporting a poster or switching to a new shot), that's likely something you don't want to have, anyway (especially considering you have "SFM" in your Steam user-name).
Jpuffle5 18 Aug, 2017 @ 6:29am 
I have a new problem. I am animating a whale in SFM, and if I replace the model files with the new ones, which have new shape keys/flexes, it disorts the animated model.
Zappy 18 Aug, 2017 @ 6:30am 
Originally posted by Jpuffle5 the Penguin SFM:
I have a new problem. I am animating a whale in SFM, and if I replace the model files with the new ones, which have new shape keys/flexes, it disorts the animated model.
You can try right-clicking the model's animationset and choosing "Utilities" > "Re-attach to model" or such. Do keep a backup of the session, though.
Jpuffle5 18 Aug, 2017 @ 6:32am 
Originally posted by Zappy:
Originally posted by Jpuffle5 the Penguin SFM:
I have a new problem. I am animating a whale in SFM, and if I replace the model files with the new ones, which have new shape keys/flexes, it disorts the animated model.
You can try right-clicking the model's animationset and choosing "Utilities" > "Re-attach to model" or such. Do keep a backup of the session, though.
What will that do?
Zappy 18 Aug, 2017 @ 6:38am 
Originally posted by Jpuffle5 the Penguin SFM:
What will that do?
Source FilmMaker doesn't say "okay, at this point, the bip_head bone is here", it says "okay, at this point, bone number 7 is here". It generates a list of user-friendly bone names for the user, which the bone numbers correspond correctly to.

The "Re-attach to model" thing then looks up what bone names are currently what bone numbers on the animationset, and then it re-generates the list for bone-name-to-number based on the current model, while moving the old bip_head's animation (maybe bone 7) to the new bip_head's animation (maybe bone 21 now).


In simpler terms, it looks at what used to be bip_head, then moves what is currently bip_head over there. The same goes for all other bones (and flexes).
Jpuffle5 18 Aug, 2017 @ 6:46am 
Originally posted by Zappy:
Originally posted by Jpuffle5 the Penguin SFM:
What will that do?
Source FilmMaker doesn't say "okay, at this point, the bip_head bone is here", it says "okay, at this point, bone number 7 is here". It generates a list of user-friendly bone names for the user, which the bone numbers correspond correctly to.

The "Re-attach to model" thing then looks up what bone names are currently what bone numbers on the animationset, and then it re-generates the list for bone-name-to-number based on the current model, while moving the old bip_head's animation (maybe bone 7) to the new bip_head's animation (maybe bone 21 now).


In simpler terms, it looks at what used to be bip_head, then moves what is currently bip_head over there. The same goes for all other bones (and flexes).
Will this let me use the new flexes?
Zappy 18 Aug, 2017 @ 6:49am 
Originally posted by Jpuffle5 the Penguin SFM:
Will this let me use the new flexes?
Yes.
Jpuffle5 18 Aug, 2017 @ 7:00am 

Originally posted by Jpuffle5 the Penguin SFM:
Originally posted by Zappy:
Source FilmMaker doesn't say "okay, at this point, the bip_head bone is here", it says "okay, at this point, bone number 7 is here". It generates a list of user-friendly bone names for the user, which the bone numbers correspond correctly to.

The "Re-attach to model" thing then looks up what bone names are currently what bone numbers on the animationset, and then it re-generates the list for bone-name-to-number based on the current model, while moving the old bip_head's animation (maybe bone 7) to the new bip_head's animation (maybe bone 21 now).


In simpler terms, it looks at what used to be bip_head, then moves what is currently bip_head over there. The same goes for all other bones (and flexes).
Will this let me use the new flexes?


Originally posted by Zappy:
Originally posted by Jpuffle5 the Penguin SFM:
Will this let me use the new flexes?
Yes.
How will it find the new flexes?
Last edited by Jpuffle5; 18 Aug, 2017 @ 7:00am
Zappy 18 Aug, 2017 @ 7:05am 
Originally posted by Jpuffle5 the Penguin SFM:
How will it find the new flexes?
It doesn't only look at what existing old controls would map to what current controls, it also brings in new controls that weren't there before.
Jpuffle5 18 Aug, 2017 @ 7:09am 
I don't get how it finds the new ones.
Zappy 18 Aug, 2017 @ 7:11am 
Originally posted by Jpuffle5 the Penguin SFM:
I don't get how it finds the new ones.
The exact same way as if you were to spawn the model in a completely new session.
Jpuffle5 18 Aug, 2017 @ 7:15am 
I have a model that I have animated in SFM. I went back to fix some shape keys/flexes in Blender. If I recompile the model it will mess up past animations.
Last edited by Jpuffle5; 18 Aug, 2017 @ 7:15am
Zappy 18 Aug, 2017 @ 7:20am 
Originally posted by Jpuffle5 the Penguin SFM:
I have a model that I have animated in SFM. I went back to fix some shape keys/flexes in Blender. If I recompile the model it will mess up past animations.
Refer to comment #5 of this thread.
< >
Showing 1-15 of 20 comments
Per page: 1530 50

All Discussions > Help > Topic Details
Date Posted: 17 Aug, 2017 @ 7:09pm
Posts: 20