TheDude Posted June 21, 2016 Share Posted June 21, 2016 (edited) I was wondering where I could learn how to make functions in the Gas OpenCL dop node? I could barely find any documentation on it aside from AMDs site, but that's a lot more low level programming related. Just looking for simple houdini-centric openCL demonstrations / examples. Update: A friend Artem showed me where the kernels live $HFS/houdini/ocl/ -- You can open them up and have a lil dig around, but even the simplest functions take a lot of overhead to set up Edited June 21, 2016 by TheDude 2 Quote Link to comment Share on other sites More sharing options...
animatrix Posted June 23, 2016 Share Posted June 23, 2016 You can download my OpenCL Wrangle SOP that comes with a preset for relaxing geometry. I plan to add more presets. My Smooth SOP also has an OpenCL branch that's on by default. So you can check out that code too. 2 Quote Link to comment Share on other sites More sharing options...
TheDude Posted June 23, 2016 Author Share Posted June 23, 2016 This is excellent Yunus, thanks very much for sharing. 1 Quote Link to comment Share on other sites More sharing options...
animatrix Posted June 27, 2016 Share Posted June 27, 2016 I updated the Smooth SOP recently if you downloaded it before the last weekend. Quote Link to comment Share on other sites More sharing options...
jkunz07 Posted July 21, 2016 Share Posted July 21, 2016 Has anyone ever gotten the open cl dop to work on fields? I've been trying to get a simple scenario to work where it essentially does: density *= 2.; The actual code I'm using is: kernel void test( global float* density_ ) { density_[0] = density_ * 2.0; } It throws an error saying no output field specified, I'm not sure if this is an issue with my code, or if this needs to be specified elsewhere on the dop itself? Thanks! Quote Link to comment Share on other sites More sharing options...
bunker Posted August 4, 2017 Share Posted August 4, 2017 (edited) yes, it works well on volumes. Have a look inside $HFS/houdini/ocl/ The most basic example is : $HFS/houdini/ocl/sim/dissipate.cl I'll post a file tomorrow, it doesn't seem to work well on my macbook pro at home Edited August 4, 2017 by bunker Quote Link to comment Share on other sites More sharing options...
Atom Posted August 4, 2017 Share Posted August 4, 2017 it might be that underscore after density. Perhaps something like this...? kernel void test( int stride_x, int stride_y, int stride_z, int stride_offset, global float * density ) { int idx = stride_offset + get_global_id(0) * stride_x + get_global_id(1) * stride_y + get_global_id(2) * stride_z; float density_ = density[idx]; density[idx] = density_ * 2.0; } Quote Link to comment Share on other sites More sharing options...
bunker Posted August 4, 2017 Share Posted August 4, 2017 yes that's it 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.