Use of op: with pcopen in a shop context?

   6593   6   3
User Avatar
Member
49 posts
Joined: Jan. 2007
Offline
So I have a basic, color the surface according to nearby points from a point cloud setup.

I'm able to use a pcopen and pcfilter vop with the op: syntax for the point cloud texture file to color points in a sop context. The result isn't smooth enough for me so I want to get the coloring done at render time. However, If I use the same vop network in a mantra shader I can't get any results. I believe I've taken care to transform P, and I'm using the full path in op expression.

I'd like to avoid writing out a PC file to disk, though, I'm not sure if this is possible.

Attachments:
pcopenfromsopshader.hipnc (269.2 KB)

User Avatar
Member
606 posts
Joined: May 2007
Offline
Mantra has no knowledge of Houdini and it's nodes. You will need to write out the .pc
User Avatar
Member
49 posts
Joined: Jan. 2007
Offline
Ah, I had thought something like that. Thanks for clarification.
User Avatar
Member
49 posts
Joined: Jan. 2007
Offline
Just when I think I'm out of the woods… So I changed the shop to use a pc file. However, I notice I'm getting some sort of phantom point appearing in my render. Even if I scatter zero points, the pcfilter is causing a weird artifact in the center of the shader result. Maybe I'm accessing some invalid data?

In general is it okay to use pcfilter, or is iterating over the pcopen better practice? pcfilter is so much easier, so I hope that's not the case.

Attachments:
pcfilterartifact.png (14.0 KB)
pcopenfromsopshader_v02.hipnc (205.0 KB)

User Avatar
Staff
2540 posts
Joined: July 2005
Offline
Hehehe.
Add a Multiply Constant VOP before the Cf output and then cut the value down and you can clearly see what is happening. You see a weighted fall-off cut abruptly around your single point and then a nice radiating fall-off from 0,0,0.

You are subtracting the point cloud point from the current point to get a weighted fall-off. Fine. Around the single point you are getting a nice fall-off. This circular value is defined by the search radius in the PC Open VOP.

Now guess what value the PC Filter returns when you go beyond the PC Open filter radius? Yep it's 0. So outside the search radius, you are subtracting the current point from the origin and that is where your second fall-off region is coming from.

The answer is to increase your PC Open filter radius to encompass the entire grid (heck set it to 1E6 or one million and be done with it) and then use a Fit Range VOP to clamp down the radius of effect. A very common thing to do when munging about with the output from a PC look-up btw.

See the attached modified example.

Attachments:
pcopenfromsopshader_v02_jw.hipnc (272.2 KB)

There's at least one school like the old school!
User Avatar
Member
49 posts
Joined: Jan. 2007
Offline
I figured it was something like that, but after playing around all day the brain was stretched and I couldn't think it through properly. Thanks!
User Avatar
Member
33 posts
Joined: July 2017
Offline
Hi, I would like to bring back to life this topic. I need SOS and that's the closest one I have been able to find to my problem in the houdini forums.

I am trying to do a shader which uses points saved on disk for creating a mask inside of it. The reason why I am implementing point clouds is that I need to blur this mask so I can avoid visible hard edges.

Everything is fine until I have points that are close to each other and some artifacts appears (please see picture or hipfile below)

I think I understand the reason for this but I don't know how to solve it. Of course different “points”/surface positions in the grid have different near points from the point cloud. I was thinking that using pcfilter on the points from the point cloud would have been good enough but the artifacts are still there. I have tried several other different combinations for days but nothing to do.

There are some solutions for that? Thank you



Image Not Found
Edited by Andrea Sbabo - July 3, 2019 10:00:05

Attachments:
pcopenfromsopshader_v03.hipnc (307.5 KB)
multiple_points.jpeg (40.3 KB)

FX Artist - Scanline VFX
  • Quick Links