Notifications
Clear all

[Closed] Linking A Custom Attribute to Another Custom Attribute

Ok I’ve updated the script controllers to give a smooth curve, and it should be much nicer to use.Balance now contols the balance of a gamma curve.

The left Eye script looks like…

dependsOn $SliderDilate $sliderbalance

x = 1 – $SliderDilate.value
b = $sliderbalance.value

(bxx + (1-b)*x)*100

The Right Eye script is the same except

b = -$sliderbalance.value

Have a go…

1 Reply
 eek
(@eek)
Joined: 1 year ago

Posts: 0

Interesting, this is a gamma function you say. Hmmm ill have to look into this. Is this similair to exponential ramp: n^2.618?

eek

To be precise it’s a 2nd order approximation of a gamma curve. A friend of mine did the math to derive the approximation so I can’t claim credit for that.

In my code the gamma value is (1+balance)/2.

It’s loses accuracy when compared to a real gamma curve when ‘balance’ is close to +1 or –1. But mostly we want something that ‘feels right’ and runs fast, so that’s usually fine.

I’m not familiar with an exponential ramp: n^2.618. Could you give me an example eek?

 PEN

Hey Ken it looks much like a bezier curve what you have there. Interesting way of dealing with it. Thanks for sharing.

Page 2 / 2