ray sop----how to get the collision primitive number

   2903   2   1
User Avatar
Member
111 posts
Joined: Dec. 2008
Offline
hi everyone:

I have a simple question about the ray sop. How can I get the number of the collision primitive which ray hit .

I have tried several ways but it not works . Hope some one can offer a help. 8)
User Avatar
Member
648 posts
Joined: July 2005
Offline
on the target, put $PR into a primitive integer attribute, promote it to points using 1st match then sample that attribute in the ray sop.

if you're using closest point then you'll need to sample twice by sending the closest-point ray direction back to the source point normals, then re-ray it using normals so you can sample the target's attributes.
User Avatar
Member
111 posts
Joined: Dec. 2008
Offline

thank you very much. I will try it soon.
  • Quick Links