Author Topic: [python api] How to recreate a node similar to distance node  (Read 242 times)

 I have already know how to create hundreds nodes by code and studied the distance transform  in image process area.

But I still can't recreate something similar to the 'distance node'.

It needs to loop multi times over each pixel.

Is there anywhere to achieve my goal substance designer in this version?

My final target is to create a node similar to 'distance node' ,but it will expand by the luminance of a pixel . It means the bright pixel will expand further ,vise versa.


Bradford Smith had made a node called erode/expand which meets my need to some extent . But I can't find out how he did this .    Could anybody explain a little for me , thank you .
https://share.allegorithmic.com/libraries/426
Last Edit: May 06, 2019, 08:53:04 am

I have already know how to create hundreds nodes by code and studied the distance transform  in image process area.

But I still can't recreate something similar to the 'distance node'.

It needs to loop multi times over each pixel.

Is there anywhere to achieve my goal substance designer in this version?

My final target is to create a node similar to 'distance node' ,but it will expand by the luminance of a pixel . It means the bright pixel will expand further ,vise versa.


Bradford Smith had made a node called erode/expand which meets my need to some extent . But I can't find out how he did this .    Could anybody explain a little for me , thank you .
https://share.allegorithmic.com/libraries/426
Thanks for the post. Helped me to be more motivated now that i see you trying your best.

Regards,
Shane

I have already know how to create hundreds nodes by code and studied the distance transform  in image process area.

But I still can't recreate something similar to the 'distance node'.

It needs to loop multi times over each pixel.

Is there anywhere to achieve my goal substance designer in this version?

My final target is to create a node similar to 'distance node' ,but it will expand by the luminance of a pixel . It means the bright pixel will expand further ,vise versa.


Bradford Smith had made a node called erode/expand which meets my need to some extent . But I can't find out how he did this .    Could anybody explain a little for me , thank you .
https://share.allegorithmic.com/libraries/426

Heey,
I did not check out Brad’s node, but I made something similar ones. The trick is to use max and min blending. Use a few pixelprocessors and offset the image with one pixel. Blend the previous and new image with max. (Dilate) use an invert node before the processing to get erode. You can also do this with a fx node.
Best regards! Tom

I have already know how to create hundreds nodes by code and studied the distance transform  in image process area.

But I still can't recreate something similar to the 'distance node'.

It needs to loop multi times over each pixel.

Is there anywhere to achieve my goal substance designer in this version?

My final target is to create a node similar to 'distance node' ,but it will expand by the luminance of a pixel . It means the bright pixel will expand further ,vise versa.


Bradford Smith had made a node called erode/expand which meets my need to some extent . But I can't find out how he did this .    Could anybody explain a little for me , thank you .
https://share.allegorithmic.com/libraries/426

Heey,
I did not check out Brad’s node, but I made something similar ones. The trick is to use max and min blending. Use a few pixelprocessors and offset the image with one pixel. Blend the previous and new image with max. (Dilate) use an invert node before the processing to get erode. You can also do this with a fx node.
Best regards! Tom

I know this.  But If you want to expand 256 pixels ,you need to do this thing 256 times !