trili Posted November 11, 2018 Share Posted November 11, 2018 Hi, will there any functions like Ray sop? Thanks! Quote Link to comment Share on other sites More sharing options...
bunker Posted November 11, 2018 Share Posted November 11, 2018 yes, the "intersect" vex function does that: vector p; vector uvw; vector raydir = normalize(chv("raydir")); float raylength = chf("raylength"); int primfound = intersect(1,@P,raydir*raylength,p,uvw); // copy primitive attribute from ray hit @Cd=prim(1,"Cd",primfound); 1 Quote Link to comment Share on other sites More sharing options...
trili Posted November 11, 2018 Author Share Posted November 11, 2018 11 minutes ago, bunker said: yes, the "intersect" vex function does that: vector p; vector uvw; vector raydir = normalize(chv("raydir")); float raylength = chf("raylength"); int primfound = intersect(1,@P,raydir*raylength,p,uvw); // copy primitive attribute from ray hit @Cd=prim(1,"Cd",primfound); Thanks! 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.