Community
Arnold General Rendering Forum
abbrechen
Suchergebnisse werden angezeigt für 
Anzeigen  nur  | Stattdessen suchen nach 
Meintest du: 

Texture Planar Projection creates moiré effect - no UV derivatives?

6 ANTWORTEN 6
GELÖST
Antworten
Nachricht 1 von 7
arnoldT4FLB
898 Aufrufe, 6 Antworten

Texture Planar Projection creates moiré effect - no UV derivatives?

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?

UVprojectionMoireEffect.png

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.

6 ANTWORTEN 6
Nachricht 2 von 7
maxtarpini
als Antwort auf: arnoldT4FLB

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.

Nachricht 3 von 7
arnoldT4FLB
als Antwort auf: maxtarpini

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.

Nachricht 4 von 7
maxtarpini
als Antwort auf: arnoldT4FLB

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.

 

Nachricht 5 von 7
lee_griggs
als Antwort auf: arnoldT4FLB

>Are they avoidable?

Increasing the filter_width can also help with moire patterns.

Lee Griggs
Arnold rendering specialist
AUTODESK
Nachricht 6 von 7
maxtarpini
als Antwort auf: lee_griggs

Exactly. That's global filtering. But we can also increase the Filter Strenght on the checkboard shader and have the same results locally especially using a box filter and just because making a checkboard pattern filterable correspond to a box filter because all the sample point in the kernel have the same weight (being a step or (im)pulse frequency). Both however will tend to blur also checkers that don't need more filtering as they are already well anti-aliased.
Nachricht 7 von 7
arnoldT4FLB
als Antwort auf: arnoldT4FLB

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.UVprojectionMoireEffect_2.png

Sie finden nicht, was Sie suchen? Fragen Sie die Community oder teilen Sie Ihr Wissen mit anderen.

In Foren veröffentlichen  

Autodesk Design & Make Report