Archive for September, 2008

September 26, 2008

CPU, GPU, multi-core

There has been a lot of confusion around Pixel Bender and GPUs in CS4. Admittedly, some of it was caused by me :). I wanted to do a clarifying post about GPU, Pixel Bender, and multi-core and how apps in CS4 do different things.

One thing I wanted to correct is the assumption that GPU = FASTER. I’ve seen this misconception a lot, and I think it is confusing some people. The chips on graphics cards (GPUs) are extremely efficient processors capable of doing lots of math in parallel and have the benefits of fast local memory with a super fast connection to the processor. This makes them ideal for the kinds of things that Pixel Bender does. However, this super-efficient processor is connected to the main computer processor by a not-so-fast connection, the bus. Moving data on and off of the GPU is expensive relative to doing things on the GPU directly. What this means is that if you want to do something on the CPU with some data then do something on the GPU and then use the output of the GPU on the CPU again, it might be more expensive than having just done the whole thing on the CPU in the first place. The overhead of the bus transfers can overwhelm the benefits of the fast GPU computation. The busses are getting faster, and when things will work better in one place vs. another is very different from machine to machine. There are a ton of other details I’m glossing over. I’m just trying to make a central point here: that the GPU is not always faster than the CPU.

Pixel Bender is designed to run very efficiently on the GPU, but that design also allows it to execute extremely efficiently on a multi-core CPU. In Flash Player 10, Pixel Bender does not run on the GPU, it does run multi-threaded and executes really fast, especially on multi-core and multi-processor chips (see Tinic’s post for more info). The Flash team really has done an outstanding job with their JITter and their multi-threading and Pixel Bender runs pretty darn fast on every machine I’ve tried (from a lowly single core based laptop to an 8-core Penryn MacPro).

In After Effects CS4, all the OpenGL effects including the new Cartoon Effect, Turbulent Noise, and Bilateral Blur effects are written in Pixel Bender and can run on the GPU or CPU. When don’t they run on the GPU? When you have a non-GPU effect following them in the effects chain on the layer. In those cases, it isn’t clear if you would have a performance gain by running on the GPU. Cartoon is the exception. The algorithm is complex enough that AE assumes it is always faster on the GPU. All 3rd party Pixel Bender filters run multi-threaded on the CPU. This was an architectural decision.

In the Photoshop plug-in, Pixel Bender filters always run on the GPU if you have a graphics card that is supported by CS4. In other cases, the filters run multi-core. The new canvas rotate-pan-and-zoom and the gigantor image support are all done using the GPU. John Nack has lots of details on his blog. One thing I wanted to correct about Photoshop CS4: it is not using CUDA. Not sure how this rumour got out there, but it isn’t true. Not that we aren’t fans of CUDA, we just aren’t shipping anything that uses it in CS4.

There are other apps in CS4 with GPU support, but I wanted to keep this post to the ones that support Pixel Bender, just to clear up the confusion.

5:40 PM Permalink
September 25, 2008

Pixel Bender Toolkit bug with AIF_FLASH_TARGET

This came up on the Pixel Bender forums and on the pre-release forums. I figured I would blog it so that people would catch it in their web searches.

There is a bug in the current version of the Toolkit where the AIF_FLASH_TARGET is ignored when trying to export a PBJ file from the toolkit (although it is not ignored when testing in Flash-compatibility mode). This is an embarrassing bug, we know.

It will be fixed in the next release posted to Adobe Labs. If you are using this pre-processor variable, you can work around the bug for now, by adding the following code to the top of your pbk file when exporting to pbj:


9:40 AM Permalink
September 23, 2008

Spilling the beans… Pixel Bender in CS4

Oh, it is sooo nice to be able to use the letters CS4! Finally, I can let the cat out of the bag on some of the stuff that the Adobe Image Foundation team has been working on since CS3 shipped.

First, I’ll cover the stuff that you might already know because we’d announced it before yesterday:

  • Flash 10 supports Pixel Bender bytecode for custom effects, blends, and number crunching. It runs very efficiently multi-threaded thanks to Tinic. You can export Pixel Bender bytecode from the Pixel Bender Toolkit.
  • We will be shipping a free extension for Photoshop CS4 soon that will let you run Pixel Bender filters as well. John Nack demoed this at Photoshop World and blogged about it. These effects run on your computer’s Graphics card for super fast performance if you have a card that supports them (most do).

Now, for the stuff we announced yesterday (in one form or another):

  • After Effects CS4 supports Pixel Bender filters natively. The existing GPU-accelerated filters are Pixel Bender based and AE CS4 will also automatically load any 3rd party Pixel Bender filters that are put into a known directory.
  • The 1.0 version of the Pixel Bender Toolkit will be available to be installed as part of the After Effects and Flash Authoring CS4 installs.

Now, for the stuff that I can now say, but wasn’t in the CS4 announcement:

  • In addition to Pixel Bender Kernels (pbk) and Pixel Bender Bytecode (pbj), there is another Pixel Bender format. Pixel Bender Graphs (pbg). Pixel Bender Graphs are supported directly in After Effects CS4 and the Photoshop Pixel Bender extension. Pixel Bender Graph is an xml-based format that allows you to combine a network of Pixel Bender Kernels into a single effect for WAAAY more powerful filters. We’ll be posting a new version of the toolkit soon that supports the editing of these graphs and we’ll also be posting a specification for them soon on Adobe labs.
  • We’re adding another tool to the Pixel Bender authoring arsenal. There have been a bunch of 3rd party developers who want to create tools that generate Pixel Bender. To make it easier for them, we’ll be releasing a command-line utility that will allow you to compile a Pixel Bender Kernel file into a Pixel Bender Bytecode file. The work on this is complete. Look for this on labs very soon.

Got questions? Ask in the comments or on the Pixel Bender forum

10:57 AM Permalink
September 16, 2008

Pixel Bender video tutorial

Lee Brimelow has created two video Pixel Bender tutorials on his site A great intro on getting started with Pixel Bender and Flash. The site is a great resource in general with lots of other neato content as well.

9:42 AM Permalink
September 11, 2008

Pixel Bender on twitter

(There will be a bunch of quick posts over the next few days. I’m returning from a super long vacation and stuff has piled up)

I created a PixelBender account on twitter for those who like to tweet. Follow @pixelbender. This account will be only Pixel Bender related stuff, saving those who don’t want to hear about wiffle ball tournaments.

11:55 AM Permalink
September 9, 2008

Video of Pixel Bender in Photoshop.Next!

At the Photoshop World conference last week, Johnny Loiacono and John Nack demoed some new Photoshop coolness. If you missed it there is a video of it at The Creative Suite Podcast. Especially cool was the prominent use of some of the technology from the Adobe Image Foundation team.

The sweet super-fast scrolling and zooming was built on top of Adobe Image Foundation technology by the Photoshop team. In the video, it starts at 16:40.

Johnny and John also showed Pixel Bender filters running in Photoshop for the first time ever. That is at 32:10. This is something that we’ve been working on for a long time and it was great to see it get such a massive roll out.

Expect more news from me about Pixel Bender and Photoshop soon…

9:24 AM Permalink