Author Topic: Flood Fill produces jagged edges  (Read 1482 times)

Hi there!

I am working on a simple graph as a basis to create some tiles. When I "Flood Fill -> Flood Fill to Gradient" my "Tile Sampler" output, it produces jagged aliased adges. These jagged edges then get propagated to any other otputs where I would like to use the gradients. They become obvious in my normalmap, which is kind of an unwanted effect and giving bad quality as a source to build upon.

No matter what I do, I can't seem to get rid of those jagged edges when using Flood Fill. Is there anything that one has to do or keep in mind to get a smooth edged Flood Fill? I could not find any infos on this when googling.

I attached 2 pics showing what the Flood Fill generates out of the clean edged Tile Sampler output.

And here's the link to the graph:

https://www.dropbox.com/s/bhrk6pg9qmwclgp/tilable_floor_Bricks_YellowWhite.sbs?dl=0

Hi,

the shape you use for your pattern has a sharp outline so when adding rotation, you get aliasing.
You have two solutions for this :
- you change the input for a shape node in which you recreate your rectangle and then you blur it using a blur HQ at a very low intensity
- you use a blur HQ after your tile sampler and then a histogram scan to get back a sharper outline

I downloaded your graph and added some tips to it, I will send you the file by private message.

Thanks !
QA Analyst

Hi again,

I meanwhile got some helpful advice from Celine. However, the initial problem did not solve for me following the suggestions.
Neither blurring beforehand or afterwards work to smooth out the jagged edges, without introducing some  too large bevel. I can not get clean tile shapes in my flood fill from a tile sampler, no matter how hard I try. The only solution is not using random rotation, which make the tiles feel robotic.

Even the slightes random rotation causes harsh jagged edges in the flood fill. As I use the flood fill outputs in several masks, those get propagated to my normalmap, which therefore always looks ugly.

It's an issue that costs me days already trying to solve and I just want to proceed working on my textures. I would appreciate any help or clarification. How could I approach this. I don't want perfect edges, but at least not obvious stair stepping ones. Is the amount of tiles I use too high maybe? I tested with larger tiles, but it remains the same problem. Is my interstice too low? How woudl I go abou creating very tight interstice then?

Am I maybe overthinking this? Should I not wory about and wait for the edge damage and all to be applied. That feels odd though, because I think a solid base would be needed before that.

I have attached a few pics and also heres the graph:

https://www.dropbox.com/s/1cj9q5gxx676ygq/TrimSheet_1_Section_2.sbs?dl=0

Greetings
Har
Last Edit: August 24, 2020, 08:48:38 pm

Somehow I can't attach the 2 other pics in the last massage, so doing it here

Ok, as it is often the case, shortly after posting and after watching a tutorial of Josh Lynch, I kinda managed to get it working. It looks like this now which is already way more pleasing. It's kind of the same Celine suggested.

I wonder though, does this kind of setup is always needed to alleviate the jagged edges produced by subtle rotation within the tile sampler that is feeding a flood fill? And futhermore, does this mean that somehow sharper, more accentuated edges are not possible this way? There is quite some rounding introduced though the blurring.

It's not really the result I wanted, but I call this a progress.

Here's the updated graph:
https://www.dropbox.com/s/1cj9q5gxx676ygq/TrimSheet_1_Section_2.sbs?dl=0

*Update:* Ok , I finally managed to get more of what I want by removing the blur from the tile sampler output and just leaving in the blurs, gradients and scans after the flood fill nodes. So in conclusion, somehow the flood fill node is causing all the jagged edges problems for me, if I am not blurring them down, they produce extreme stepping in the edges. It really took me some time to fiddle it out.
Last Edit: August 24, 2020, 10:57:04 pm