07-24-2024, 06:20 PM
First of all, just a small detail about your shape blend weight.
When blend/slider weight value is 1.0, the shape is 100% used.
It's a standard everywhere, so how can this can be screwed up?
Some people will do that:
if a pose edit slider is completely to the right, the shape is 100% used.
What wrong?
Most (if not all) pose edit slider had their range increased to allow shape usage over 100% = completely to the right no more mean 1.0 weight!
Then, the actual "connection".
Currently, people use AppExprLinear.
This do not connect the shape to anim/pose edit blend.
In fact, it just make the blend from your addon constantly copying the weight value of blend from anim/pose edit.
To archieve this, the AppExprLinear will be constantly execute/loop.
The better way, will be to use a AppScript that will edit the BlendControl array of your mesh and directly connect your shape to anim/pose edit blend.
Just showing small part of scenes/.bs so you have a better understanding of the AppScript.
Ac/.bs exemple with a AppScript containing the BlendControl array of my mesh before I change the "connection" of the shape.
To change the "connection" of the shape, we simply need to edit the AppScript.
A lot simplier than using 7 AppExprLinear, don't you think? Also, the AppScript execute once. (while AppExprLinear constantly execute/loop)
When blend/slider weight value is 1.0, the shape is 100% used.
It's a standard everywhere, so how can this can be screwed up?
Some people will do that:
if a pose edit slider is completely to the right, the shape is 100% used.
What wrong?
Most (if not all) pose edit slider had their range increased to allow shape usage over 100% = completely to the right no more mean 1.0 weight!
Then, the actual "connection".
Currently, people use AppExprLinear.
This do not connect the shape to anim/pose edit blend.
In fact, it just make the blend from your addon constantly copying the weight value of blend from anim/pose edit.
To archieve this, the AppExprLinear will be constantly execute/loop.
The better way, will be to use a AppScript that will edit the BlendControl array of your mesh and directly connect your shape to anim/pose edit blend.
Just showing small part of scenes/.bs so you have a better understanding of the AppScript.
Code:
...[/color]
[color=#000000]SSkinPolygonGeometry :local_Stawna_bandicoot_reference_MESH . {[/color]
[color=#000000]...[/color]
[color=#000000]SSkinPolygonGeometry.BlendControl [ BlendControl :local_Eye_Squint_L_BLENDCTRL , BlendControl :local_Eye_Squint_R_BLENDCTRL , BlendControl :local_Mouth_Smile_All_BLENDCTRL , BlendControl :local_Mouth_Smirk_L_BLENDCTRL , BlendControl :local_Mouth_Smirk_R_BLENDCTRL , BlendControl :local_Mouth_Frown_BLENDCTRL , BlendControl :local_Mouth_Shift_Left_BLENDCTRL , BlendControl :local_Mouth_Shift_Right_BLENDCTRL , BlendControl :local_Nose_Up_BLENDCTRL ];[/color]
[color=#000000]... [/color]
[color=#000000]Object.Name "Stawna_bandicoot_reference_mesh";[/color]
[color=#000000]};[/color]
[color=#000000]...[/color]
[color=#000000]BlendControl :local_Eye_Squint_L_BLENDCTRL Object.Name "Eye_Squint_L";[/color]
[color=#000000]BlendControl :local_Eye_Squint_R_BLENDCTRL Object.Name "Eye_Squint_R";[/color]
[color=#000000]BlendControl :local_Mouth_Smile_All_BLENDCTRL Object.Name "Mouth_Smile_All";[/color]
[color=#000000]BlendControl :local_Mouth_Smirk_L_BLENDCTRL Object.Name "Mouth_Smirk_L";[/color]
[color=#000000]BlendControl :local_Mouth_Smirk_R_BLENDCTRL Object.Name "Mouth_Smirk_R";[/color]
[color=#000000]BlendControl :local_Mouth_Frown_BLENDCTRL Object.Name "Mouth_Frown";[/color]
[color=#000000]BlendControl :local_Mouth_Shift_Left_BLENDCTRL Object.Name "Mouth_Shift_Left";[/color]
[color=#000000]BlendControl :local_Mouth_Shift_Right_BLENDCTRL Object.Name "Mouth_Shift_Right";[/color]
[color=#000000]BlendControl :local_Nose_Up_BLENDCTRL Object.Name "Nose_Up";[/color]
[color=#000000]...
Ac/.bs exemple with a AppScript containing the BlendControl array of my mesh before I change the "connection" of the shape.
Code:
AppModel . {[/color]
[color=#000000].ComponentArray [ AppImportScene . {[/color]
[color=#000000].NodeName "Person" + :person + "Puppet007";[/color]
[color=#000000].ParentPath "/Primary01";[/color]
[color=#000000].SceneFile "Shared/Cloth/Puppet007";[/color]
[color=#000000]};[/color]
[color=#000000]AppReplaceSkeleton . {[/color]
[color=#000000].SourcePath "/Person" + :person + "Puppet007/TRS_group";[/color]
[color=#000000].TargetPath "/Person" + :person + "Anim/Model01:TRS_group";[/color]
[color=#000000].SourceRootPath "/Person" + :person + "Puppet007";[/color]
[color=#000000].TargetRootPath "/Person" + :person + "Anim";[/color]
[color=#000000]};[/color]
[color=#000000]AppScript . {[/color]
[color=#000000].MainContext True;[/color]
[color=#000000].Script "[/color]
[color=#000000]:Person" + :person + "Puppet007:tawna_bandicoot_reference_mesh.SNode?.BlendControl [
:Person" + :person + "Puppet007:Eye_Squint_L;
:Person" + :person + "Puppet007:Eye_Squint_R;
:Person" + :person + "Puppet007:Mouth_Smile_All;
:Person" + :person + "Puppet007:Mouth_Smirk_L;
:Person" + :person + "Puppet007:Mouth_Smirk_R;
:Person" + :person + "Puppet007:Mouth_Frown;
:Person" + :person + "Puppet007:Mouth_Shift_Left;
:Person" + :person + "Puppet007:Mouth_Shift_Right;
:Person" + :person + "Puppet007:Nose_Up;
];[/color]
[color=#000000]";[/color]
[color=#000000]};[/color]
[color=#000000]];[/color]
[color=#000000]};
To change the "connection" of the shape, we simply need to edit the AppScript.
Code:
AppScript . {[/color]
[color=#000000].MainContext True;[/color]
[color=#000000].Script "[/color]
[color=#000000]:Person" + :person + "Puppet007:tawna_bandicoot_reference_mesh.SNode?.BlendControl [
:Person" + :person + "AnimFace:face_poseBlend_fedit_LSquint;
:Person" + :person + "AnimFace:face_poseBlend_fedit_RSquint;
:Person" + :person + "Puppet007:Mouth_Smile_All;
:Person" + :person + "AnimFace:face_poseBlend_fedit_LMouth;
:Person" + :person + "AnimFace:face_poseBlend_fedit_RMouth;
:Person" + :person + "Puppet007:Mouth_Frown;
:Person" + :person + "AnimFace:face_poseBlend_fedit_RNarrow;
:Person" + :person + "AnimFace:face_poseBlend_fedit_LNarrow;
:Person" + :person + "Anim:Model01:nose_poseBlend_sniff;
];[/color]
[color=#000000]";[/color]
[color=#000000]};
A lot simplier than using 7 AppExprLinear, don't you think? Also, the AppScript execute once. (while AppExprLinear constantly execute/loop)
[To see links please log-in or register here]