Smoothing intersections of two VDBs?

   4381   5   2
User Avatar
Member
411 posts
Joined: June 2015
Offline
like the title says, gents, how would i go about smoothing the intersection / connection of two different VDBs. I don't want to lose the details on my VDBs, but i'd like them to merge / connect in smooth fashion that i deally i could control.

THanks for pointing the way,

Cheers,

A.
Edited by Adriano - March 29, 2021 22:18:06
User Avatar
Member
9370 posts
Joined: July 2007
Online
https://forums.odforce.net/topic/17978-sdf-blending/ [forums.odforce.net]
Tomas Slancik
CG Supervisor
Framestore, NY
User Avatar
Member
411 posts
Joined: June 2015
Offline
Thank you Tomas, Nice little set up that seems to work fine for small objects. However i'm working with rather detailed volumes that i'm converting back to polys once merged and with my scene this method is extremely slow. Is tthere any chance there would be a more recent approach perhaps? I see this post is from 2013, 8 years ago, is it still the best appraoch for the topic?

Thanks again,

A.
Edited by Adriano - March 30, 2021 00:10:53
User Avatar
Member
8177 posts
Joined: Sept. 2011
Online
There's a few other techniques for smoothly blending level sets, but all will have similar cost as they require active grids with valid metric covering the entire blend area, so the band of the sdf has to be considerably wider than when not smoothly blending.

Here's some more functions that may work to some degree with grids, but were mostly written with implicit sdfs in mind:

https://iquilezles.org/www/articles/smin/smin.htm [iquilezles.org]

Expensive stuff is expensive. You could attempt to optimize by extracting the intersection band of the shapes and only performing the smooth there, and then union with the full shapes.
User Avatar
Member
9370 posts
Joined: July 2007
Online
Adriano
Is tthere any chance there would be a more recent approach perhaps? I see this post is from 2013, 8 years ago, is it still the best appraoch for the topic?
it was more of a pointer as I figured you are more after the approach, rather that exact setup
obviously you can adapt according to your needs as nowadays you'd work with VDB directly which already optimises in narrow band and as jsmack mentioned there may be further optimisations to be taken as this needs to be applied only in the area around intersections
Tomas Slancik
CG Supervisor
Framestore, NY
User Avatar
Member
1850 posts
Joined: May 2006
Offline
Was curious to try IQ's equations with vdb's and volume wrangles, here's a quick go. No idea if its performant or not, but works in this little test.

Attachments:
sdf_smooth_union.hip (257.7 KB)

http://www.tokeru.com/cgwiki [www.tokeru.com]
https://www.patreon.com/mattestela [www.patreon.com]
  • Quick Links