Adding Flexes to Bodygroups: Difference between revisions
Sage J. Fox (talk | contribs) (Added details for getting stereo flexes to work on bodygroups. ~~~~) |
No edit summary |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{orphan}} | |||
[[Category:Modeling]] | [[Category:Modeling]] | ||
{{note|This only works | {{note|This fix only works with models exported in the .dmx binary type.}} | ||
[[File:Flex.png|thumb|right|Models that don't use this fix may have | [[File:Flex.png|thumb|right|Models that don't use this fix may have redundant duplicate flexes.]] | ||
There's an issue in Source with flexes (shapekeys) applied on bodygroup meshes that effectively makes them useless. This is frequent,for example, on models that have head bodygroup variations with flex controllers assigned to them. | |||
== The fix == | == The fix == | ||
You will need Blender and the other essential source exporting tools (Crowbar, Blender Source Tools) for this fix. | |||
{{note| | |||
Assuming the shape keys already exist, split the mesh that will be used as a separate bodygroup. | |||
{{note|The bodygroup mesh and the main mesh '''must''' share the same shapekeys. If they don't, join the bodygroup mesh with the base mesh and then separate them again.}} | |||
[[File:Flexproperties blender.png|thumb|right|Location of the flex properties panel in 2.7x and the latest version]] | [[File:Flexproperties blender.png|thumb|right|Location of the flex properties panel in 2.7x and the latest version]] | ||
To ship bodygroups with flex controllers, select the mesh you're using as the bodygroup and then go to the flex properties panel and set it from "Simple" to "Advanced". | |||
Next, create a .txt file with the following: | Next, create a .txt file with the following: | ||
<pre> | <pre> | ||
Line 36: | Line 38: | ||
</pre> | </pre> | ||
Save this file somewhere and paste its location on the box that says "Controller Source", | Save this file somewhere and paste its location on the box that says "Controller Source", in the bodygroup's properties. | ||
Then | Then export your .DMX meshes. You'll get a warning that says there are missing shapekeys but that can be ignored. | ||
Compile your model using Crowbar and this fix should work. | Compile your model using Crowbar and this fix should work. | ||
Line 43: | Line 45: | ||
== Stereo Flexes == | == Stereo Flexes == | ||
In order for stereo flexes to work with this method, you will need to manually split | In order for stereo flexes to work with this method, you will need to manually split the stereo flexes on the mesh(es) without controllers defined into "[flexname]L" and "[flexname]R" versions, with only the left and right sides affected respectively. | ||
{{todo|Tested on Binary 2, Model 1 format for export. Some formats ''might'' need left_ and right_ prefixes instead? (Would these work because of [[Flex_animation#Corrective_shapes|corrective shapes]]?)}} | {{todo|Tested on Binary 2, Model 1 format for export. Some formats ''might'' need "left_" and "right_" prefixes instead? (Would these not work because of [[Flex_animation#Corrective_shapes|corrective shapes]]?)}} | ||
== References == | == References == | ||
https://web.archive.org/web/20200710074830/https://steamcommunity.com/app/1840/discussions/0/2153224488982782040/ | https://web.archive.org/web/20200710074830/https://steamcommunity.com/app/1840/discussions/0/2153224488982782040/ |
Latest revision as of 11:29, 9 August 2024

You can help by


There's an issue in Source with flexes (shapekeys) applied on bodygroup meshes that effectively makes them useless. This is frequent,for example, on models that have head bodygroup variations with flex controllers assigned to them.
The fix
You will need Blender and the other essential source exporting tools (Crowbar, Blender Source Tools) for this fix.
Assuming the shape keys already exist, split the mesh that will be used as a separate bodygroup.

To ship bodygroups with flex controllers, select the mesh you're using as the bodygroup and then go to the flex properties panel and set it from "Simple" to "Advanced". Next, create a .txt file with the following:
<!-- dmx encoding keyvalues2 1 format model 1 --> "DmElement" { "id" "elementid" "12345678-1234-1234-1234-012345678910" "name" "string" "root" "combinationOperator" "DmeCombinationOperator" { "id" "elementid" "01234567-8910-1112-1314-151617181920" "name" "string" "combinationOperator" "controls" "element_array" [] "controlValues" "vector3_array" [] "controlValuesLagged" "vector3_array" [] "usesLaggedValues" "bool" "0" "dominators" "element_array" [] "targets" "element_array" [] } }
Save this file somewhere and paste its location on the box that says "Controller Source", in the bodygroup's properties. Then export your .DMX meshes. You'll get a warning that says there are missing shapekeys but that can be ignored. Compile your model using Crowbar and this fix should work.
Stereo Flexes
In order for stereo flexes to work with this method, you will need to manually split the stereo flexes on the mesh(es) without controllers defined into "[flexname]L" and "[flexname]R" versions, with only the left and right sides affected respectively.