Page 1 of 1

expression to scale Scope based on Falloff

Unread postPosted: Mon Feb 10, 2020 8:09 pm
by jeroendesmet
hey hey,

So I'm trying to figure out an expression (se-expr) to drive the scale of a Scope (set to 'Sphere'-shape) ... so whenever I increase the "Falloff" of the scope, the 'Inner" size of the scope stays the same.
By default, when you increase the falloff on a scope, it always adds falloff towards the INSIDE of the scope. What I want in this case, is to have it expand instead.

Any idea what kinda math I'd need to get this?

Thanks!
Jeroen

Re: expression to scale Scope based on Falloff

Unread postPosted: Tue Feb 11, 2020 9:51 am
by dboude
Hi,

I just have the inverse, maybe it can help :

In the falloff attribute, you can type this expression :
Code: Select all
 1 - 1/(get_double("scale"))


In this case whatever the scale the scope has, the solid center will be 1 unit wide. If you want it wider just subtract a number between 0 and 1 like :
Code: Select all
 1 - 1/(get_double("scale")) - 0.2


Cheers

Re: expression to scale Scope based on Falloff

Unread postPosted: Tue Feb 11, 2020 12:16 pm
by jeroendesmet
ha! sweet.
Tried that expression but the other way.. obviously looked completely wack.

Would be nice to have a simple checkbox in the scope to get this behavior though!!


Thanks for the quick help!
Jeroen