can Houdini store info in array with input from ramp

   1205   4   2
User Avatar
Member
320 posts
Joined: May 2016
Offline
can Houdini take input from a ramp and store it into an array so it can be used in a formula? for instance I want to use a ramp to set multiple coordinates for latitude/longitude, then store them into an array for use in a formula? or instead of a ramp what input method would you recommend for input of lat/long data? also, if it can be done is information in array volatile or will it stay in array when I save program?

edit: for instance lat/long of Los Angeles, Dallas, Miami, Chicago etc ..
Edited by bobc4d - March 19, 2021 11:57:09
User Avatar
Member
40 posts
Joined: March 2018
Offline
To take values from a ramp at regular intervals you can write a loop in a detail wrangle like this:
float output_arr[];
for(int i = 0; i<10;i++){
float in = i/10.;
float out = chramp("myramp", in);
push(output_arr,out);
}
setdetailattrib(0,"array",output_arr);

Maybe you can adapt that idea? But really you might be better off just adding some float boxes to a wrangle, reading the values and pushing them to your array.
Edited by shareware - March 19, 2021 12:09:14
User Avatar
Member
320 posts
Joined: May 2016
Offline
thanks for the idea, I'm still somewhat new to Houdini and this might put me in over my head but I'll give it a go
User Avatar
Member
8602 posts
Joined: July 2007
Offline
bobc4d
or instead of a ramp what input method would you recommend for input of lat/long data?
Multiparm
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
320 posts
Joined: May 2016
Offline
tamte
bobc4d
or instead of a ramp what input method would you recommend for input of lat/long data?
Multiparm

from a google search and tutorials, it looks like multiparm might be the way to go. many thanks
  • Quick Links