Jump to content

Blend Sop With Kernel Fallof?


MADjestic

Recommended Posts

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
mblend(vector center=0; float radius=1)
{
	vector	p1;
	float	factor;

	// Get the position of the second input
	if (!import("P", p1, 1))
	p1 = P;
	// Compute the blending factor
	factor = smooth(0, radius, length(P-center));
	// Now, do the blending.
	P = lerp(P, p1, factor);
}

Link to comment
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
mblend(vector center=0; float radius=1)
{
	vector	p1;
	float	factor;

	// Get the position of the second input
	if (!import("P", p1, 1))
	p1 = P;
	// Compute the blending factor
	factor = smooth(0, radius, length(P-center));
	// 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.

Link to comment
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

  • Like 1
Link to comment
Share on other sites

  • 3 weeks later...

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

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

×
×
  • Create New...