Isotropix Forums

expression to scale Scope based on Falloff

Discuss about expressions in Clarisse

expression to scale Scope based on Falloff

Unread postby jeroendesmet » Mon Feb 10, 2020 8:09 pm

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
jeroendesmet
 
Posts: 16
Joined: Sat Nov 15, 2014 9:08 pm

Re: expression to scale Scope based on Falloff

Unread postby dboude » Tue Feb 11, 2020 9:51 am

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
Démian
Isotropix
Technical Artist - Clarisse Specialist
User avatar
dboude
 
Posts: 1540
Joined: Mon Jul 03, 2017 10:51 am

Re: expression to scale Scope based on Falloff

Unread postby jeroendesmet » Tue Feb 11, 2020 12:16 pm

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
jeroendesmet
 
Posts: 16
Joined: Sat Nov 15, 2014 9:08 pm


Return to Expressions