Hi all,
I was just wondering if the above is possible?
Say you have a simple copystamp operation on a grid.
Your random rotation on the stamped copies is set to rotvar = fit(360*rand($PT),0,1,-180,180).
This all works fine.
If I pack the setup into a subnet, is it possible to replace the -180,180 with sliders and link those back into the expression?
e.g. I made two (integer) sliders in the subnet UI named minrot (-180<–>0) and maxrot (0<–>180), and linked them back into the expression:
rotvar = fit(360*rand($PT),0,1, ‘../../subnet/minrot’, ‘../../subnet/maxrot’)
There's no errors, but the sliders in the subnet aren't working. I feel I'm close, but missing something here
cheers for any tips, links etc.
rob
Q: driving expression with external data (slider)?
1770 3 0- RobW
- Member
- 147 posts
- Joined: March 2014
- Offline
- Enivob
- Member
- 2536 posts
- Joined: June 2008
- Offline
If it is not working as you have tried consider moving the fit into an attributeWrangle and referencing channels instead. You will need to create an attribute instead of a variable then reference that attribute in the stamps instead.
Click on the little side button to create the additional channels on the attributeWrangle. Now you should be able to use a relative reference on the min/max channels from the higher level.
f@rot_val = fit(360*rand(@ptnum),0,1,ch("minrot"),ch("maxrot"));
Using Houdini Indie 20.0
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
- RobW
- Member
- 147 posts
- Joined: March 2014
- Offline
Hi,
Thanks for that!
So it - should- have worked as described? I'll fidlle a bit more to see if I can get it to work.
I will also dive into the AttributeWrangle and channels. Always a good thing to have multiple options
cheers!
rob
Thanks for that!
So it - should- have worked as described? I'll fidlle a bit more to see if I can get it to work.
I will also dive into the AttributeWrangle and channels. Always a good thing to have multiple options
cheers!
rob
Edited by RobW - Feb. 24, 2017 10:30:50
Apprentice Attribute / Houdini 17.0.381 / GTX 970 - driver 411.63
- RobW
- Member
- 147 posts
- Joined: March 2014
- Offline
After some more RTFM and some testing with dragging and dropping parameters, I found the culprit.
The driving parameter should be referenced as a channel as well.
So instead of ,“../../subnet/minrot”, it should read ,ch(“../../subnet/minrot”),
Works like a charm now!
rob
The driving parameter should be referenced as a channel as well.
So instead of ,“../../subnet/minrot”, it should read ,ch(“../../subnet/minrot”),
Works like a charm now!
rob
Edited by RobW - Feb. 25, 2017 04:59:07
Apprentice Attribute / Houdini 17.0.381 / GTX 970 - driver 411.63
-
- Quick Links