I've been reading this forum for a while now and even asked a few questions. The response from the community is always great so I figured it was time for me to give back a little. We have some very talented people at Seasun Games and part of our pipeline involves using Houdini 16+ heightfields quite a lot. Since moving our tools from being grid base to using volumes, there is one computed datasets that we wanted to improve and it is Ambient Occlusion on the Heightfield.
In short, this dataset allows us to modulate the distribution of plants or rocks on the terrain. It was very slow to compute using traditional VEX so I set out to create an OpenCL version and I'm sharing the result today.
I have 2 main reason for this release. First, to give back to the community that I consult often and second, to share the code and the knowledge of using OpenCL in Houdini. It's not an easy language but the benefits are sometimes extraordinary.
Also, maybe some OpenCL pro on this forum will find ways of optimizing it or it's up to anyone to add features and improve the asset. In any cases, its there for you to download. The SOP contains a branch that uses OpenCL and one that uses standard VEX for comparaison.
You can download the package below
A big thanks goes out to Robert Osborne for helping me figuring this stuff out:
https://www.sidefx.com/profile/skara/ [www.sidefx.com]
I hope you find it useful.
Cheers!
Christian Sirois
Technical Director
Seasun Games