NEW! Method for rasterizing polygons with ANTI-ALIASING!

29 posts / 0 new
Last post
TheVinn
Offline
Last seen: 2 months 3 weeks ago
Joined: 29 Aug 2009 - 11:31
NEW! Method for rasterizing polygons with ANTI-ALIASING!

Its not often that a completely new algorithm for efficiently rendering anti-aliased polygons and bezier curves comes around the block, but HERE IT IS!!!!!

http://josiahmanson.com/research/wavelet_rasterization/

jules
Offline
Last seen: 10 hours 54 min ago
Joined: 29 Apr 2013 - 18:37
Re: NEW! Method for rasterizing polygons with ANTI-ALIASING!

Wow! Didn't really think there could be any other way to do it.. I don't understand the mathematical squiggles in their paper, but the code looks pretty simple. Sadly they say that it's 3x slower than AGG, so it's probably also slower than my current code, but the quality looks great.

TheVinn
Offline
Last seen: 2 months 3 weeks ago
Joined: 29 Aug 2009 - 11:31
Re: NEW! Method for rasterizing polygons with ANTI-ALIASING!

jules wrote:
Wow! Didn't really think there could be any other way to do it.. I don't understand the mathematical squiggles in their paper, but the code looks pretty simple. Sadly they say that it's 3x slower than AGG, so it's probably also slower than my current code, but the quality looks great.

3x slower yes but the authors admit their code is unoptimized. And on the plus side, the wavelet rasterization can be parallelized easily.

So on a related note, is the interface to the juce LowLevelSoftwareRenderer sufficient that this wavelet rasterization method could be swapped in programatically, at run time, without changing any Juce library code? If not, it should be!

jfitzpat
Offline
Last seen: 1 week 4 days ago
Joined: 10 Jan 2012 - 05:29
Re: NEW! Method for rasterizing polygons with ANTI-ALIASING!

Very cool!

In the small world department, I know the guy's professor, Scott Schaefer, slightly. Another of his students, who is now at Pixar, contacted me about a paper I did in the early 80's. We had been doing animated vector graphics for laser projection on a 2MHz Z80 (Epcott Center, Stone Mountain, Yes, Pink Floyd, etc), using multiplying DACs cascaded together to do the actual matrix math in analog. Paul Rother had gone on to Digital Productions, an early player in Digital Imaging for film (2010, Last Starfighter, etc), but we teamed up again to do some special projects. On one of them used a screaming 8MHz Hitachi Z80 clone. Heady with all that power, we decided to do real time shape morphing. The scheme worked and I wrote it up for others.

But when the kid contacted me, I didn't understand a word he said. I felt like a caveman gnawing on an antelope bone when a futuristic hovercraft swoops in, pops open, and a highly evolved future being sticks his head out and thanks you for your accidental discovery that dirt isn't consume by fire...

jules
Offline
Last seen: 10 hours 54 min ago
Joined: 29 Apr 2013 - 18:37
Re: NEW! Method for rasterizing polygons with ANTI-ALIASING!

:lol:

Andrew J
Andrew J's picture
Offline
Last seen: 1 hour 54 min ago
Joined: 15 Feb 2011 - 12:26
Re: NEW! Method for rasterizing polygons with ANTI-ALIASING!

TheVinn wrote:
So on a related note, is the interface to the juce LowLevelSoftwareRenderer sufficient that this wavelet rasterization method could be swapped in programatically, at run time, without changing any Juce library code? If not, it should be!

It'd be nice if we could swap in the AGG method too.

jules
Offline
Last seen: 10 hours 54 min ago
Joined: 29 Apr 2013 - 18:37
Re: NEW! Method for rasterizing polygons with ANTI-ALIASING!

Andrew J wrote:
TheVinn wrote:
So on a related note, is the interface to the juce LowLevelSoftwareRenderer sufficient that this wavelet rasterization method could be swapped in programatically, at run time, without changing any Juce library code? If not, it should be!

It'd be nice if we could swap in the AGG method too.

Why!? I'm sure my rasteriser is just as good as the AGG one!

Andrew J
Andrew J's picture
Offline
Last seen: 1 hour 54 min ago
Joined: 15 Feb 2011 - 12:26
Re: NEW! Method for rasterizing polygons with ANTI-ALIASING!

jules wrote:
Andrew J wrote:
It'd be nice if we could swap in the AGG method too.

Why!? I'm sure my rasteriser is just as good as the AGG one!

I'm sorry to have confused things here - what I meant was I'd love to make use of the font rasterisation technique mentioned on the AGG site.

Your rasteriser is very good and fast. I very much like everything about it other than the lack of LCD optimised rasterisation.

I've been looking at your code for quite some time to see if I can make sense of it and update it myself, but it's been a fitful effort and I fear my poor brain isn't quite up to it! I'm currently grappling with the EdgeTable iterator trying to figure out how that works with the ClipRegion stuff. Any tips on how to compute the sub-pixel data would be greatly appreciated... :D

jules
Offline
Last seen: 10 hours 54 min ago
Joined: 29 Apr 2013 - 18:37
Re: NEW! Method for rasterizing polygons with ANTI-ALIASING!

For LCD rendering I think you'd only need to worry about the edge table handling, not the clip regions. I've not thought about it in detail, but I guess that you'd just make the edge tables 3x wider than normal, and use the result as your R, G, B alphas, rather than a single alpha value.

Andrew J
Andrew J's picture
Offline
Last seen: 1 hour 54 min ago
Joined: 15 Feb 2011 - 12:26
Re: NEW! Method for rasterizing polygons with ANTI-ALIASING!

Making the EdgeTable 3x wider makes perfect sense and I think I see what you mean about the ClipRegions.

The renderers would need changing though. For instance, the SolidColour renderer is instantiated with the specific colour. It could only render R/G/B levels separately if either it's given the 3x pixel data or it's told what RGB value to use for each pixel. Either way, that's a non-trivial change to the design.

jules
Offline
Last seen: 10 hours 54 min ago
Joined: 29 Apr 2013 - 18:37
Re: NEW! Method for rasterizing polygons with ANTI-ALIASING!

Yes, I guess there'd need to be an alternative edge table iterator that produces 3 alpha values per pixel rather than 1, and then each renderer would need to have an extra function or two to handle that.

Pages