検索 - User list
Full Version: Two Heightfields in OpenCL
Root » Houdini Indie and Apprentice » Two Heightfields in OpenCL
CStinson
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
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
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_
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.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB