CinnamonMetal Posted October 27, 2019 Share Posted October 27, 2019 In a attribute wrangler within a SOPSolver I have a hitnormal attribute. v@hitnormal = prim_normal(1,primhit,uv); In another attribute wrangler within the same SOPSolver there is this line of code. The problem, when the points hit the geometry the vector does not invert in the opposite direction ? vector reflectvector = reflect(v@v,v@hitnormal); Quote Link to comment Share on other sites More sharing options...
MENOZ Posted October 27, 2019 Share Posted October 27, 2019 I'd say it's because it's a function that is only available in shading context. I'm not sure exactly how is this structured, but I know some functions only works for shading, I'd be interesting to know why. https://www.sidefx.com/docs/houdini/vex/functions/index.html Quote Link to comment Share on other sites More sharing options...
konstantin magnus Posted October 27, 2019 Share Posted October 27, 2019 The reflect() function also works in SOPs: reflect.hipnc 1 Quote Link to comment Share on other sites More sharing options...
CinnamonMetal Posted October 27, 2019 Author Share Posted October 27, 2019 I did a little mistake, I can now get it to display the reflection normal; thank you guys 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.