Expressions? Amplitude times attribute

   1059   2   1
User Avatar
Member
4 posts
Joined: June 2020
Offline
Hello!

I have a mesh with a gradient color masking. I ran it through a mountain sop, but I would like to multiply the amplitude of that mountain by the gradient. I also made an attribute with the gradient called number just in case I could use it somewhere.

I tried using a point expression to get the value of "number" and multiply it by a value, but it only allows for getting the attribute value on one point rather than per point. Probably an easier way, but was an excuse to try and lean expressions. Attached an image of what I tried.

Maybe there's an even easier way? I'm doing this for learning purposes, so all info is relevant to me. THank you!!
Edited by Lawind - May 13, 2022 20:18:53

Attachments:
Expressions.gif (641.8 KB)
PerPoint.JPG (62.3 KB)

User Avatar
Member
8507 posts
Joined: July 2007
Offline
you can't use expressions per point

but you can either:
- check Blend and set it to use your attribute as mask

- or create f@max attribute before the mountain that's based on your color value like
then Mountain SOP (attribnoise) will pick that up instead of the Parameter value
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
4 posts
Joined: June 2020
Offline
Really great ideas! I'm going to try those.

Also really good to know that you can't per point with expressions. Now I wont waste a ton of time trying to. I suppose I need to better understand how expressions work, its the one thing that gets me every time.



Additionally I found another solution. Using a noise attribute instead with the operation set to multiply. So it multiplied my gradient to the color and did the same effect as the mountain sop.

Thanks again.
  • Quick Links