Hello my dear shader wizzards,
I noticed that textures using the aiUvProjection and Planar Projection have sampling artifacts. Are they avoidable? And why can't I manipulate the UV further after the planar projection?
The Uvtransfrom and Triplanar projection methods don't seem to have that problem. I attached a maya example scene with the aiCheckerboard as input to show the moire effect. by changing the index in the switch node you can see that 0, 1 and 2 don't have moiré, but 3 and 4 do.
I suspect that it has something to do with missing UV derivatives, since that was a problem I had when I tried to modifiy the UV coordinates instead of passing it through a UvTransform node.
https://forums.autodesk.com/t5/arnold-for-maya-forum/aiimage-node-noisy-texture-filtering-in-distanc...
In case you wonder why I don't just use triplanar - it has problems of it's own.
Gelöst! Gehe zur Lösung
Gelöst von maxtarpini. Gehe zur Lösung
Checkboard texture is filtered analytically so do not extend your reasoning to 'textures' in general (that have no local filtering and that effectively work the same beyond proj methods or shaders involved, another exception would be a 2d map). Now because local filtering here involves a division based on UV derivs on 3 and 4 with raw code I see I have some NANs meaning bogus derivatives and division by zero... and how to fix those ? Go for the unfiltered version or overwrite UVderivs with fixed values or try to compute them on-the-fly.. that's why you still see local filtering (try to increase Filter Strenght on the checkboard params) but with a worst aliasing. It might be some numerical precision error or some naive stuff done in planar or uv proj nodes.
Thank you for the reply.
If I understand you correctly it is broken and would need manual correction.
I don't know what local filtering exactly means. I know the aiStateFloat node has dudx, dudy, dvdx, dvdy as option to output in the hpygershade graph, but I don't know how to work with derivatives to correctly manipulate mipmaps or filtering.
Thx and Have a nice day.
Local filtering means that it's the checkboard pattern code doing filtering so that the pattern is anti-aliased without the need for global filtering (the one in the global arnold settings.. box,tri,gaussian etc.) and super sampling (global multiple samples per pixel).
Then filtering here means determining how much area ie. how much pattern (space), is compressed into a pixel. Because in a renderer we evaluate pixel by pixel we cannot just determine the area like we would do for example with a fixed 2d image so we have to resort to differential areas.. ie. check uv coords of the pattern in the current pixel and subract that from the uv coords of neighbor pixels. This is done by the renderer thansk to ray differentials and is available with dudx, dudy, dvdx, dvdy.
Now the size of the area covered by the pixel together with the sample weights in the area is called a kernel and to have it normalized we need to divide it by the size of the area which is here our differentials dudx etc. so if they ain't there we get a NAN because of a division by zero that degrades the anti-aliasing resulting in artifacts.
>Are they avoidable?
Increasing the filter_width can also help with moire patterns.
Thanks for the replies,
I used the CheckerBoard node just as an easy example. I can fix it good enough with the area value from the StateFloat node, but Textures can't be fixed that way, because the Mipmap Bias input of aiImage nodes ignore connected input.
Sie finden nicht, was Sie suchen? Fragen Sie die Community oder teilen Sie Ihr Wissen mit anderen.