Remap values on a custom digital asset [SOLVED]

   929   2   1
User Avatar
Member
78 posts
Joined: June 2019
Offline
Hello! As the title says, it it possible to remap values on a custom built digital asset?

For example, I have a slider that is locked to move between the values of 2-4, but I would like to display that slider as a 0-1, or 1-0 value.

Is this possible?
Edited by GlennimusPrime - Dec. 1, 2020 15:53:37
User Avatar
Member
106 posts
Joined: June 2011
Offline
Hi there,

You can set the range in the slider parameter to 0 to 1 and remap the values inside your digital asset where the parameter is referenced using the fit expression.

fit(ch("../YourSliderParameterName"), 0.0, 1.0, 2.0, 4.0)


This will remap the values from 0-1 to 2-4.


-J
User Avatar
Member
78 posts
Joined: June 2019
Offline
Ha of course, one of the simplest functions of Houdini

I was thinking this might be changed somewhere in the parameter interface.

This works well, thank you!
  • Quick Links