kleer001 Posted July 4, 2014 Share Posted July 4, 2014 Hio, I'm finding that I love love love the ray SOP, but it's too slow. The Point Wrangle SOP, lovely as it is, is a little opaque to me. I don't have a lot of VEX experience. But what I think I need is the "rayhittest" function, but I can't seem to get it to work. I get the error "Call to undefined function 'rayhittest'..." whaaa? See attached. reraySOP.hip Quote Link to comment Share on other sites More sharing options...
magneto Posted July 4, 2014 Share Posted July 4, 2014 AFAIK that function is available for shaders, not in SOPs. I think you will need to use the intersect function. Quote Link to comment Share on other sites More sharing options...
kleer001 Posted July 5, 2014 Author Share Posted July 5, 2014 thanks, sounds good, I'll give it a shot! Quote Link to comment Share on other sites More sharing options...
dbukovec Posted July 6, 2014 Share Posted July 6, 2014 Although some functionality is missing, you can try the ray ql sop from qlib, it is faster. Quote Link to comment Share on other sites More sharing options...
Skybar Posted July 6, 2014 Share Posted July 6, 2014 In an effort to learn some VEX I figured out how to use Intersect in a Point Wrangle. It's a bit different than using the same in a VOPSOP where it is very straightforward in my opinion. It got very basic functionality versus the Ray SOP, and it may not be very clean, but I'm sharing my result anyway: int hitprim; int input; vector pos; float hitu; float hitv; vector dist; vector lift; float maxdist; vector scale; input = 1; //which input to collide with dist = @N * 1; //the length of N is distance of the ray, so multiply to increase distance lift = @N * 0; //the amount to lift after points have been rayed maxdist = clamp(length(@N), 0, 1); //if you want a max distance scale = 1; //scale of the operation i@hitprim = intersect(input, @P, dist * maxdist, v@pos, f@hitu, f@hitv); @P = (((@pos + lift) - @P)*scale)+@P; 2 Quote Link to comment Share on other sites More sharing options...
freaq Posted July 8, 2014 Share Posted July 8, 2014 nice I'll see if I have some time and maybe can create a simple .otl from it and possibly extend it to also support nearest point/surface 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.