How is Line Color picked? #458
-
With my setup, Line Color is derived by darkening the shadow pass of my shader, and passing it into the Line Color output. However, I've sorta run into an issue with this, which is that there is some ambiguity to Malt's choice of Line color. When a line sits on a space which is inhabited by multiple colors, it has to pick between them. And sometimes it doesn't seem to choose the right one. On this striped shirt here, it can't really decide whether it wants the lines to be grey or blackish-red. Of course, this could be prevented by me creating a dedicated line color setup, where I just manually set it, but I'm lazy 😛. How exactly does Malt decide that color? Is it based off of depth or something? As I twist the camera around, I can see that the color will shift depending upon angle. Maybe it picks the color which is further down the screen? Wondering if there could be a way to push Malt to pick a specific one over the other, to get more consistent results. To say maybe, "pick the color with the lowest value", or maybe "pick the color that is more saturated". It might not be as great as I'm thinking it would be though. The current way that it picks works well on areas with less drastic color shifts, like with the skin here. It's also much harder to catch if the lines are smaller too. With the size i usually use, it's kinda hard to notice, but it has been kinda bothering me for a bit. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Essentially, yes. The line nearest to the camera "wins". Lines are detected by checking for different types of boundaries with nearby pixels. I think your best solution here would be to make sure both materials output the same line color. It should be possible to implement some sort of line priority system, but I don't think this should be a built-in feature. |
Beta Was this translation helpful? Give feedback.
Essentially, yes. The line nearest to the camera "wins".
Lines are detected by checking for different types of boundaries with nearby pixels.
So that means if pixel A detects a line when checking against pixel B, then pixel B will also detect a line when checking against pixel A.
So unless we discard one of the 2 cases, we end up with 2 contiguous parallel lines everywhere, which more often than not causes unintended results.
I think your best solution here would be to make sure both materials output the same line color.
Using vertex colors or a texture should do the trick.
It should be possible to implement…