Welcome to od|forum

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.

# BLEND NORMALS

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

##### Share on other sites

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

##### Share on other sites

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

##### Share on other sites

You can also use the lerp function instead of line 3.

`@N = lerp(@N, up, mix);`

1 person likes this

##### Share on other sites

wow - really cool - is there also a way to define the falloff? @konstantin magnus

##### Share on other sites

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.

## Create an account or sign in to comment

You need to be a member in order to leave a comment

## Create an account

Sign up for a new account in our community. It's easy!

Register a new account