conditional branch to set JCM value
Hi,,, ds4 can make simple ERC easy,, then I sometimes need to set branch .
actually,, I was asked way how to,, but I did not find easy way.
I could make it,, with type "add delta" only.
but not simple. I needed to make many new property just make one simple branch,,
I can only use about delta add type, and multiple .
I believe there should be more clean and simple way.
Divide into, Divide by, SubTract, Add,, keyed.
then I try to use them,, but I can not clear,, how each type work,,,
Hope your help about these "ERC type"
if you know some documents for ds 4 ERC type,, please tell me,,
===============================================
it is simple case.I make one morph JCMsimple.
then it need to work with node1 X rotation.
I hope to set ERC,,
X rotation value 0 to 90 >> the JCM change 0 to 1. (keep step value)
then X rotation value 90 to 110 >> the JCM change 1 to 0.5 (keep step value)
X rotation value minus,, >>the JCM never work. keep 0,
X rotation value over 110,>> the JCM value keep 0.5.
I needed to set limit , and make many property,,just because of memorize 90 etc,,
Would not you show some good example which more shape up my ERC and properties?
I think there should be way to coding duf "fomula" section,
but I can find only little documents..
or I may try to use DS script to manage property,, but at first,
I think simple JSON coding for Fomula section,,
=======================================
my way is like that,, it seems terrible,, not clean ^^; (though work,, it is not practical,, at all)
================================
1. name "Fixvalue -90"
Min -90, Max 90
Deafult -90 , Use limits. Locked.
it simply keep the -90 value. no change.
================================
2. name "Rotation -90 value"
Min 0, Max 20
Default 0, Use limits,
------------------------
set ERC
make it as sub-components of node rotation
ERC type "Delta Add", Scalar 1.00
save with sub-components.
make it as sub-componets of "Fixvalue -90"
ERC type "Delta Add", Scalar 1.00
save with sub- compnetns.
it show the curernt rotation -90 value.
you need to check it work as you hope.
rotate 0 to 90, value 0
rotate 90 to 110 value 20,
=====================================
3.name "CtrlRange_0to90"
min 0, max 1,
default value 0, Use Limits
this Ctrl set the value 0 to 90 rotation,
need to interporate 0 to 1.
but over 90 it keep "1"
------------------------
set ERC
make it as sub-componets of node rotation.
ERC "Delta add", Scalar 1/90=0.01111
Save with Sub-Compnents.
when you check the Ctrl value,
it shoud show,
rotation 0 , value 0
rotation 45, value 0.5
rotation 90 value 1
rotaion 90to110 keep value 1
==========================================
4. name "CtrlRage_90to110delta"
min -0.5, max 0
default 0, use limits
this Ctrl adjust the morph value 90to110 rotation with "CtrlRange0to90"
it add minus delta from current value, between 90 to 110 only.
---------------------------------------------------
set ERC
make it as sub components of "Rotation -90 value"
ERC type Delta Add, Scalar -0.5/20= "-0.025"
Save with Sub-Compnents.
===================================
5, finaly,, set ERC for JCMsimple.
I must need to make the JCM as delta from which rotated 90 degree.
so that the 100% (1.00) morph fit for 90 rotation.
I believe you made so.
Morph Name JCMsimple
min 0, max 1 (100%) ,
default 0, use Limits.
-------------------------------------
set ERC
a) make it as sub componets of "CtrlRange 0to90"
type Delta Add,, Scalar 1.00
Save with Controller
b) make it as sub components of "CtrlRange90to110delta"
type Delta Add, Scalar 1.00
Save with Controller
================================
As you know,, it is not simple,, at all ^^; I believe there should be more good sensitive way,,
with ERC and porperty type,,,
Comments
That is, unfortunately, pretty much the way it works. This is the usual reference for advanced ERC http://www.atlantis23.com/arc_download.html (though that's hand-editing Poser files, Property Editor makes it a lot easier to do).
Mmm,,,,, Richard,,, I think,, if I made these property, I needs 5 new dsf files to save,,,
I think there should be way to combine files,,
about 1 and 2 (“Fixvalue -90”, “Rotation -90 value” ) may need not to be saved as separate dsf files,,
may be written in fomura section of 4. “CtrlRange_90to110delta”.dsf ,,,,I think,,,
Can not I set Constant value (in this case key value is -90) in Property editor,
and use the value to set ERC for another property, more simple way, without savign as new property?
I check property types,, but there seems no way to set Constant value only,,,
(so that I used min and max,, locked,, to record -90. then keep the Constant value as new property,,
but it seems fool,,,)
at first,,,
If I want to add codes to keep the Constant value -90 in formula section,,and add it,, in
Rotation -90.dsf How Can I do?
Now,,, Rotation -90.dsf is like that,,
ah,,, if ,, I need only to re-write like that ?
"formulas" : [
{
"output" : "TKteddyobj:#-90value?value",
"operations" : [
{ "op" : "push", "url" : "head:/data/../TKteddyobj.dsf#head?rotation/y" },
{ "op" : "push", "val" : 1 }
{ "op" : "mult" }
{ "op" : "push", "val" : -90 }
{ "op" : "add" }
]
}
]
can I use add after multiple ^^;,.,,,,?
=====================================
m,m,m,,
It seems only work,, every operations end by multiple OP,,why?
Can not I combine as one "output" OP?
anyway I could delete one dsf.file,, now,,,
"formulas" : [
{
"output" : "TKteddyobj:#-90value?value",
"operations" : [
{ "op" : "push", "val" : -90 },
{ "op" : "push", "val" : 1 },
{ "op" : "mult" }
]
},
{
"output" : "TKteddyobj:#-90value?value",
"operations" : [
{ "op" : "push", "url" : "head:/data/./TKteddyobj.dsf#head?rotation/y" },
{ "op" : "push", "val" : 1 },
{ "op" : "mult" }
]
}
]