Two Heightfields in OpenCL

   Views 583   Replies 3   Subscribers 2
User Avatar
Member
11 posts
Joined: July 2024
Offline
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
User Avatar
Member
124 posts
Joined: Dec. 2019
Offline
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.
Houdini Pipeline Supervisor @ TAT Studio
User Avatar
Member
11 posts
Joined: July 2024
Offline
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
User Avatar
Member
4860 posts
Joined: Feb. 2012
Offline
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.
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com] https://lnk.bio/animatrix [lnk.bio]
  • Quick Links