# Blend Sop With Kernel Fallof?

## Recommended Posts

Hi there,

After taking a look at Craig Zeroni

##### Share on other sites

Hi there,

I need a tool similar to Blend SOP, but with an ability to restrict the blending to certain parts of the geometry bounded by a soft radius - i.e. the parts of the geometry that are further from the kernel of blending are effected, while the points of the geo that are closest to the kernel are blended the most - so that there was a nice controllable falloff of blending effect.

Any simple solutions?

I'm not sure exactly what you're looking for, but here's a trivial

little VEX function which blends between two pieces of geometry based

on a smooth rolloff from the center point.

```sop
{
vector	p1;
float	factor;

// Get the position of the second input
if (!import("P", p1, 1))
p1 = P;
// Compute the blending factor
// Now, do the blending.
P = lerp(P, p1, factor);
}```

##### Share on other sites

Just skimmed through Exchange and saw Simon's Soft Blend otl - maybe this will suffice what I need, or will set me on track.

http://www.sidefx.com/exchange/info.php?fi...p;versionid=105

I'm not sure exactly what you're looking for, but here's a trivial

little VEX function which blends between two pieces of geometry based

on a smooth rolloff from the center point.

```sop
{
vector	p1;
float	factor;

// Get the position of the second input
if (!import("P", p1, 1))
p1 = P;
// Compute the blending factor
// Now, do the blending.
P = lerp(P, p1, factor);
}```

Yeah Crunch - more or less I was thinking about similar solluton. Thank you.

So there are noready-made sollutions? It's ok - just didn't want to reinvent another bicicle.

##### Share on other sites

I just whipped up a quick hip before I noticed these replies and it's along the same lines as Simon's blend OTL which I'd forgotten about!! Here it is for comparison in case this is any use. I painted a control area, used an attribute transfer to get the falloff and a point SOP to do the blend. It's basically a 3-node solution.

softBlend_jsh.hip

##### Share on other sites

• 3 weeks later...

Thanks, grasshopper - it gave me some fruitfull food for thought.

anyway, here's the sollution I ended up with. It is very simple and I doubt that anybody can't do it on his/her own (btw - are there any females among us?). See the attached example file and the otl.

zzz

VEX_Distance_bend.rar

## 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.

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×