• HWM to L4D2 FACS flexes convert
    4 replies, posted
Hi. I made character with HWM face flexes. Now I want to port it into L4D2, but i'm kinda lazy to make another flexes set especially for this game. I dug around game folders and found some .pre files in models folder and they have "in-game" presets. So the question is: can I somehow use those preset files to generate face meshes with FACS set? Or are there another way to produce? Thanks in advance.
bump?
Both sets use specific shape keys that have been made in a modeling package. Both may have similar keys, but the two are different enough that there's now way you could really 'wing it' with the HWM baseshapes you have on hand and get a good result using the FACS code. There may be a way to mix the HWM morphs to reproduce some of the more broad FACS baseshapes, but that would take a lot of guess and check work on a mostly undocumented system that has no guarantee of results. Either way, it'd be faster to import the mesh into something and author new morphtargets in max/maya/blender.
Yeah, I know these sets are mostly different from each other, and the FACS were used to kinda decrease resource consumption during processing of facial animation. But why did I mention those .pre files? Because they contain facial presets which represent those L4D2 FACS flexes. For example, here is the part of game_presets.pre (I added some commentaries here, they of course don't exist in original files): [CODE]... "DmePreset" { "id" "elementid" "250bedfc-5e02-4428-8ee9-87936c496267" "name" "string" "AU27Z" [B]// <-- L4D-related flex[/B] "controlValues" "element_array" [ "DmElement" { "id" "elementid" "d6a1b9b4-fb46-46ab-a08b-16d6d76778da" "name" "string" "FoldLipLo" //[B]<-- and here and there go names of HWM flexes[/B] "leftValue" "float" "0.3928571343" //<-- [B]Flex value[/B] "rightValue" "float" "0.3928571343" }, "DmElement" { "id" "elementid" "6cd9b0e4-cdc8-4481-80f2-ef3915306cca" "name" "string" "FoldLipUp" "leftValue" "float" "0.1808035672" "rightValue" "float" "0.1808035672" }, "DmElement" { "id" "elementid" "79689ab2-ae84-4842-8e3f-4c6a2f80b864" "name" "string" "Platysmus" "leftValue" "float" "0.9129464626" "rightValue" "float" "0.9129464626" }, "DmElement" { "id" "elementid" "082d3c01-0e02-4da2-9487-6d9a04535971" "name" "string" "LipLoV" "leftValue" "float" "1" "rightValue" "float" "1" }, "DmElement" { "id" "elementid" "62fddd49-4ad6-41ae-abf2-285413b7c393" "name" "string" "LipUpV" "leftValue" "float" "1" "rightValue" "float" "1" }, "DmElement" { "id" "elementid" "31e7da18-e207-4f5d-9e5a-ac6c50dbec1d" "name" "string" "JawV" "value" "float" "1" }, "DmElement" { "id" "elementid" "a3f9ad8a-c6fd-4909-8f22-787fab66ae1e" "name" "string" "JawD" "value" "float" "0.743303597" } ] "procedural" "int" "0" }, ...[/CODE] So, according to this, we at least don't need to guess each values or pose flexes our self and create new shapes from mix. If there was a wrapper to import those presets into 3d-editor and automatically generate shape mixes from imported preset, that could greatly reduce time on converting, IMO.
Alright, I've found a workaround. You just need to run this script with dmxedit from SourceFilmmaker. Create lua-file in any folder, put the code below (don't forger to change names of the files), put dmx mesh with hwm flexes in the same folder and .pre preset file and any dmx that contains l4d2 facs controllers. [CODE] Load( "./christie_head_rel.dmx", "relative" ); -- our dmx model with hwm flexes. print("We have loaded that crap. What we got for now:"); ListDeltas( ); CreateDeltasFromPresets( "./game_presets.pre", true ); -- 'true' purges all HWM flexes. ImportComboRules( "./mechanic_model_merged.dmx", true, true ); -- any dmx that contains l4d2 facs controllers. First 'true' replaces the current rules with those from the file. Second 'true' purges any delta states which are no longer referred to by any combination rule or control. ResetState( ); print( "And what we got now:" ); ListDeltas( ); ComputeNormals(); ComputeWrinkles(); Save( "./christie_head_facs.dmx" );[/CODE]
Sorry, you need to Log In to post a reply to this thread.