|
|
Le 2024-12-06 à 13:44, Bald Eagle a écrit :
> Alain Martel <kua### [at] videotronca> wrote:
>
>> As if() can't be used in the function of an isosurface, select() is
>> pretty much the only option.
>
> Well, I don't think that's entirely true.
>
> If you take advantage of the fact that expressions inside of parentheses get
> evaluated, and make use of functions like sgn, min, max, etc, then you can
> multiply terms in an equation by values that select them (multiply by 1 or -1)
> or cancel them out (multiply by 0).
>
> So if you wanted to alternate signs, you could use a sine wave and take the sign
> of that: sgn(sin(N))
>
> - BW
>
According to what I remember from a discussion here a while back :
The if() is normally evaluated at parse time. That makes it unsuitable
to be used in an isosurface that need to evaluate it at render time.
Post a reply to this message
|
|