Planetside Software Forums

General => Terragen Discussion => Topic started by: reck on November 10, 2008, 03:12:14 PM

Title: Pixel Filters
Post by: reck on November 10, 2008, 03:12:14 PM
So has anyone got any useful information on the new Pixel filters? I know some of these filters are used in other 3d apps and i've seen their docs but i'm more interested in how they work in TG. For instance I know some are pretty basic, some offer sharper results while others softer but is there a general all round good filter to use in TG.

Maybe it's best to use one filter over another when developing certain scenes, but which filter should be used where?

Also has anyone got a grasp on how each of the filters affects rendering speed. I know box is the most basic filter but does it render a lot faster than say Mitch or Catmull? If not is there any point in box any more?

Right now when it comes to render a "final" output i'd be pretty much guessing which filter to use, some guidance would be handy if anyone can offer some.
Title: Re: Pixel Filters
Post by: Mohawk20 on November 10, 2008, 04:41:59 PM
Once my current render with a rock object is complete I'll run a scene with definite hard edges through all the filters and post the result here with all the rendertimes.

It could take a while though, perhaps a day or 2...
Title: Re: Pixel Filters
Post by: reck on November 10, 2008, 05:11:06 PM
Nice Mohawk.

I've just done a quick test with a default scene and a sphere added. I rendered the same scene with each of the filters.

No filters - 0.34
1.10-Box-1.11
2.10-Tent-1.37
3.10-Narrow Cubic-1.36
4.10-Cubic B-Spline (soft)-3.28
5.10-Michell-Netravali-3.27
6.10-Catmull-Rom (sharp)-3.36

I think the scene was a bit to basic to get a good result but roughly speaking box is certainly the fastest with catmull the slowest. The ones in-between took roughly the same amount of time. In terms of quality it's hard to tell with this very basic scene. Box was the worst but there wasn't much in it with the others.
Title: Re: Pixel Filters
Post by: old_blaggard on November 10, 2008, 05:24:32 PM
I don't think that there's going to be any specific answers. In some of my scenes, I've actually decided to stick with Box because the others seemed to soften things a bit too much. It all depends on the context, though.
Title: Re: Pixel Filters
Post by: dandelO on November 10, 2008, 07:20:15 PM
I like to use Catmull-Rom with AA bloom checked. This keeps everything really snappy but softens up really bright reflections/highlights beautifully with the bloom option.
Title: Re: Pixel Filters
Post by: Matt on November 10, 2008, 11:32:59 PM
Hi Reck,

What did you mean "No filters"? What is the difference between your settings for "No filters" and for Box? And I'm afraid I don't undestand what the first set of number (1.10, 2.10, 3.10 etc.) mean.

Matt
Title: Re: Pixel Filters
Post by: Matt on November 10, 2008, 11:37:10 PM
Some of the filters will add some time to the render, as will anti-aliasing bloom (but not necessarily additively, i.e. aa-bloom won't make as much difference to the render time with catmull-rom as it will with one of the simpler filters like box). But these time differences should tend to amortize on more complex renders, simply because more time is spent on the actual rendering.

Also, these filters will make more difference to render times with higher AA settings.

Matt
Title: Re: Pixel Filters
Post by: reck on November 11, 2008, 03:52:49 AM
Quote from: Matt on November 10, 2008, 11:32:59 PM
Hi Reck,

What did you mean "No filters"? What is the difference between your settings for "No filters" and for Box? And I'm afraid I don't undestand what the first set of number (1.10, 2.10, 3.10 etc.) mean.

Matt


By no filters I just mean i'm not using AA at all, the AA setting is set to 0.

The first number is just the order that they appear in the drop-down 1 for box down too 6 for Catmull. The 10 is the AA setting I used for the filter. Now you mention it it does look a bit cryptic. The numbers after the filter name is obviously the time to render.

Thanks for the useful info.
Title: Re: Pixel Filters
Post by: Mohawk20 on November 11, 2008, 05:16:51 PM
Okay, here are 6 renders, without AA bloom.

The times:
Box                          - 0:46:32
Tent                        - 0:47:42
Narrow Cubic             - 0:48:28
Narrow Cubic B-Spline - 0:48:56
Mitchell-Netravali       - 0:48:49
Catmull-Rom              - 0:48:31

I chose to render a simple scene the still takes a relatively long time, to see how the rendertime is affected. On 3 quarters of an hour, one or two minutes don't matter that much.

The differences in effect can clearly be seen, close up, but perhaps even more so in the distance.
Narrow Cubic B-Spline gives the smoothest results in this case.


Next post will have the same test with AA Bloom on.
Title: Re: Pixel Filters
Post by: Matt on November 11, 2008, 06:36:00 PM
The fourth filter is just called "Cubic B-Spline". The word "narrow" is only included in the third filter to distinguish it from the cubic filters used by other renderers because the "Narrow Cubic" uses a smaller filter width than might be expected by someone who has worked with pixel filters. I don't mean to sound pedantic, but.. there we are.. :)
Title: Re: Pixel Filters
Post by: Matt on November 11, 2008, 06:40:04 PM
These appear to have no anti-aliasing? Or the white stones are extremely bright?
Title: Re: Pixel Filters
Post by: Mohawk20 on November 11, 2008, 06:41:19 PM
Good to know...

On the other hand, I care more about the effect than about the name  ;)


The stones have an opacity of 0, and have a very bright light under them, so the scene tests the extreme.
The light comes from a 2nd planet that is 6.3779e+006 in size, while the planet with the fake stones is 6.378e+006. The smaler planet has a surface layer with a luminosity of 100.

Oh, and the AA strength is the default 3 in these renders.
Title: Re: Pixel Filters
Post by: Matt on November 11, 2008, 06:47:48 PM
If the hard aliasing is due to the white parts being very, very bright, then you will not be able to see most of the differences that these filters produce, and you are in the territory that anti-aliasing bloom is designed to handle (with the other filters not really being the important factor anymore).
Title: Re: Pixel Filters
Post by: Oshyan on November 12, 2008, 12:57:49 AM
Here are some earlier filter tests I did. Check file names for the filter types.

- Oshyan
Title: Re: Pixel Filters
Post by: Oshyan on November 12, 2008, 12:58:45 AM
Continued...

- Oshyan
Title: Re: Pixel Filters
Post by: Oshyan on November 12, 2008, 01:00:47 AM
And finally...

- Oshyan
Title: Re: Pixel Filters
Post by: reck on November 12, 2008, 03:49:54 AM
This is what i'm talking about. Some nice images here to compare the different filters.

Oshyan, I notice that will a couple of the filters with bloom turned off the sunlight on the water, the reflections, have black lines round the highlights. I'm talking here about the Catmull-Rom and Mitchell-Netravali filters.

Mohawk, the filters don't seem to be having much affect on your test images, presumably because of the reason Matt mentioned.
Title: Re: Pixel Filters
Post by: Mohawk20 on November 12, 2008, 05:34:02 AM
Quote from: reck on November 12, 2008, 03:49:54 AM
Mohawk, the filters don't seem to be having much affect on your test images, presumably because of the reason Matt mentioned.

That's why I'm running the same test with Bloom on.
Still you could clearly see Cubic B-Spline did give better results than the others..
Title: Re: Pixel Filters
Post by: dandelO on November 12, 2008, 06:05:32 AM
I think cubic B-spline is really too soft to use for a general scene. It works well on your high contrast images above because it blurs so much.
In general I'd only use this for distance shots of background scenery to be postworked in afterwards, a kind of fake DOF effect could be achieved. Never know though, I might find another use for it at some point...
Title: Re: Pixel Filters
Post by: Matt on November 12, 2008, 10:12:43 AM
Quote from: reck on November 12, 2008, 03:49:54 AM
Oshyan, I notice that will a couple of the filters with bloom turned off the sunlight on the water, the reflections, have black lines round the highlights. I'm talking here about the Catmull-Rom and Mitchell-Netravali filters.

The catmull-rom and mitchell-netravali filters have "negative lobes" which have a slight sharpening effect. Unfortunately when you're sharpening high dynamic range images you have this problem of very bright pixels having very dark edges. When anti-aliasing bloom is on, Terragen changes the filter for bright pixels, avoiding this problem.

Matt
Title: Re: Pixel Filters
Post by: reck on November 12, 2008, 10:26:38 AM
Ah I did wonder if it was because of negative lobes  ???. With those sort of images you would be using the aa bloom anyway so it doesn't really matter.
Title: Re: Pixel Filters
Post by: rcallicotte on November 12, 2008, 01:22:17 PM
Planetside, thanks for this information.  It's a great addition to TG2 and nice to know how it works.
Title: Re: Pixel Filters
Post by: Mohawk20 on November 12, 2008, 02:31:24 PM
I just finished the Bloom batch. Not that I can see much difference, but the times might still be interesting...

Box                          - 0:52:15
Tent                        - 0:52:05
Narrow Cubic             - 0:53:58
Cubic B-Spline           - 0:53:41
Mitchell-Netravali       - 0:54:54
Catmull-Rom              - 0:53:51

So overall the fastest time is Box without Bloom at 0:46:32 against the longest Mitchell-Netravali with Bloom at 0:54:54
So on almost an hour render time, the difference is only about 8 minutes... I can live with that.
Title: Re: Pixel Filters
Post by: Matt on November 12, 2008, 02:38:03 PM
You're gonna hate me for doing this again...  ;D   but I think you mixed one of the non-bloom images in there. Sorry!

;)
Title: Re: Pixel Filters
Post by: Mohawk20 on November 12, 2008, 02:58:41 PM
Fixed


What should I do without you Matt?  :D
Title: Re: Pixel Filters
Post by: Mohawk20 on November 12, 2008, 04:27:07 PM
I'm currently rendering an old scene with high luminosity (lightning strike) with Bloom effect.
I enabled 'supersample prepass', and I noticed that the bloom effect is already visible in the GI prepass.
Title: Re: Pixel Filters
Post by: dandelO on November 12, 2008, 10:29:10 PM
I noticed this when I was playing around with luminosity on the moon today. Cool, eh?
Title: Re: Pixel Filters
Post by: Mohawk20 on November 13, 2008, 03:48:20 AM
Matt, do you remember saying this?:
Quote from: Matt on October 18, 2008, 02:22:48 PM
Quote from: Mohawk20 on October 18, 2008, 07:36:58 AM
This is THE best news I heard all week, finally a bloom option, so no more PhotoShop needed!
This raises one question though: Will this also work outside the atmo, in orbit shots? And will the bloom expand if the luminosity value is increased?

You may still want to apply more effective bloom or glow effects in Photoshop. The anti-aliasing bloom is basically just the "first line of defence" against aliasing of very bright pixels, in case no other post processing is done. In a future version we would like to add more controllable post-processing filters, but we don't want to do that until we have a system for editing them interactively on finished renders.

It only has a maximum radius of 5 pixels, and it only add just enough bloom to avoid obvious stair-stepping (jaggies) when pixels are too bright to be anti-aliased using normal techniques. The bloom does expand depending on the brightness of the pixels, but only up to 5 pixels for the very brightest objects such as the sun. It works on any pixels, whether inside or outside an atmosphere.

Matt

(Or should that be "last line of defence"? Maybe I should quit with the analogies...)

I'll prove you wrong!
You just made a great leap forward with this bloom.

The first image below is the original render with an older version of TG2.
The second image is the old exr output tonemapped, and brightened, blurred and set to 'brighten' the layer below it, which was the one without filters.

The last image is the pure bmp output of the latest version, with AA Bloom at Narrow Cubic, and Microvertex and Detail Jittering.

Just look at the improvements there!!!
Title: Re: Pixel Filters
Post by: lonewolf on November 13, 2008, 05:00:53 AM
That last one rocks! Even the water looks incredible.
Such a vast difference, and may I say, a slight increase in lightning detail compared to modified exr.

Iain

P.S. You do however need more atmo samples now though.  ;)
Title: Re: Pixel Filters
Post by: freelancah on November 13, 2008, 05:07:42 AM
Wow that last one is just marvelous! I haven't had time to test any of these yet but looks very usefull :)
Title: Re: Pixel Filters
Post by: rcallicotte on November 13, 2008, 07:51:07 AM
Mohawk, thanks for all your work here.  This is all incredibly helpful.
Title: Re: Pixel Filters
Post by: Matt on November 13, 2008, 09:38:23 AM
I see what you mean, it looks good. But I need to say that the huge glow around the contact point is not caused by the anti-aliasing bloom - it just doesn't create that much glow. Maybe it's the atmosphere being illuminated by the lightning bolt using GI. Because the lightning bolt is such a narrow source of light, it could be a matter of luck whether the atmosphere around it catches it or not. It's a very tricky thing for the GI engine to solve accurately. Supersample prepass may have helped though.

Or maybe it could be the light source (?) at the bottom, but I guess you didn't make any changes to that? I'm not sure really, but it's not because of anti-aliasing bloom.

Matt
Title: Re: Pixel Filters
Post by: Matt on November 13, 2008, 09:44:13 AM
Did you add any extra fog or haze?
Title: Re: Pixel Filters
Post by: Mohawk20 on November 13, 2008, 10:44:50 AM
I didn't add anything, just checked the jittering and AA/Bloom.
Title: Re: Pixel Filters
Post by: Matt on November 13, 2008, 01:47:39 PM
Hmm.. if it was rendered in an older version than 1.9.99.1 it could be due to something I improved with light sources in the atmosphere. All improvements, whatever the cause :)

Matt
Title: Re: Pixel Filters
Post by: Mohawk20 on November 14, 2008, 03:22:07 AM
I guess you're right, the heavy glow is there without the AA Bloom.
Still nice to see that's fixed as well though...
Title: Re: Pixel Filters
Post by: moodflow on November 14, 2008, 09:27:18 AM
Yes, I've noticed "subtle" improvements in the lighting on the scene since the Beta.  The scenes just "look better".  Or I am going crazy.   ;D
Title: Re: Pixel Filters
Post by: rcallicotte on November 14, 2008, 09:47:41 AM
Shhh.  Electro-brain therapy is no fun.



Quote from: moodflow on November 14, 2008, 09:27:18 AM
Or I am going crazy.   ;D
Title: Re: Pixel Filters
Post by: arlyn9391 on May 19, 2009, 05:02:32 AM
Quote from: reck on November 10, 2008, 03:12:14 PM
So has anyone got any useful information on the new Pixel filters? I know some of these filters are used in other 3d apps and i've seen their docs but i'm more interested in how they work in TG. For instance I know some are pretty basic, some offer sharper results while others softer but is there a general all round good filter to use in TG.

Maybe it's best to use one filter over another when developing certain scenes, but which filter should be used where?

Also has anyone got a grasp on how each of the filters affects rendering speed. I know box is the most basic filter but does it render a lot faster than say Mitch or Catmull? If not is there any point in box any more?

Right now when it comes to render a "final" output i'd be pretty much guessing which filter to use, some guidance would be handy if anyone can offer some.


Thank you for sharing with us that information about the pixel filters. A pixel filter is also for creating a Mandelbrot set, right?




_________________
Furnace Filter (http://www.iaqsource.com/furnace_filters.php)
Title: Re: Pixel Filters
Post by: domdib on May 19, 2009, 05:48:43 AM
No, the pixel filters control the relative sharpness/smoothness of the image. They're not for making fractals.
Title: Re: Pixel Filters
Post by: Walli on May 19, 2009, 07:51:25 AM
I guess its not possible to implement a distance based pixelfilter? Because for landscape renders this would give you some sort of DOF for free. The DOF effect in typical landscape scenes is subtle. So if it would be possible to use the sharper filter in the foreground, and a softer in the back, then this would a nice thing..
Title: Re: Pixel Filters
Post by: domdib on May 19, 2009, 05:45:07 PM
Walli's idea sounds pretty smart - I second it!