art3mis 56 Posted December 21, 2016 Hi My understanding is that VEX runs entirely on the CPU. But with the right hardware (ie latest Pascal based GPU) the same functionality in OpenCl could be magnitudes faster. Is anyone aware of any OTL or other project which have converted VEX code to OpenCL? Share this post Link to post Share on other sites
Guest tar Posted December 21, 2016 this is the closest. Share this post Link to post Share on other sites
lukeiamyourfather 191 Posted December 21, 2016 There are some concepts shared but OpenCL is an entirely different beast. That's like asking how to power a gasoline car with batteries. There are electric cars but they're completely different from gasoline powered cars. 1 Share this post Link to post Share on other sites
symek 389 Posted December 21, 2016 Much of VEX functionality is actually implemented as C++ code interacting with Houdini's and Mantra libraries and most importantly data structures. Reimplementing them so they can be called from OpenCL wouldn't be trivial and most probably would ruin OpenCL performance. Compiling VEX code without calls to built-in functions other than math expression, so that it can be evaluated on OCL device would't be hard at all AFAIK - thanks to LLVM, which compiles code to intermediate format anyway, but the functionality would be very very limited and I doubt in any benefits. There are rare cases, like filter like kernels when OCL has big advantage. It's like 2% of all use cases. Are you really so advanced in using VEX so that VEX performance slows you down? There is always C++ waiting. 1 Share this post Link to post Share on other sites
f1480187 799 Posted December 22, 2016 Here is 2D reaction diffusion in VEX (from "VEX in Houdini") and OpenCL. Also check "Grains" masterclass and it's OpenCL ripples example. opencl_reaction_diffusion.hipnc Share this post Link to post Share on other sites
Atom 1,489 Posted December 22, 2016 (edited) That is an interesting example but I get errors on my system and it does not work. It even converted my desktop into a basic color scheme, for some reason..? The Gas OpenCL node is in an error state. If I click Generate Kernel I do see some cooking message but then it returns to an error state. Edited December 22, 2016 by Atom Share this post Link to post Share on other sites
f1480187 799 Posted December 22, 2016 (edited) @Atom, Generate Kernel button simply makes template based on parameter setup. Normally, it pops window with text for copy-pasting. Well, I can't do much there, since I also have no idea how the whole thing works. Hope to see more comprehensive examples of utilizing Gas OpenCL in future Houdini builds. Edited December 22, 2016 by f1480187 Share this post Link to post Share on other sites
faxingberlin 0 Posted January 12, 2017 Are there any reference of OpenGL Context for houdini? like vex context(P, Cd, ....) Share this post Link to post Share on other sites
ch3 33 Posted April 18, 2017 On 12/21/2016 at 8:33 PM, f1480187 said: hey, thanks for sharing this file, I was having trouble with my implementation and good to see yours. Plus that openCL approach is amazing!!! Here is 2D reaction diffusion in VEX (from "VEX in Houdini") and OpenCL. Also check "Grains" masterclass and it's OpenCL ripples example. opencl_reaction_diffusion.hipnc Share this post Link to post Share on other sites
ch3 33 Posted April 21, 2017 Since I was working with the new H16 height fields, I re-implemented the reaction diffusion using those rather than points. I also did it without DOPs, using just an openCL within a SOP solver. I've attached a new file. reactionDiffusion.hip 2 Share this post Link to post Share on other sites
Iskander 37 Posted October 22, 2017 (edited) I found on github a little bit OpenCL. Thank you,Karsten Schmidt,for clear and simple code example.https://github.com/thi-ng/houdini Maybe it will be usefull for someone(for newbies like me i mean ). dejong-opencl.hipnc Edited October 22, 2017 by Iskander 2 Share this post Link to post Share on other sites
Daryl Dunlap 11 Posted October 31, 2017 Thanks for that sample file, it took me a few hours, but I finally understand the OpenCL SOP and the data I/O between Houdini and the GPU 1 Share this post Link to post Share on other sites
Iskander 37 Posted November 1, 2017 (edited) 12 hours ago, Daryl Dunlap said: Thanks for that sample file, it took me a few hours, but I finally understand the OpenCL SOP and the data I/O between Houdini and the GPU Maybe 3 scene files(in comments) from this video will be useful too(sadly russian,very good quick start). p.s It will also be useful to look inside Attribute Blur(principle of organization of variables with various input data types) and HeightFiledErode(principle of operation with volumes via openCL)nodes.And inside files in /opt/hfs16.0/houdini/ocl/ Edited November 1, 2017 by Iskander 1 Share this post Link to post Share on other sites
konstantin magnus 1,189 Posted July 10, 2021 Here is another implementation of reaction-diffusion running across a mesh using OpenCL. reaction_diffusion_ocl.hiplc 5 Share this post Link to post Share on other sites