point clouds and gather

   5490   5   0
User Avatar
Member
665 posts
Joined: July 2005
Offline
Does anyone know of an example of the gather loop being used with Point Clouds? I find myself stumbling over the concept of the two.

thanks!
-j
User Avatar
Member
941 posts
Joined: July 2005
Offline
jacob clark
Does anyone know of an example of the gather loop being used with Point Clouds? I find myself stumbling over the concept of the two.

I don't know of any specific examples for this, but gather() just takes a direction and a cone angle, so I don't think there should be any problem calling it for each point in a point cloud. The only thing I would caution against is using derivatives, as I'm not sure if they're reliable for PC points.
Mario Marengo
Senior Developer at Folks VFX [folksvfx.com] in Toronto, Canada.
User Avatar
Member
665 posts
Joined: July 2005
Offline
Thanks Mario. I got it working based off of a file I found on Point cloud Occlusion.

Though is seems that when I run the setup my refraction is actually darker than the original Image I trace.
I've attacted a pic of my surface with a grid behind it. The grid is a pretty bright white, while the refraction seems rather dark. Attached is the file used to generate this pic.

Any help with this is much appreciated, thanks!

-j

Attachments:
PCGather_v1.jpg (30.9 KB)
PCGather.tar.gz (99.2 KB)

User Avatar
Member
665 posts
Joined: July 2005
Offline
Additionally. I can't seem to get the same result twice. Is there some sort of random seed associated with this that chages per frame?

I've attached two images below that were rendered from the same scene. One after the other. In fact the only difference is that they were rendered at a slightly different time. Yet they both seem to be picking up different color information.

Heh, thanks again!
-j

Attachments:
PCGatherB_v1.jpg (10.0 KB)
PCGatherA_v1.jpg (10.1 KB)

User Avatar
Member
941 posts
Joined: July 2005
Offline
jacob clark
Thanks Mario. I got it working based off of a file I found on Point cloud Occlusion.

Though is seems that when I run the setup my refraction is actually darker than the original Image I trace.
I've attacted a pic of my surface with a grid behind it. The grid is a pretty bright white, while the refraction seems rather dark. Attached is the file used to generate this pic.

Any help with this is much appreciated, thanks!

-j

Hey Jason,

Digging through vop spaghetti is like getting a root canal… or two.
Anyway, I managed to spot a couple of things:
* Bias was way too big. Changed it to 0.005.
* For a 1-degree cone angle, 40 samples is way overkill, I changed it to 4.
* For an IOR of 1, you don't need to call fresnel(), just use the incidence direction.
* The incidence direction on a PC point is not the global “I”. This global is only valid for the shade point. For a PC point, the incidence is “PC.P-Eye”. Where PC.P is the PC point's position transformed to current space (or camera space).
* Fresnel was giving you a Kt that was less than 1, even though your IOR was 1. Dunno what that's all about (bug?), but that's what was causing it to go dark.
* For the filtering, I'd recommend to either work with the radius (in object-space units), or the number of points, but not both. So I used the radius (0.2) and set the number of points to a maximum of 1e+6.
* Maximum distance of -1 means “search infinitely far”, which is probably a better value than 30, since you might get flicker during animation.

I made those changes (though there are probably other issues I missed, but vops defeated me), and removed fresnel altogether. Seems stable now… I think.
Edited by - Oct. 7, 2008 13:17:59

Attachments:
PCGather_mario_v0001.hip (285.6 KB)
test.jpg (21.2 KB)

Mario Marengo
Senior Developer at Folks VFX [folksvfx.com] in Toronto, Canada.
User Avatar
Member
665 posts
Joined: July 2005
Offline
Hi Mario,

thanks for taking the time with this. I had hoped to keep the Fresnel in there. I set it to one simply to check out the settings. Also, the cone angle was so narrow for the test as well.

Good spot with the Kt value, I wonder if that's due to the Point Cloud? Also, I'll be sure to change up the I value, as PC.P-EYE makes more sense.

I'll let you know how it goes. Thanks again!

cheers,
-j
  • Quick Links