uberzev
![]() |
Source Map...
![]() Zev's Emboss (Using Offset)... ![]() Derivative Based Emboss... ![]() Please see attachment for further examples! (Note that changing the anti-aliasing settings may fix certain occurrences of this bug, but not all of them) Derivative Bug.ffxml |
|||
Posted: February 20, 2011 1:53 am | ||||
GMM
Moderator
Posts: 3491 |
Vladimir says it's by design. You can apply a tiny offset to get rid of the artifacts.
|
|||
Posted: February 21, 2011 8:04 am | ||||
uberzev
![]() |
|
|||
Posted: February 21, 2011 6:08 pm | ||||
Sphinx.
![]() |
It looks like a floating point error - the values of those B&W pixels will not change, even if you divide the result of the Derivative by some large number (the gray areas are affected, because here there the floating point values are still valid).
|
|||
Posted: February 22, 2011 1:53 am | ||||
GMM
Moderator
Posts: 3491 |
||||
Posted: February 22, 2011 8:22 am | ||||
Sphinx.
![]() |
I just tested the offset trick - it seems to get around the problem at first sight.
It does so by luck though, since it avoid "stepping on the cracks". Make it "step on the cracks" by enabling antialias and set the sample count to something high (I used 49 samples). Now the salt n pepper is back. For the programmers: Try uberzevs original filter and divide the immediate result of the Derivative with a constant (say 111). This should affect every sample going through the Divide right? Now inspect the B&W samples before and after Divide: the value remains unaffected by the division, indicating that this is infact a bug related to invalid floating point result of the Derivative component. |
|||
Posted: February 22, 2011 9:52 am | ||||
GMM
Moderator
Posts: 3491 |
Right, but the artifacts in the original filter are very bright. When you divide the HDR-white value of 111,33 by 111 it still remains HDR-white and its value rightfully changes to 1,0029. Try dividing by 1110 instead. Note that I'm not a programmer but I'd prefer to have a more vivid example to forward to the testers. |
|||
Posted: February 22, 2011 10:25 am | ||||
Sphinx.
![]() |
Hmm.. I could be wrong (I'm on another computer now) and here it seems to "behave" as expected. Either I'm wrong or the error is CPU specific. I'll let you know when I get back to the other computer.
|
|||
Posted: February 22, 2011 10:52 am | ||||
Sphinx.
![]() |
Ahemn.. division works just fine on the old computer too. No floating point errors, just a large value. I was probably tricked by a locked preview or something, sorry
![]() Anyways - the spots still appear when you increase AA samples.. |
|||
Posted: February 23, 2011 4:46 am | ||||
uberzev
![]() |
IMO this is a bug. Yes you can jack the anti-aliasing way up but that's not an elegant solution.
|
|||
Posted: February 27, 2011 12:46 am | ||||
Sphinx.
![]() |
That will not solve it - try GMMs offset version with high AA - *only* with high AA the bug is present
![]() |
|||
Posted: February 27, 2011 2:38 am | ||||
jitspoe |
Hm, I thought maybe it was because it wasn't normalized, so I used the same technique I used for generating normal maps: square, add 1, square root, divide by that. The end result was the same. I had some similar artifacts without the normalize that normalizing seemed to fix. Maybe it has something to do with the lerp? I've not used that. Without the lerp, it's impossible to tell if the issue is there because the pixels are white or black around that point already.
|
|||
Posted: March 6, 2011 3:59 pm |
Filter Forge has a thriving, vibrant, knowledgeable user community. Feel free to join us and have fun!
33,711 Registered Users
+18 new in 30 days!
153,531 Posts
+39 new in 30 days!
15,347 Topics
+72 new in year!
25 unregistered users.