Create a grayscale image with the lowest pixel of grayscale input.

I must thank Vincent Gault here, his tutorial about "Shape to Height" (https://forum.allegorithmic.com/index.php?topic=7897.0) gave me the the idea on how to find and keep as a variable the lowest point of an heightmap. Thanks again.

This filter is just a tool, that allows you to find the lowest point of an heightmap, and to keep/use this information for other nodes that need it. Example : https://share.allegorithmic.com/libraries/2214 (Stack_auto).

For the highest point, you can use https://share.allegorithmic.com/libraries/2217

Very important update 25/09/16: Now the node doesn't freeze/crash your computer in highest resolutions like 8k. The heightmap is now decimated until a small size, without loosing information of the highest pixels.
Downside is that in very small resolutions (like 32x32) the method doesn't work well, and I had to put a parameter for which method you want. But, when you use this node inside your own nodes, you can automate it (see the pictures). Thanks @gudz.evgeniy for pushing me to find something better.
I tested it a lot, but if something's wrong, don't hesitate to ask.

By the way, the gain with a 2K heightmap is around 200x faster...

Uploaded: about 3 years ago
Updated: almost 3 years ago
Version: 2
File Name: Min_Value_Grayscale-250916.zip
Size: 50 KB

DownloadblackDOWNLOAD



DISCUSS
about 3 years ago

It does not work on 5.5.1. crush


about 3 years ago

Odd. I've just used in a new node tonight, it works without problem. You didn't change something in the node, you are sure that it's the node itself and not another node along it?


about 3 years ago

with this method the texture 2k + handles long (200 ms timing in the vertical mixing + 200 on the horizontal). and when such a system crash I have the node program. I myself was looking for how to find the minimum and maximum (as the alegoritmik not bother to do it), but found nothing. This disadvantage of this program, there is no programmable node


about 3 years ago

You said "as the alegoritmik not bother to do it".
I woudn't say that because in one node, but I don't remember it, there's in deed a node named "min-max" that does the trick, with another method. But I didn't understand their technic and I'm not sure that it's 100% safe.

But you're right, a hardcoded way to find a min or a max to any grayscale map would save a lot of time, because they are very useful for many nodes I make.

May I suggest you something ? Try to lower resolution. You make a 4K texture? Maybe my node is good enough to find min/max value with a resolution of 1K. It's a good idea, by the way, decrease the resolution of a image, but be sure that the highest/lowest value is here after the transformation. Thanks, I'll try to find something. ^^


almost 3 years ago

I squeezed the incoming texture to 64 pixels. it is possible to greatly reduce the timing. while the minimum deviation of the results. thx. I finally completed the mixing unit height map


almost 3 years ago

Cool. But today I think that I found a way to reduce time on my side too, and prevent crashing. Stay tuned.
And come here to discuss further: https://forum.allegorithmic.com/index.php?topic=12802 I'd like to give you the new version before sharing, for testing on your side.