Aaron Auty Posted February 7, 2019 Share Posted February 7, 2019 I am trying to use rayhittest() in a snippet to test for intersections from a primitive to an arbitrary location. (A camera, a light etc) I have an example that works in SOPs in my .hip using intersect, however I need something that works at render-time. I have tried adding a scope to self, however, I am not sure if my syntax is correct. I have something like; dist = rayhittest(origin, ray, 0.05, 'scope', 'self'); If I bind dist to a hard coded value, I can see that something is coming out of the snippet. Any pointers? Any easier ways to do shader based intersections? Hip file attached Cheers, Aaron. rayPigs.hipnc Quote Link to comment Share on other sites More sharing options...
davpe Posted February 10, 2019 Share Posted February 10, 2019 well this is a bit odd what you doing. not sure what the result should be. technically, you cannot evaluate an intersection with a point in space as there is no surface area to be intersected. in sops it gives you some result but I haven't found it meaningful in any way. anyways, if you want to use intersect in shader you can use the same Intersect VOP as you have in SOPs. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.