Page 1 of 1

Expressions become drustically slow

PostPosted: Sat Jan 23, 2016 5:01 pm
by Eugene Afanasiev
Why sliding the controls in modifier expression5 is so slow? Am I doing something wrong? Is there a better way in writing them?
Code: Select all
{
   Tools = ordered() {
      Camera3D5_1 = Camera3D {
         CtrlWZoom = false,
         Inputs = {
            ["Transform3DOp.Translate.X"] = Input {
               SourceOp = "Expression5",
               Source = "NumberResult",
            },
            ["Transform3DOp.Translate.Z"] = Input {
               SourceOp = "Expression6",
               Source = "NumberResult",
            },
            ["Transform3DOp.PivotNest"] = Input { Value = 1, },
            ["Transform3DOp.UseTarget"] = Input { Value = 1, },
            ["Transform3DOp.Target.X"] = Input {
               SourceOp = "Camera3D5_1XTargetPosition",
               Source = "Value",
            },
            AoV = Input { Value = 24.3265863475745, },
            ["Stereo.Mode"] = Input { Value = FuID { "Mono" }, },
            ["SurfacePlaneInputs.ObjectID.ObjectID"] = Input { Value = 17, },
            ["MtlStdInputs.MaterialID"] = Input { Value = 34, },
         },
         ViewInfo = OperatorInfo { Pos = { 661, 145 } },
      },
      Expression5 = Expression {
         CtrlWZoom = false,
         Inputs = {
            n1 = Input { Value = 25.0913461, },
            n2 = Input {
               SourceOp = "Expression5onCamera3D5_1NumberIn2",
               Source = "Value",
            },
            NumberExpression = Input { Value = "n1*sin(n2)", },
            ShowNumber3 = Input { Value = 0, },
            ShowNumber4 = Input { Value = 0, },
            ShowNumber5 = Input { Value = 0, },
            ShowNumber6 = Input { Value = 0, },
            ShowNumber7 = Input { Value = 0, },
            ShowNumber8 = Input { Value = 0, },
            ShowNumber9 = Input { Value = 0, },
            ShowPoint1 = Input { Value = 0, },
            ShowPoint2 = Input { Value = 0, },
            ShowPoint3 = Input { Value = 0, },
            ShowPoint4 = Input { Value = 0, },
            ShowPoint5 = Input { Value = 0, },
            ShowPoint6 = Input { Value = 0, },
            ShowPoint7 = Input { Value = 0, },
            ShowPoint8 = Input { Value = 0, },
            ShowPoint9 = Input { Value = 0, },
         },
      },
      Expression5onCamera3D5_1NumberIn2 = BezierSpline {
         SplineColor = { Red = 233, Green = 19, Blue = 5 },
         NameSet = true,
         KeyFrames = {
            [210] = { -45, RH = { 223.333333333333, -20 }, Flags = { Linear = true } },
            [250] = { 30, LH = { 236.666666666667, 5 }, Flags = { Linear = true } }
         }
      },
      Expression6 = Expression {
         Inputs = {
            n1 = Input {
               Value = 25.0913461,
               Expression = "Expression5.n1",
            },
            n2 = Input {
               Value = 30,
               Expression = "Expression5.n2",
            },
            NumberExpression = Input { Value = "n1*cos(n2)", },
         },
      },
      Camera3D5_1XTargetPosition = BezierSpline {
         SplineColor = { Red = 251, Green = 183, Blue = 208 },
         NameSet = true,
         KeyFrames = {
            [210] = { -7.48619816458194, RH = { 240, -2.81971331468301 }, Flags = { Linear = true } },
            [300] = { 6.51325638511485, LH = { 270, 1.84677153521592 }, Flags = { Linear = true } }
         }
      }
   }
}

Re: Expressions become drustically slow

PostPosted: Sat Jan 23, 2016 5:36 pm
by Chad Capeland
On my machine it's running about 500fps, so it's slow, but not THAT slow.

The issue is the 3D paths. Each time you move the slider you force 2 expression modifiers to evaluate 1000 times.

Re: Expressions become drustically slow

PostPosted: Sat Jan 23, 2016 5:45 pm
by Eugene Afanasiev
No I mean the expressions run smooth if you don't touch parameters, but I can not slide them normally though is it normal behavior?

And how to convert expressions to keyframes?

Re: Expressions become drustically slow

PostPosted: Sat Jan 23, 2016 6:43 pm
by Chad Capeland
You're missing the point. The reason it plays smoothly is because it's already been evaluated. If you change it, of course it reevaluates, which is slower than not reevaluating.

Re: Expressions become drustically slow

PostPosted: Sat Jan 23, 2016 6:59 pm
by Eugene Afanasiev
Understood. Thank you.

Re: Expressions become drustically slow

PostPosted: Sat Jan 23, 2016 7:10 pm
by Eugene Afanasiev
And argonomically is my comp correct or could it be set up easier and lighter for calculations?

Re: Expressions become drustically slow

PostPosted: Sun Jan 24, 2016 3:27 am
by Chad Capeland
You might have better performance using SimpleExpressions. I haven't really tried comparing them.

Re: Expressions become drustically slow

PostPosted: Sun Jan 24, 2016 6:40 am
by Eugene Afanasiev
Thanks, l'll check that

Re: Expressions become drustically slow

PostPosted: Sun Jan 24, 2016 6:43 am
by Eugene Afanasiev
Anyway then it's a feature request cause this is urgent to see changes on the fly you slide you - want respond, at least there shouldn't be the hanging of the whole thing while it's recalculating

Re: Expressions become drustically slow

PostPosted: Sun Jan 24, 2016 7:33 am
by Chad Capeland
Eugene Afanasiev wrote:Anyway then it's a feature request cause this is urgent to see changes on the fly you slide you - want respond, at least there shouldn't be the hanging of the whole thing while it's recalculating


Fusion is interactive. It is not realtime. When you put something in the viewer, you expect it to render. There's no "Do" button in Fusion. You always have to balance what you want to see with how much time you want to wait for it. It might be handy to have a temporal proxy with piecewise linear interpolation, but you'll always be trying to balance feedback time and content.

Re: Expressions become drustically slow

PostPosted: Sun Jan 24, 2016 9:46 am
by michael vorberg
i think it can be related to the view controls.
fusion has to calculate and draw the 3d spline of the animation. to do so it must calculate all the frames of the animation and this takes some time.
if you disable the view controls of the camera everything is interactive and running smoothly

Re: Expressions become drustically slow

PostPosted: Sun Jan 24, 2016 10:58 am
by Eugene Afanasiev
You are totally right! Thanks a lot!!!