Example QC Antialiasing Plugin

There was a recent topic on the QC list regarding antialiased rendering in QC. Due to the way Open GL pixel formats work, and how Quartz Composer (editor) creates its pixel format you dont typically have much room to maneuver. If you are rendering geometry, you are basically out of luck. However, if you are outputting an image, or are using 3D geometry in a render in image patch you could theoretically use the relatively newish OpenGL extension for Antialising for Frame Buffer Objects. The setup is ugly, and its a multistep process, but the results are nice. Here is a sample plugin (also posted to the Apple Quartz Composer Dev list) which shows one way of rendering MSAA + FBO. Because you are using an FBO target the lack of a multisample pixel format being specified the plugins host is not a killer. Just check for the required GL extensions (gl_ext_framebuffer_multisample & gl_ext_framebuffer_blit) , if they exist, go for it. You get antialiased output for very cheap.

In theory, with Kinemes unofficial API you could create an Antialised Render to Image macro patch. Someone needs to get on that ASAP. It would be hot.

Heres the plugin: Download: QCPluginFBOMSAA.zip

Here are before and after images

Before

After

5 Responses to “Example QC Antialiasing Plugin”

  1. toby*spark Says:

    nice. i am, of course, outputting pure geometry, but that is kinda irrelevant in the bigger picture. props, again.

  2. vade Says:

    Ah, toby, tis a shame. You could use that technique in your QC based in development app however, or enable multisample pixel format and use glEnable(GL_MULTISAMPLE)/glDisable(GL_MULTISAMPLE) in your render code in your plugin, which would effectively enable MSAA rendering for your geometry should the hose application have an MSAA’d pixel format?

    Unfortunately QC 3.1 does not let you alter the pixel format ‘after the fact’. Its a shame… and it should be there, its so few lines of code to enable multisample support…

  3. B1scu1T Says:

    How much of a hit does this have on performance?

  4. vade Says:

    Really not much, both run at 60. Id be curious to run Kinemes performance monitor on these patches to see though. Download the source and check it out :)

  5. B1scu1T Says:

    Sorry to be a noob but how/where do i install this too?

    Thanks

Leave a Reply