Jump to content
probiner

OpenCL and VDB examples?

Recommended Posts

Volume Wrangle seems to be slow at times, so I've been wondering if getting into OpenCL SOP is worth it.

What are the best applications of OpenCL in Houdini and are there any examples of its SOP being used with Volumes/VDB?

Thanks!

Share this post


Link to post
Share on other sites

Hi,

Yes it's well worth it. For volume convolution, the performance is on the orders of magnitude, so between waiting even 30 mins vs real time kind of difference. One trick is to use a small kernel size while using a large number of iterations which works really well for blurring.

So one could definitely make an OpenCL based volume SOPs if desired.

Share this post


Link to post
Share on other sites
Posted (edited)
14 hours ago, animatrix said:

Hi,

Yes it's well worth it. For volume convolution, the performance is on the orders of magnitude, so between waiting even 30 mins vs real time kind of difference. One trick is to use a small kernel size while using a large number of iterations which works really well for blurring.

So one could definitely make an OpenCL based volume SOPs if desired.

I see
I was pondering about it since the slowest part of a current setup is a Volume Wrangle with something as simple as:

int value = detail(1, "value") ;  // from a "for each" metadata
@density = @density == value ;

Does your course cover any of it?

Thanks

Edited by probiner

Share this post


Link to post
Share on other sites

Unfortunately Volume Wrangle is very slow.

OpenCL for volumes beats even C++ in volume convolutions.

5 hours ago, probiner said:

Does your course cover any of it?

Thanks

Pragmatic VEX, no. Pragmatic OpenCL will :D

Share this post


Link to post
Share on other sites
7 hours ago, animatrix said:

Unfortunately Volume Wrangle is very slow.

OpenCL for volumes beats even C++ in volume convolutions.

Pragmatic VEX, no. Pragmatic OpenCL will :D

Ahahah! Well played! :D

  • Haha 1

Share this post


Link to post
Share on other sites
8 hours ago, animatrix said:

Unfortunately Volume Wrangle is very slow.

OpenCL for volumes beats even C++ in volume convolutions.

Pragmatic VEX, no. Pragmatic OpenCL will :D

One last question, if I may. Do you confirm then that the volumes themselves are not writable through OpenCL?

Share this post


Link to post
Share on other sites
1 hour ago, probiner said:

One last question, if I may. Do you confirm then that the volumes themselves are not writable through OpenCL?

Regular volumes are, but VDBs are still not writable until SESI fully integrates NanoVDBs into Houdini.

Share this post


Link to post
Share on other sites
Posted (edited)

Gotcha, thank you for that confirmation. I'll se if I can pull anything with that code in mind with a regular volume! 

 

Edited by probiner

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×