Pixel gaps in rendering

Started by sboerner, March 22, 2024, 07:48:09 PM

Previous topic - Next topic

sboerner

Oh, and by the way. Changing the filter to Cubic B-Spline seems to have fixed the artifact issue. I did 3-4 renderings with no changes to any other settings, and they all look good.

One artifact did appear after I specified a custom value for the subdivision cache. But the documentation clearly warns that reserving too much memory for the cache can cause rendering issues. I'll back off on that to see if it fixes it. There is a lot of shallow water in the scene, so increasing the cache can make a big difference in rendering times.

Dune

Never would have though a filter could have 'caused' it, or at least could heal it.

pokoy

I've almost always had similar problems with sun producing pixel artifacts similar to these, and the only solution was to switch to a non-sharpening filter. 
My guess is that the places where the artifacts appear are super bright pixels produced by reflections of the sun and either the filter or the soft clip effect isn't error-free when it comes to HDR values.

sboerner

I can understand why a filter or some other post process might product artifacts. Apparently, that is what is happening here. At least changing the filter has fixed it for now.

I also got similar artifacts when I tried to override the subdivision cache. (Just missing, black pixels, no strange patterns.) I've disabled the override and they too seem to have gone away.

One puzzling thing about the artifacts is that they always appeared in different locations. Sometimes there was just one, other times two, three or four. So they seem independent of any geometry or surface in the scene. The only constant is that they always showed up in the first 25 percent or so of the rendering.

Memory issue? My machine has 64GB of RAM, and it passed the Windows memory test I did when this all started. And the fact that they occurred on two machines tells me the problem isn't related to hardware.



Dune

Do they also appear in say sky, or barren TG ground? It would be interesting (but work) to disable stuff per pop/object, and see if there's still anything inside them that causes the filter to do something.

sboerner

That's a good idea. The artifacts did not appear until the foliage was added to the scene. There are many populations, but I've done similar scenes before, some that had much larger populations. So maybe it has something to do with a particular one.

I usually do overnight renderings anyway, so it's easy to test. I'll start by resetting the filter to Mitchel-Netravali to see if the artifacts reappear. If they do I'll start disabling the pops one at a time.

To answer your first question, they usually appear over foliage, but they've also shown up on the water surface.

Dune

Mmmm, interesting to see if something turns up.

pokoy

Let me guess, the foliage where they appear is reflective? Hence my suggestion that these are bright pixels produced by reflections of the sun disk. That's why they appear randomly wherever the foliage is (same with the water surface, it's reflecting the sun). I'm pretty sure that if you make the foliage material non-reflective the artifacts will not appear.

I guess another way to test this would be to increase AA sampling, it might help to 'tame' the pixel values and not triggering whatever the filter is going crazy with when too high luminosity values occur.

Ultimately, it's a long standing issue (my report of this problem is probably 10 years old) and probably best for TG devs chime in and come up with a fix, too.

pokoy

#23
Attached a quick test I did in PS, showing how using a sharpening filter will introduce ringing with negative values in 32bpc mode. The final 'pattern' will depend on the input pixels' values and position/arrangement plus the filter's strategy.

HDR_Artifacts_Sharperning_Filter.jpg

The best solution would be to move any sharpening operation to the post-processing stage where it works on the tone mapped image... and probably switching to a less aggressive filter as the default filter to avoid users running into this problem as long as it's not fixed (which is probably never).

sboerner

An update: The machine has been rending constantly for the past three days. It only takes an hour or two for the artifacts to show up, so when they did I killed the rendering, made changes, and tried again.

You may notice that I'm going to be hedging almost all my statements here: probably, likely, seems like, etc. It's all been a game of probabilities; I feel like I've been chasing shadows try to pin this down.

First, I was able to narrow down the problem to a single population. (I think.) It was a low-poly wildflower population that I copied from an old scene. On closer inspection in Blender the model itself turned out to be fine. The roughness was a little low but hardly what I would call reflective. Normals all good, etc. Removing it from the scene eliminated the artifacts for several renderings in a row. I exported it again from SpeedTree, raised the roughness to 0.8, and put it back in the scene. The artifacts returned, but fewer and not every time.

Using Cubic B-Spline, as noted before, seems to help. It's rendering now with Narrow Cubic and so far, so good. I'll try other filters to see what happens.

Turning off Anti-aliasing bloom also seems to help. I did that with the filter set to Mitchell-Netravali and it rendered fine. But I only ran it once.

I don't think it's a memory issue. I've checked with Task Manager mid-render, and there's plenty of RAM available.

I'll send a note to Planetside to see if they've every seen this before. But if changing the filter fixes it, I'm happy. Time to move on.



Dune

What pokoy writes seems very plausible. Strange that I never had this occur, and I've been rendering an awful lot since 2009. Mostly Narrow-Cubic, btw. never 16/32bit or exr anyway or tiffs for veggies, never deviated much from defaults anyway. Almost exclusively detail 0.5 and AA6, only changing pixel threshold for clouds. Just my 2 cents.

There's always PS to clone out some small dots, luckily, but for animations you wouldn't want that.

sboerner

#26
Yes, I did mean to mention that Pokoy's Photoshop test seems pretty conclusive. (Thanks for that.) Enough to convince me to stop using sharpening filters during rendering.

I am puzzled that no one else seems to have run across this. Over the years I've seen it maybe 3-4 times, and always assumed it was just a hiccup during rendering, easily fixed by re-rendering a small patch to cover it up. It must take the right combination of surface material, sun angle, filter, etc.

It would be a nightmare for animation, for sure. But simple enough to avoid.

Edit: The Narrow Cubic test turned out fine, btw. I'm making this my default filter from now on. If by chance the artifacts still turn up, I'll post something here.

sboerner

Update.

I removed the population that I thought was causing the issue and left the filter set to Narrow Cubic. Everything worked fine for several days and then, bingo, another artifact. But this time I had enabled all of the render passes. I was curious to see which ones any artifacts would appear on. Answer is attached.

The main file (beauty pass) is saved out as a 16-bit tiff. Passes are all 32-bit exr. The artifact is a box with a tiny dot in the center. It appears in the beauty pass and tgRgb passes. It does not appear in the tgSurfRgb pass. Then, strangely, only the tiny dot in the center appears in the tgSurfIndirect, tgSurfIndirectDiff, and tgSurfIndirectDiffRefl passes. All other passes are clean. What this all means is beyond me, but there it is.

I've set the filter to Cubic BSpline (even though I prefer Narrow Cubic) and will use that until another artifact pops up.



pokoy

Quote from: sboerner on April 11, 2024, 10:02:11 AMUpdate.

I removed the population that I thought was causing the issue and left the filter set to Narrow Cubic. Everything worked fine for several days and then, bingo, another artifact. But this time I had enabled all of the render passes. I was curious to see which ones any artifacts would appear on. Answer is attached.

The main file (beauty pass) is saved out as a 16-bit tiff. Passes are all 32-bit exr. The artifact is a box with a tiny dot in the center. It appears in the beauty pass and tgRgb passes. It does not appear in the tgSurfRgb pass. Then, strangely, only the tiny dot in the center appears in the tgSurfIndirect, tgSurfIndirectDiff, and tgSurfIndirectDiffRefl passes. All other passes are clean. What this all means is beyond me, but there it is.

I've set the filter to Cubic BSpline (even though I prefer Narrow Cubic) and will use that until another artifact pops up.



Interesting, it's probably the GI/indirect element, not reflection as I suggested. Whether it's a NaN that's not handled well by the filter or something else, at this stage only TG support can help out.