Hello,
Currently I am creating a Digital Tool in Houdini, containing a procedural generated watch. I have set different parameters (to the Digital Asset) to adjust specific areas of the watch, which all works fine. However, I can't figure out how to randomize all these parameters at ones with a single float…
Is it even possible…? I really appreciate your help!
All the best, Tim
How to randomize between parameters (digital asset)
4619 5 0- Tim Wiersma
- Member
- 3 posts
- Joined: 5月 2014
- Offline
- edward
- Member
- 7734 posts
- Joined: 7月 2005
- Online
I think it's easiest to have 2 modes then. One where you let the user specify the parameters, another where the channel references to the top level use your single float as a seed value. So the expressions referencing the top-level parameters will look something like this:
if(ch(“../auto”), fit01(rand(ch(“../seed”)*<parm1_id>),<MIN>,<MAX>),ch(“../user_parm1”))
where:
- “../user_parm1” is the actual top-level parameter
- <parm1_id> is some number that is different for every parameter. It's probably a good idea to use a fractional number for your id as well here.
- <MIN> and <MAX> is the appropriate range of values for your parameter. The fit01 is to make sure you get appropriate random numbers.
if(ch(“../auto”), fit01(rand(ch(“../seed”)*<parm1_id>),<MIN>,<MAX>),ch(“../user_parm1”))
where:
- “../user_parm1” is the actual top-level parameter
- <parm1_id> is some number that is different for every parameter. It's probably a good idea to use a fractional number for your id as well here.
- <MIN> and <MAX> is the appropriate range of values for your parameter. The fit01 is to make sure you get appropriate random numbers.
- Tim Wiersma
- Member
- 3 posts
- Joined: 5月 2014
- Offline
Thank you Edward for your quick response!
I think I understand what your expression is meant to do (just beginning to learn Houdini…). However, I can't seem to get it working in my project.
I added a Copy SOP with a Sort SOP as random input (Seed). In my Copy SOP I added a Variable with the Expression you gave me:
if(ch("../auto“), fit01(rand(ch(”../seed")*<randomizer_id>),<MIN>,<MAX>),ch("../randomizer"))
In bold the strings I need to adjust for my project???
unfortunately I can't quite figure out where: (ch(“../auto”) stands for…
Anyhow, enclosed my procedural watch thus far… Maybe it can help?
Again, Thanks for the help! Much appreciated
I think I understand what your expression is meant to do (just beginning to learn Houdini…). However, I can't seem to get it working in my project.
I added a Copy SOP with a Sort SOP as random input (Seed). In my Copy SOP I added a Variable with the Expression you gave me:
if(ch("../auto“), fit01(rand(ch(”../seed")*<randomizer_id>),<MIN>,<MAX>),ch("../randomizer"))
In bold the strings I need to adjust for my project???
unfortunately I can't quite figure out where: (ch(“../auto”) stands for…
Anyhow, enclosed my procedural watch thus far… Maybe it can help?
Again, Thanks for the help! Much appreciated
- edward
- Member
- 7734 posts
- Joined: 7月 2005
- Online
- Tim Wiersma
- Member
- 3 posts
- Joined: 5月 2014
- Offline
Finally got it to work to randomize between parameters:
if(ch(“../random”), > 0, fit01(rand($F), 0, 1), ch(“../rectangular”))
I now use a ‘toggle’; if(ch(“../random”), > 0 to go into “randomizer mode”. By sliding the timeline; fit01(rand($F), 0, 1), it randomizes between 0 and 1, else (when toggle is off), it uses ch(“../rectangular”).
Thanks again Edward, couldn't done it without your help !
if(ch(“../random”), > 0, fit01(rand($F), 0, 1), ch(“../rectangular”))
I now use a ‘toggle’; if(ch(“../random”), > 0 to go into “randomizer mode”. By sliding the timeline; fit01(rand($F), 0, 1), it randomizes between 0 and 1, else (when toggle is off), it uses ch(“../rectangular”).
Thanks again Edward, couldn't done it without your help !
- AdamJ
- Member
- 268 posts
- Joined: 7月 2005
- Offline
This might be useful.. the randomize slider shuffles randomly bunch of parms.. have a look at the callback script for it..
http://www.orbolt.com/asset/SideFX::spaceship [orbolt.com]
http://www.orbolt.com/asset/SideFX::spaceship [orbolt.com]
-
- Quick Links