Smoothing intersections of two VDBs?

   2601   6   2
User Avatar
Member
408 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
8619 posts
Joined: July 2007
Offline
https://forums.odforce.net/topic/17978-sdf-blending/ [forums.odforce.net]
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
408 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
7836 posts
Joined: Sept. 2011
Offline
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
8619 posts
Joined: July 2007
Offline
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
FX Supervisor
Method Studios, NY
User Avatar
Member
1747 posts
Joined: May 2006
Online
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]
User Avatar
Member
408 posts
Joined: June 2015
Offline
tamte
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

That was my point indeed, you're right, i wanted an approach... but then when the heaviest calibers on the forum jump in and post a link i have tendency to take it as the word of god So you're right, and i was indeed working with VDBs only and intended to keep it at that. So thanks a lot for the insights. But i see now that Matt posted a little gem up here, so i'm guessing SDFs could still be the way to go at it, i'll jump into his file to see what's going on there.

Cheers,

A.
Edited by Adriano - March 30, 2021 13:04:38
  • Quick Links