art3mis Posted December 21, 2016 Share 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? Quote Link to comment Share on other sites More sharing options...
Guest tar Posted December 21, 2016 Share Posted December 21, 2016 this is the closest. Quote Link to comment Share on other sites More sharing options...
lukeiamyourfather Posted December 21, 2016 Share 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 Quote Link to comment Share on other sites More sharing options...
symek Posted December 21, 2016 Share 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 Quote Link to comment Share on other sites More sharing options...
f1480187 Posted December 22, 2016 Share 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 Quote Link to comment Share on other sites More sharing options...
Atom Posted December 22, 2016 Share 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 Quote Link to comment Share on other sites More sharing options...
f1480187 Posted December 22, 2016 Share 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 Quote Link to comment Share on other sites More sharing options...
faxingberlin Posted January 12, 2017 Share Posted January 12, 2017 Are there any reference of OpenGL Context for houdini? like vex context(P, Cd, ....) Quote Link to comment Share on other sites More sharing options...
ch3 Posted April 18, 2017 Share 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 Quote Link to comment Share on other sites More sharing options...
ch3 Posted April 21, 2017 Share 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 Quote Link to comment Share on other sites More sharing options...
Iskander Posted October 22, 2017 Share 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 Quote Link to comment Share on other sites More sharing options...
Daryl Dunlap Posted October 31, 2017 Share 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 Quote Link to comment Share on other sites More sharing options...
Iskander Posted November 1, 2017 Share 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 Quote Link to comment Share on other sites More sharing options...
konstantin magnus Posted July 10, 2021 Share Posted July 10, 2021 Here is another implementation of reaction-diffusion running across a mesh using OpenCL. reaction_diffusion_ocl.hiplc 5 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.