This can smooth any float, float3, or Color4f attribute on
the point domain, and can use either a constant interpolation
factor or another float attribute for the interpolation factor.
Probably need to set default attribute in/out to "position".
Differential D10951
A Mesh Smooth node, as designed in T86903. Authored by Howard Trickey (howardt) on Apr 11 2021, 5:07 PM.
Details
This can smooth any float, float3, or Color4f attribute on Probably need to set default attribute in/out to "position".
Diff Detail
Event TimelineComment Actions Unfortunately the patch requires updating for current master after recent refactoring to the attribute API (rB5cf6f570c65d), so I didn't get to test it. I agree with Jacques about DefaultMixer, though I'm also not sure if it will have to be tweaked to use it here. Generally this seems quite useful, even as a nice base for the functionality on other attribute domains in the future : )
Comment Actions I made these changes and will shortly upload a new diff.
Comment Actions Works well, just some small comments and a note about other domains besides "point". I'm running into issues smoothing a vertex color. I wonder if this node needs more explicit handling for other attribute domains.
Comment Actions Hi, just an idea, but what if we combine iterations and factor into one continuous Strength slider? The end user probably only cares about the blur amount anyway, so with the factor set to 0.5 (probably the best default), integer part (+1) of the final slider would give iterations, the remainder would be like factor of the last iteration. This should nicely illustrate the idea: Possible pseudocode: strength = strength - 0.001 # so when user says 4.0, it's not calculating extra iteration with 0 weight, there are probably way better ways iter = math.floor(strength) + 1 extra = max(strength, 0) % 1 # max() because of the negative delta It would work something like this (GIF, don't know if it will play...) Another idea (admittedly a bit more crazy...) - it would be interesting to have a mode (Strength / Distance dropdown?) that sort of normalizes the blur amount to real distance units, maybe look at average neighbor edge length and divide the input distance by it. Possibly multiply by some correction factor based on the internal factor. That number would then be the blur strength per vertex (could be an issue?). Something like this I imagine: strength = correction_fac * dist_input / avg_neighbor_edge_len Of course this would be problematic for dense meshes - make default distance small or based on vert count? BTW how are you weighting the vertices? I'm just curious, I know about classic average, 1/d (or d**2 ?) and some cotangent weighting... The c/c++ is scaring me :) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||