appleseed Users Forum

OSL: Unable to get pointcloud_search to work

Hi folks,

I just discovered appleseed and it’s very impressive! My hat goes off to everyone involved.

I am writing a shader that relies on point data, and so far no success. I seem to get no results with pointcloud_search() and the diagnostics at the end report about 8 million calls to this function but 0 results.

The OSL support docs say that this is supported through partio (which is what I’m using to generate my ptc file) but that it’s not tested. So I’m wondering if this is an experimental feature that’s not turned on by default, and if not, what I might do to debug my shader.

Thanks in advance for any suggestions,
Oktay

1 Like

Hi @oktay,

welcome to our forum!
First, thanks for the kind words for appleseed, much appreciated.

Now, to use pointcloud_search and related OSL library calls, OSL needs to be build with Partio.
Partio -- optional, but if it is not found at build time, the OSL pointcloud functions will not be operative.

appleseed official releases are built without Partio. So you would have to make your own Partio-enabled OSL build and then build appleseed with it.

Ps.) In Cycles OSL pointcloud support is/was also not available in standard builds.
https://blender.stackexchange.com/questions/119033/how-to-use-pointcloud-write-and-pointcloud-search-open-shading-lang

Hi @Mango3,

Thank you for the reply, I appreciate it! If I build OSL with partio, and then use the dependency package for the rest, that should be it, right?

Thanks again, and stay safe,
Oktay

Hi @oktay,

Yes, that should work. Let us know if it works out for you and maybe even show a rendered image :slight_smile:

Happy rendering!

Hi @Mango3,

I’ve been at it for several days, but unfortunately OSL does not want to cooperate :frowning: I got things to compile, but it fails at link time – it insists on looking for dllimport versions of OpenImageIO calls (and the dependency package has static libraries). I also tried using the vcpkg package manager for Visual Studio to get a prebuilt OpenImageIO but that fails to compile with:

oslnoise.h(204): error C3520: ‘ListT’: parameter pack must be expanded in this context

plus it looks like that one is linked against boost 1.72. (BTW, I’m using Windows 10, Visual Studio 2015.)

So, if it’s not too much trouble, may I impose on the devs for a partio enabled build? I promise to share what I come up with, including shaders and scripts.

Thank you for all your help,
Oktay

Hi @oktay,

Not sure if this will happen. We may give it a try, but I can’t promise it.
Your experience is one of the reasons we try to limit the use of 3rd part libraries for our builds.
It should be moderately easy to build appleseed with the build instructions from our wiki.
This is even more important under Linux to avoid symbol collisions and dependency problems.

Hi @Mango3,

Heh heh, no worries, I understand the problem, I suffer from it myself! I might bite the bullet at some point and try building OIIO from scratch, and I will post here if I get anywhere.

Thanks again for helping me,
Oktay

1 Like