CStinson
2025年4月4日 19:03:42
Hi,
I wish to manipulate a pair of heightfields in OpenCL. I can pass them as volumes in the bindings but am forced to link the parameter for each to "height" in the heightfield. I am able to reference the first in my code, but how do I reference the second?
I have also tried passing them through a merge so both reach the OpenCL as a single input. Again I am stuck as to how to reference the second in my code.
Thanks
Cliff
ObeidaZakzak
2025年4月6日 04:20:57
Hello,
I think that you could do this by changing the name of the second heightfield to something other than "height" using a Name SOP before reading it in OpenCL SOP. This way you can get two different names for bindings.
CStinson
2025年4月6日 21:47:30
Thank you ObeidaZakzak. That works but has exposed another problem. (Actually it has exposed my ignorance with Houdini.) What I want to achieve is to superimpose a water level on a heightmap, and to programatically change the water level. I have tried a few methods without succeess. If I use a second HF for the water and merge the two, I can see the two levels. But both are called height and I have been unable to address the second in code. If I rename the height from the second HF as something else, (eg. waterheight) it disappears from my view. It ses the view is programmed to display only the height. I have switched between VEX and OpenCL looking for a soltion but so far have failed. Any advice you could give would be appreciated.
Cliff
animatrix_
2025年4月7日 00:47:03
CStinson
Thank you ObeidaZakzak. That works but has exposed another problem. (Actually it has exposed my ignorance with Houdini.) What I want to achieve is to superimpose a water level on a heightmap, and to programatically change the water level. I have tried a few methods without succeess. If I use a second HF for the water and merge the two, I can see the two levels. But both are called height and I have been unable to address the second in code. If I rename the height from the second HF as something else, (eg. waterheight) it disappears from my view. It ses the view is programmed to display only the height. I have switched between VEX and OpenCL looking for a soltion but so far have failed. Any advice you could give would be appreciated.
Cliff
You can rename it back to height after.