does anyone have any ideas on how to fill an area surrounded by a closed line in a texture?
For example, imagine an all-white texture with a black line in it, like a circle. Suppose we want to ‘detect’ that circle, and fill the white area inside of the circle with another color. Ideally this should work automatically, but picking 1 pixel inside the area and starting to fill from there until a ‘very different color’ is found, would be great already.
Maybe the solution could be pixel-shader based (it doesn’t need to be efficient, because it should only be done once), but maybe there is another way.
Maybe even someone has already done something similar, and I just couldn’t find it on the forums? Don’t want to reinvent the wheel…
basically sounds like a flood fill. something like this should be rather easy to port if only we had nice texture input into dynamic nodes. it really depends on the performance one needs, but doing this in a pixelshader may be more complicated than it sounds at first…
a 3D version now please… I ve been tinkering about this for quite some time and I always have to switch to Blender s particle systems.
How to fill a mesh with a given number of equally distributed particles?