Twinkling edges around gameobject mesh.[solved]

Question moved here: Twinkling edges around gameobject mesh.[solved]

Hi,

Big fan of Cinemachine, working on my first animation.

There’s a flickering around the edges of gameobjects and I am looking for a solution to reduce it.
The animation is using Post Processing with Virtual Cameras.

3330992--259630--SpaceCam.gif

What I’ve tried so far:
Change/reduce clipping distance.
Different settings of Antialiasing, Ambient Occlusion and other post processing filters.
The objects are all near the origin (less than 2000 units)

Could it be a performance issue? (Laptop with GeForce 740 GPU)

Any ideas I can try would be appreciated. Thanks!

Hi @K0n0

This certainly isn’t a Cinemachine problem, it’s a rendering issue. That said, rendering is dear to my heart and I know exactly what this is so let’s answer here.

It’s almost certainly an antialiasing situation. This is looks to be a great torture test for it as that trestle geo is hovering around just under a single pixel width and the object is rotating which will cause a lot of ‘dot crawl’ on the object.

You’ve basically created a perfect worst-case scenario for antialiasing. Here are your options:

If you’re using the Fast Approximate Anti-aliasing, then crank it up to Extreme Quality
3341160--260850--upload_2018-1-3_14-8-17.png

Or try the Temporal Anti-aliasing
3341160--260851--upload_2018-1-3_14-9-10.png

The higher the quality, the higher the cost. Not sure if you’re rendering out movies or making a game, so try those out.

Last option, if you’re making videos, render out at 4K then downsample to 1080 in your fav movie editing program. That helps a lot and is a trick we often use to get things looking smooth.

Basically what’s happening is that the renderer wants to draw pixels which are around 1 pixel in screen size and as the objects move, the pixels flicker on and off trying to represent the geometry.

If you really want to geek out, this is what’s happening: Nyquist frequency - Wikipedia

1 Like

Hi Adam,

Thanks a lot!

I changed the suggested settings but it didn’t help. However, your idea of recording at 4k followed by a downsample did make a difference:

Recorded at 1920 x 1080:
3330992--259630--SpaceCam.gif

Recorded at 3840 x 2160p, downsampled to 1280 x 720p:
3342425--261040--GeometryFlickeringReduced.gif

Although not perfect, it’s certainly acceptable for my first video in Cinemachine. Will post a link to the full video when it’s done.

Thanks again!

1 Like

Good stuff.

In the old pre-render days we used to sample edges with a 3x3 pixel Gaussian filter to get rid of this malarkey. It took forever!

Congrats on making a worst-case AA torture setup.

1 Like

I will do my best again next time :smile:

Edit: Full video can be seen here:

https://vimeo.com/250260427