jackassol Posted February 10, 2017 Share Posted February 10, 2017 Hello, i added a simple Spline und copied some rectangels on it. (PICTURE 1) Now i wanted to blend the normals, so that the bottom rectangels always have the direction of the ground (PICTURE 2) Does anyone know how i can do this? i posted my hip file aswell best spline.hipnc Quote Link to comment Share on other sites More sharing options...
f1480187 Posted February 11, 2017 Share Posted February 11, 2017 Select bottom points, set their normal to {0, 1, 0} with a Wrangle, Point VOP or Point SOP right before copying. modify_copy_normal.hipnc Quote Link to comment Share on other sites More sharing options...
konstantin magnus Posted February 11, 2017 Share Posted February 11, 2017 You can blend values (i.e. @N vs. @up) by adding to multiplications with each other: @N = (@N * (1 - mix) ) + (@up * mix); mix and 1 - mix are controlling how much influence @N and @up get on each point. So after polyframe you could put this into a wrangle: float mix = @ptnum / float(@numpt - 1); vector up = {0, 1, 0}; @N = (@N * (1 - mix) ) + (up * mix); @N = normalize(@N); blending_normals.hipnc Quote Link to comment Share on other sites More sharing options...
konstantin magnus Posted February 11, 2017 Share Posted February 11, 2017 You can also use the lerp function instead of line 3. @N = lerp(@N, up, mix); 1 Quote Link to comment Share on other sites More sharing options...
jackassol Posted February 11, 2017 Author Share Posted February 11, 2017 wow - really cool - is there also a way to define the falloff? @konstantin magnus Quote Link to comment Share on other sites More sharing options...
konstantin magnus Posted February 11, 2017 Share Posted February 11, 2017 You change the falloff with a ramp by adding mix = chramp('change_mix', mix); and clicking on the little icon appearing right to your code box. 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.