fuse SOP distance
6590 7 2- circusmonkey
- Member
- 2624 posts
- Joined: Aug. 2006
- Offline
- asnowcappedromance
- Member
- 512 posts
- Joined: July 2009
- Offline
- johm
- Staff
- 138 posts
- Joined: Dec. 2010
- Offline
interesting. probably a bug.
An approach you might consider is to use a ForEach Sop to iteratively fuse points with a gradually increasing threshold distance.
In the attached file, the distance parameter expression in the foreach sop is set to fuse up to a maximum of 1 unit:
clamp(…) * 1
if you want the threshold to be 1.5 as you originally stated, change the *1 to *1.5
An approach you might consider is to use a ForEach Sop to iteratively fuse points with a gradually increasing threshold distance.
In the attached file, the distance parameter expression in the foreach sop is set to fuse up to a maximum of 1 unit:
clamp(…) * 1
if you want the threshold to be 1.5 as you originally stated, change the *1 to *1.5
- neil_math_comp
- Member
- 1743 posts
- Joined: March 2012
- Offline
It's because the fuse SOP uses the L1-norm distance (a.k.a. Manhattan distance) [en.wikipedia.org] instead of the usual L2-norm distance (a.k.a. Euclidean distance). The L1-norm is the sum of the absolute differences in x, y, and z; the L2-norm is the square root of the sum of the square differences in x, y, and z, so the L1 distance can be up to 73.2% longer than the L2 distance.
I don't know why it does this, but it does, and someone suggested that it shouldn't be an issue in any realistic case. I'm less certain of that, if only because it's so counterintuitive and uncommon in 3D graphics to use the L1-norm. It means that if you rotate a model, you can get completely different fusing behaviour because the L1-norm isn't rotation invariant.
I don't know why it does this, but it does, and someone suggested that it shouldn't be an issue in any realistic case. I'm less certain of that, if only because it's so counterintuitive and uncommon in 3D graphics to use the L1-norm. It means that if you rotate a model, you can get completely different fusing behaviour because the L1-norm isn't rotation invariant.
Writing code for fun and profit since... 2005? Wow, I'm getting old.
https://www.youtube.com/channel/UC_HFmdvpe9U2G3OMNViKMEQ [www.youtube.com]
https://www.youtube.com/channel/UC_HFmdvpe9U2G3OMNViKMEQ [www.youtube.com]
- Andrew Graham
- Member
- 151 posts
- Joined: Feb. 2009
- Offline
im guessing that its much cheaper to use the manhattan distance to calculate if points should be fused…
to get the distance between two points requires calculation of length of a vector, meaning a root or trig will be in the calculation as opposed to straight subraction/addition of the vector components. doing that to a large number of points would mean a big difference in performance.
to get the distance between two points requires calculation of length of a vector, meaning a root or trig will be in the calculation as opposed to straight subraction/addition of the vector components. doing that to a large number of points would mean a big difference in performance.
https://openfirehawk.com/ [openfirehawk.com]
Support Open Firehawk - An open source cloud rendering project for Houdini on Patreon.
This project's goal is to provide an open source framework for cloud computing for heavy FX based workflows and allows end users to pay the lowest possible price for cloud resources.
Support Open Firehawk - An open source cloud rendering project for Houdini on Patreon.
This project's goal is to provide an open source framework for cloud computing for heavy FX based workflows and allows end users to pay the lowest possible price for cloud resources.
- kuba
- Member
- 345 posts
- Joined:
- Offline
- circusmonkey
- Member
- 2624 posts
- Joined: Aug. 2006
- Offline
So what solutions to we have. The task would be loop through all the points fins the ones that are with a radius and then fuse so none intersect. I have hacked together this using a PC open and the PC furthest. The points that need fusing are green.
I would love to be able to control this per X Y Z . So you could pick all points within X radius to be fused and then set a different value for Z .
Rob
I would love to be able to control this per X Y Z . So you could pick all points within X radius to be fused and then set a different value for Z .
Rob
Gone fishing
- neil_math_comp
- Member
- 1743 posts
- Joined: March 2012
- Offline
kubaA quick experiment with rotating a cube suggests that the Fuse SOP does something similar to the Facet SOP with Consolidate Points Fast. I'm not sure what Consolidate Points Slow does differently, but it seems to also use something like an L1-norm, just with different results sometimes.
I wonder if the same thing happens in facetSOP?…
Writing code for fun and profit since... 2005? Wow, I'm getting old.
https://www.youtube.com/channel/UC_HFmdvpe9U2G3OMNViKMEQ [www.youtube.com]
https://www.youtube.com/channel/UC_HFmdvpe9U2G3OMNViKMEQ [www.youtube.com]
-
- Quick Links