inconsistent ray results?

   1622   4   2
User Avatar
Member
86 posts
Joined: April 2020
Offline
Hello Experts,

I'm hopeful one of you can help set me straight on what I'm doing wrong here. I have a simple workflow that takes a smaller surface and rays it onto a similar, but larger and slightly displaced surface. This seems to be working, except for a couple of points. (After the ray operation, their numbers are 26557 and 26547.) They appear to be stuck on the previous surface instead of being mapped to the target ray surface.

The attribute transfer and attribute blur nodes before the ray are some of my attempts to correct the situation, but I haven't found something that works.

I'm using Houdini 20.0.724.

If anyone could explain what's going on here, that would be wonderful. I attach the two input surfaces and the .hip file.

Thank you very much,
Mary

Attachments:
test-workflow.png (21.4 KB)
bad-post-ray-surf.png (380.2 KB)
test-surf-project.hip (120.8 KB)
zone-surf.geo (5.7 MB)
target-surf.geo (5.2 MB)

User Avatar
Member
247 posts
Joined: May 2017
Offline
Hi, try to set the kernel radius (attribute transfer) to the smallest surface distance between your geometries. And in generel try to keep the distance as close as possible, this will avoid projection overlapping.

EDIT:
For clarity, you can visualize the normal values. If you leave the kernel radius at the default value, you will see that the values differ slightly from the original geometry. This is probably due to the interpolation, as the radius covers more than one point. So if you set something to 1, the values are captured exactly. But there will still be overlaps in dense areas, for example in the bevel regions. To solve this try again to keep the distance between the two surfaces as small as possible.

kernel radius 10


kernel radius 1
Edited by vikus - July 1, 2024 04:21:56

Attachments:
r10.jpg (10.7 KB)
r1.jpg (10.6 KB)

User Avatar
Member
247 posts
Joined: May 2017
Offline
The hip file below shows another attempt without attribute transfer, in which the normal direction of the projected surface is simply flipped. Then using the attribute blur with the following setup to get the best result so far.


Image Not Found
Edited by vikus - July 1, 2024 04:46:46

Attachments:
test-surf-project_viklc.hip (134.1 KB)
attribute_blur.jpg (28.4 KB)

User Avatar
Member
5097 posts
Joined: Feb. 2012
Offline
Hi,

I think it's floating point precision issue. If you move the target geometry in Z by 0.00001, it works. I think the algorithm can miss hitting a polygon in some instances if the points are perfectly overlapping due to the floating point precision.

Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com] https://lnk.bio/animatrix [lnk.bio]
User Avatar
Member
86 posts
Joined: April 2020
Offline
Thank you both! This is tremendously helpful! And changing the floating point precision just fixed a later problem in the workflow as well!

With lots of gratitude,
Mary
  • Quick Links