Surface position edge artifacts / What's your workflow?

Started by dzigakaiser, August 11, 2020, 09:41:07 AM

Previous topic - Next topic

dzigakaiser

Hello there!

I am having a little trouble getting a proper surface position pass without edge issues where the terrain is in front of the sky/clouds.

I attached close up crops from a render with population
rgb.JPG
the surface position
surface_pos_ramp.JPG
and cloud position pass
cloud_pos_ramp.JPG

As you can see, as soon as the terrain overlaps with the sky and not terrain, the edges go a little crazy.

The renders are 32bit exrs but I am guessing, the issue is that the position values for the sky are infinite and this prevents the edges from being properly calculated or interpolated(?)

The surface depth works better for a Z mask here but I'd like to use surface position for additional Y masking. 
surface_depth.JPG

Is it maybe because the depth pass starts at 0 in the back and slowly increases it's value while the position jumps from a xyz value to a non float value (rgb = inf inf inf) that the edges work so much better there? I would be curious if it would actually remove the artifacts if the sky would get a proper value instead (say 100K for example).

Does anyone have a tip or information on how to handle those scenarios? 

Any help is greatly appreciated!

Thanks in advance
Dziga

KyL

You can try making the background sphere smaller so you don't have such high values in the background, it might help.

dzigakaiser

#2
Ha! Sometimes, the solution is just too simple to see. Completely forgot about the background sphere to be honest haha

That was mainly it. Setting it to 500k made the result much better, at 80k and 30k the result was the same and it started to affect the lighting, of course.

It still isn't just as precise as the depth pass around the edges but it matches the detail level of the rest of the position pass.
surface_pos_ramp_bgsphere500k.JPG

Thank you!

KyL

Nice. I think that the z Depth is Anti-Aliased whereas the Position is not.

What you could do is create another renderer and turn off all shadow and lighting so it renders super quick and output all your data Render Elements at double resolution.

dzigakaiser

Quote from: KyL on August 11, 2020, 04:21:14 PMNice. I think that the z Depth is Anti-Aliased whereas the Position is not.

What you could do is create another renderer and turn off all shadow and lighting so it renders super quick and output all your data Render Elements at double resolution.
I actually just rerendered in double res with a slight AA increase to get rid of some more noise.

The position pass is again a tiny bit better. For this shot it is sufficient anyways as those hills are pretty far in the BG and it is a DMP so I can just paint over the last issues ^.^

But this is it then with the AA. It's time for me to relearn again why some passes are not filtered while others are.

It's definitely a good idea to incorporate a utility renderer workflow. I often do this in Houdini as well to get some passes out fast. Thanks again!