In this case the OpenCL code is 144 times faster than VEX on GTX 970.
OpenCL Wrangle SOP: Geometry Manipulation on the GPU using OpenCL
18247 20 3- animatrix_
- Member
- 4520 posts
- Joined: Feb. 2012
- Offline
This operator allows you to run an OpenCL kernel as part of your SOP network. Depending on the GPU, some operators can be orders of magnitude faster than even VEX.
In this case the OpenCL code is 144 times faster than VEX on GTX 970.
In this case the OpenCL code is 144 times faster than VEX on GTX 970.
Edited by animatrix_ - Sept. 8, 2016 11:49:59
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]
youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]
youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
- mestela
- Member
- 1742 posts
- Joined: May 2006
- Offline
- animatrix_
- Member
- 4520 posts
- Joined: Feb. 2012
- Offline
OpenCL library functions are pretty slim compared to VEX, i.e. no point clouds, etc. You can access point/prim/vertex/detail attributes of int/float/int array/float array, scalar/vector/matrix fields, etc. So the code is more convoluted compared to VEX, but speed bonus is always nice
You can't create new geometry without using geometry shaders which are not supported by Houdini AFAIK. So you can only modify what you have.
Hope SESI adds an OpenCL Wrangle SOP to H16.
You can't create new geometry without using geometry shaders which are not supported by Houdini AFAIK. So you can only modify what you have.
Hope SESI adds an OpenCL Wrangle SOP to H16.
Edited by animatrix_ - June 12, 2016 02:59:58
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]
youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]
youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
- Nima
- Member
- 471 posts
- Joined: Nov. 2013
- Offline
- animatrix_
- Member
- 4520 posts
- Joined: Feb. 2012
- Offline
No, Houdini has OpenCL support out of the box.
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]
youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]
youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
- Nima
- Member
- 471 posts
- Joined: Nov. 2013
- Offline
- animatrix_
- Member
- 4520 posts
- Joined: Feb. 2012
- Offline
Gas OpenCL DOP
The only missing thing is to be able to run OpenCL on the CPU which should still be faster than C++.
I submitted an RFE for this.
The only missing thing is to be able to run OpenCL on the CPU which should still be faster than C++.
I submitted an RFE for this.
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]
youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]
youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
- Nima
- Member
- 471 posts
- Joined: Nov. 2013
- Offline
- Solitude
- Member
- 373 posts
- Joined: March 2009
- Offline
pusat
Gas OpenCL DOP
The only missing thing is to be able to run OpenCL on the CPU which should still be faster than C++.
I submitted an RFE for this.
http://archive.sidefx.com/docs/houdini15.0/news/13/opencl [archive.sidefx.com] << you mean this?
Ian Farnsworth
- animatrix_
- Member
- 4520 posts
- Joined: Feb. 2012
- Offline
Thanks Ian I didn't know that. It would be nice to be able to do this directly inside Houdini using a toggle though, so it's useable in a studio environment.
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]
youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]
youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
- animatrix_
- Member
- 4520 posts
- Joined: Feb. 2012
- Offline
You can download the operator here:
OpenCL Wrangle SOP [dropbox.com]
Relax geometry OpenCL kernel shown in the video is included as a preset inside the HDA.
Time to put those Titans to use
OpenCL Wrangle SOP [dropbox.com]
Relax geometry OpenCL kernel shown in the video is included as a preset inside the HDA.
Time to put those Titans to use
Edited by animatrix_ - June 21, 2016 21:57:40
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]
youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]
youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
- animatrix_
- Member
- 4520 posts
- Joined: Feb. 2012
- Offline
I added another preset for accurate smoothing of meshes. It's the same code I use in my Smooth SOP which now works in real time even for 100 iterations.
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]
youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]
youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
- l0op1ng
- Member
- 6 posts
- Joined: Dec. 2011
- Offline
- animatrix_
- Member
- 4520 posts
- Joined: Feb. 2012
- Offline
Np man, enjoy it
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]
youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]
youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
- Javid Pack
- Member
- 8 posts
- Joined: Dec. 2013
- Offline
pusatI have some questions.
I added another preset for accurate smoothing of meshes. It's the same code I use in my Smooth SOP which now works in real time even for 100 iterations.
I noticed that as I scrub back and forth on the timeline and watch the Geometry Spreadsheet window, position values change ever so slightly in both the Smooth and Relax preset examples. From my limited knowledge in this area, my understanding is that this is the nature of GPU programming and the fact that the order of kernels isn't guaranteed. Are there any precautions I'd need to take for this concurrent modification of data values? In this case it is fine given the nature of the problem, but I am just curious for things I might need to look out for as I attempt my own programming.
The point of this otl is for facilitating general purpose opencl in Houdini, correct?
What is the point of the “barrier ( CLK_LOCAL_MEM_FENCE );” in the Smooth code?
There is a “Recompile Kernel” check box, but intuitively I'd assume this should be a button. Is this doing something I'm not understanding?
Is copying memory back and forth between the device and the GPU handled automatically in opencl? I was learning a bit of CUDA and I had to handle that myself.
I hope you can shed some light on these issues. I'm not a Houdini expert but my current area of research requires the power of the GPU to show promising results.
- animatrix_
- Member
- 4520 posts
- Joined: Feb. 2012
- Offline
I noticed that as I scrub back and forth on the timeline and watch the Geometry Spreadsheet window, position values change ever so slightly in both the Smooth and Relax preset examples. From my limited knowledge in this area, my understanding is that this is the nature of GPU programming and the fact that the order of kernels isn't guaranteed. Are there any precautions I'd need to take for this concurrent modification of data values? In this case it is fine given the nature of the problem, but I am just curious for things I might need to look out for as I attempt my own programming.
That's because right now there is no way to have a true timeless DOPnet as a SOP node. Hopefully H16 will address this issue. So if this node was time-independent, then the results would not change from frame to frame.
Currently your best bet is to use a TimeShift SOP afterwards.
The point of this otl is for facilitating general purpose opencl in Houdini, correct?
- Yes
What is the point of the “barrier ( CLK_LOCAL_MEM_FENCE );” in the Smooth code?
https://www.khronos.org/registry/cl/specs/opencl-2.0-openclc.pdf#page=99 [khronos.org]
There is a “Recompile Kernel” check box, but intuitively I'd assume this should be a button. Is this doing something I'm not understanding?
“When loading kernels from disk the kernel is cached to avoid regenerating it every solve. Turning this on forces the re-loading and recompiling of the kernel. This is useful if #include files refer to code that has changed, or the kernel file is changed in an external text editor.
It should always be disabled when protoyping is complete.”
Is copying memory back and forth between the device and the GPU handled automatically in opencl? I was learning a bit of CUDA and I had to handle that myself.
Yes.
I hope you can shed some light on these issues. I'm not a Houdini expert but my current area of research requires the power of the GPU to show promising results.
That's because right now there is no way to have a true timeless DOPnet as a SOP node. Hopefully H16 will address this issue. So if this node was time-independent, then the results would not change from frame to frame.
Currently your best bet is to use a TimeShift SOP afterwards.
The point of this otl is for facilitating general purpose opencl in Houdini, correct?
- Yes
What is the point of the “barrier ( CLK_LOCAL_MEM_FENCE );” in the Smooth code?
https://www.khronos.org/registry/cl/specs/opencl-2.0-openclc.pdf#page=99 [khronos.org]
There is a “Recompile Kernel” check box, but intuitively I'd assume this should be a button. Is this doing something I'm not understanding?
“When loading kernels from disk the kernel is cached to avoid regenerating it every solve. Turning this on forces the re-loading and recompiling of the kernel. This is useful if #include files refer to code that has changed, or the kernel file is changed in an external text editor.
It should always be disabled when protoyping is complete.”
Is copying memory back and forth between the device and the GPU handled automatically in opencl? I was learning a bit of CUDA and I had to handle that myself.
Yes.
I hope you can shed some light on these issues. I'm not a Houdini expert but my current area of research requires the power of the GPU to show promising results.
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]
youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]
youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
- Javid Pack
- Member
- 8 posts
- Joined: Dec. 2013
- Offline
pusatThank you for your answers, they helped me get started.
I hope you can shed some light on these issues. I'm not a Houdini expert but my current area of research requires the power of the GPU to show promising results.
One last thing, I'm having trouble getting a scalar field to work. It may just be my inexperience with houdini, but I created a volume node and added it's name as a parameter to the OpenCL wrangle node, but I get this error on the gasopencl solver.
Can you show/explain a simple setup for this? I tried merging the volume with the points, but houdini didn't like that. The field is passed in as a float array. Do I need to pass in the width/height/depth separately? If so, what would the order of the values be?
In the end, I want the node to run a calculation on each point in a set against both a volume and another set of points. In my HDK implmentation, I had 3 inputs, so I was able to do this, but I can't figure out how I would go about this with only 1 input. Merging the points seems like a bad idea because I'd need to figure out which are which and the mismatched attributes worries me.
Hopefully you can help, I understand if what I'm trying to do is complicated.
- fatak
- Member
- 32 posts
- Joined: Aug. 2010
- Offline
Hey guys,
Now that we have the OpenCL SOP, I've been playing around a bit, and I'd like to create a work buffer in local memory. Is there anyway to do this? More specifically, I want to process my P attribute (which I can access as global float *) in a local work buffer , which I would like to be a local float * of size get_local_size(0). Is there any way for me to create/allocate this local work buffer using the OpenCL SOP? It seems like the OpenCL bindings only allow me to create bindings to attributes, and kernel arguments (of int, float, float3, float4 types, and not arrays)
Thanks!
Now that we have the OpenCL SOP, I've been playing around a bit, and I'd like to create a work buffer in local memory. Is there anyway to do this? More specifically, I want to process my P attribute (which I can access as global float *) in a local work buffer , which I would like to be a local float * of size get_local_size(0). Is there any way for me to create/allocate this local work buffer using the OpenCL SOP? It seems like the OpenCL bindings only allow me to create bindings to attributes, and kernel arguments (of int, float, float3, float4 types, and not arrays)
Thanks!
- vinyvince
- Member
- 255 posts
- Joined: Sept. 2012
- Offline
Did you say Attribut blur and point relax in OpenCL???
Where where ? Tell me boy please
The link are broken @animatrix_ ...
Where where ? Tell me boy please
The link are broken @animatrix_ ...
Edited by vinyvince - March 25, 2022 14:51:47
Vincent Thomas (VFX and Art since 1998)
Senior Env and Lighting artist & Houdini generalist & Creative Concepts
http://fr.linkedin.com/in/vincentthomas [fr.linkedin.com]
Senior Env and Lighting artist & Houdini generalist & Creative Concepts
http://fr.linkedin.com/in/vincentthomas [fr.linkedin.com]
- tamte
- Member
- 8570 posts
- Joined: July 2007
- Offline
-
- Quick Links