Hhow can I invert a SDF ..?

   8454   8   2
User Avatar
Member
414 posts
Joined: Aug. 2015
Offline
Hi guys ,
I assigned an “IsoOffset” to a sphere and set the output type to SDF. There is an option to invert the sign on the construction tab.
When I turn this option ON, the result is same and nothing is changed !
So, how could I invert the SDF ?

Any info would be highly appreciated!
Masoud Saadatmand (MSDVFX)
User Avatar
Member
459 posts
Joined: Oct. 2011
Offline
Hi
On the Iso offsets “Construction” tab there is an “Invert Sign” checkbox.

-b

Masoud
There is an option to invert the sign on the construction tab.
When I turn this option ON, the result is same and nothing is changed !
I need new glasses Sorry about that.
Edited by bonsak - April 11, 2017 09:52:53
http://www.racecar.no [www.racecar.no]
User Avatar
Member
2623 posts
Joined: June 2008
Offline
Confirmed, isooffset, another broken node in Houdini 16. The isooffset Invert Sign check box offers no visual indication that it is working.

You can drop down a FluidSource and generate a SDF from that. The invert works on that node.
Edited by Enivob - April 11, 2017 17:31:58

Attachments:
invert_SDF.gif (145.2 KB)

Using Houdini Indie 20.0
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
User Avatar
Member
8768 posts
Joined: July 2007
Offline
to invert SDF just multiply it by -1

for both classic volume or VDB you can do that in in VolumeMix, VolumeVOP, Volume Wrangle

for classic volumes you can additionally use VolumeSDF node
for VDBs you can additionally use VDB Combine
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
2 posts
Joined: May 2017
Offline
tamte
to invert SDF just multiply it by -1

for both classic volume or VDB you can do that in in VolumeMix, VolumeVOP, Volume Wrangle

for classic volumes you can additionally use VolumeSDF node
for VDBs you can additionally use VDB Combine

Hi

I am still stuck with this issue of inverting. I did multiply UNIFORM SAMPLING DIVS by -1. But SDF is not visible in viewport. This is the only attribute, I have to select for multiply?? Please Tell me

Thanks
Ashish
User Avatar
Member
1743 posts
Joined: March 2012
Offline
Hi Ashish,

Keep the Uniform Sampling Divs unchanged. tamte meant that in a separate node, after creating the SDF, you can multiply the value of each voxel by -1. You can do that with a Volume Mix node by setting Post-Mult to -1, or you can do that with a Volume Wrangle node by doing @density *= -1;(or if you have a nameattribute, use the name of the volume, instead of density).

Hopefully that's what you were looking for.
Writing code for fun and profit since... 2005? Wow, I'm getting old.
https://www.youtube.com/channel/UC_HFmdvpe9U2G3OMNViKMEQ [www.youtube.com]
User Avatar
Member
2 posts
Joined: May 2017
Offline
Hi ndickson,
Thanks alot for your inputs but again its not visible at all in viewport by using mentioned techniques. It might be working but not visible. Any more inputs ??
User Avatar
Member
1743 posts
Joined: March 2012
Offline
ashishjasuja935
Hi ndickson,
Thanks alot for your inputs but again its not visible at all in viewport by using mentioned techniques. It might be working but not visible. Any more inputs ??
If you invert an SDF, the result should look exactly the same, since it's representing the same surface, just with an opposite implied normal direction. The Invert Sign option on IsoOffset is working. @density *= -1;in a Volume Wrangle is also working. You can check this using the volumeminvalue and volumemaxvalue intrinsics in the primitives tab of the Geometry Spreadsheet.

That said, since there's now a blue tint in the viewport on backface polygons by default, maybe the same sort of blue tint should be applied to backface SDF surfaces.
Writing code for fun and profit since... 2005? Wow, I'm getting old.
https://www.youtube.com/channel/UC_HFmdvpe9U2G3OMNViKMEQ [www.youtube.com]
User Avatar
Member
1743 posts
Joined: March 2012
Offline
A caveat: I just checked with Convert, and it looks like Convert produces polygons that have opposite winding from the original, unless Invert Sign is on or the SDF has been otherwise inverted. Using VDB from Polygons and Convert VDB gives self-consistent results, though to invert it with the Volume Wrangle snippet above, you'll need to turn on Bind Each Volume to Density.
Writing code for fun and profit since... 2005? Wow, I'm getting old.
https://www.youtube.com/channel/UC_HFmdvpe9U2G3OMNViKMEQ [www.youtube.com]
  • Quick Links