Point clouds - howto needed

   2155   1   1
User Avatar
Member
23 posts
Joined: July 2008
Offline
I would like to learn how to create and use point clouds. But I can't find any howtos.

Is it possible to build a custom Sop which creates a point cloud containing arbitrary information and then read that cloud in a shader using a custom Vop?

Any help is appreciated, and since I'm very new at this, code examples are also very useful.

Thanks for any help.
User Avatar
Member
1390 posts
Joined: July 2005
Offline
burnie
I would like to learn how to create and use point clouds. But I can't find any howtos.
Is it possible to build a custom Sop which creates a point cloud containing arbitrary information and then read that cloud in a shader using a custom Vop?
Any help is appreciated, and since I'm very new at this, code examples are also very useful.
Thanks for any help.

Yes, all of this is possible. Point Cloud is just a bunch of points in space. In Sops context any geometry is a kind of point cloud, you can save already in file though they won't be terrible useful. When you create a denser point cloud with a help of Scatter SOP from your geometry, points in PC will have all attributes of your geometry properly interpolated from prims and points. Then you have to save your PC with *.pc extension, like any other geometry.

Another way of creating PC (perhaps even more useful and more often in use) is saving a cloud of micropolygons in a *.pc file during rendering (with pcwrite() call). It will create pretty the same thing - a bunch of points with attributes, although in this case, you have to store any attributes explicitly in shader code (in SOPs PC inherits attributes from geometry it is created from). Besides that difference, it behaves exactly the same. You can open it in SOPs, import into shader (with pcopen(), pciterate(), etc – > see them in Help.).

As a quick starting point, check out this Help page:
http://www.sidefx.com/docs/houdini9.1/vex/functions/pcopen [sidefx.com]

hope this helps.
sy.
  • Quick Links