sharpening attribute values (opposite of AttrBlur)

   2157   5   2
User Avatar
Member
45 posts
Joined: April 2016
Offline
I remeshed a piece of geometry and a float attribute, we will call @island, interpolated (blurred) so the values are soft between the pieces.

I would like the values to have a hard values matching the bulk of the nearby island. I've looked for a node to do this but ended up doing it in a for loop. I can't help but think there is a better way to do this.

Before:

After:


the for-loop just uses a GroupExpand to match @island with the iteration value to expand and then set the float value of that expanded group. but to get it to accumulate you have to set the for-loop to Merge Each Iteration so the point count goes up by the number of islands. so in this case it is 10x point count. then you have to use an attr transfer to get the proper values.

I know there is an elegant way of doing this. Any help would be appreciated.

Attachments:
blurred_values.jpg (432.9 KB)
crisp_values.jpg (445.5 KB)
sharpening_nodes.jpg (131.6 KB)

User Avatar
Member
2 posts
Joined: March 2020
Offline
Hi, geordiemartinez.

You could just use Attribute Transfer to copy your original @island attribute to your remeshed geometry.

If you set ‘Max Sample Count’ to 1, it does not interpolate the attribute and you get a sharp transition.

Or am I missing something?
User Avatar
Member
4500 posts
Joined: Feb. 2012
Offline
Hi,

If you are looking to implement sharpening using the unsharp mask technique, you can do it by subtracting a blurred version from the original version:

newvalue = originalvalue + ( originalvalue - blurredvalue ) * amount;
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | animatrix2k7.gumroad.com
User Avatar
Member
45 posts
Joined: April 2016
Offline
That's not what I'm trying to do.

what I want is for the float value that is on the original mesh to not be interpolated when transferred to the remeshed mesh. I think I may want to convert the attribute to a string for the remesh then convert back to a float so it doesn't interpolate.
User Avatar
Member
7747 posts
Joined: Sept. 2011
Offline
geordiemartinez
That's not what I'm trying to do.

what I want is for the float value that is on the original mesh to not be interpolated when transferred to the remeshed mesh. I think I may want to convert the attribute to a string for the remesh then convert back to a float so it doesn't interpolate.

does converting to INT work?
User Avatar
Member
45 posts
Joined: April 2016
Offline
@Michael_Hu.
Yes! This is what I was looking for.
I was trying to use an AttributeCopy and and it wasn't giving me desired results.

Thank you.
  • Quick Links