ParticleIllusion 3: Getting Rid of Color Fringing in After Effects

OK, you’ve worked really hard on creating some nice fire and smoke in pIllusion, even put it over a background to get a rough idea of what it will look like, but when you import it into After Effects, you get color fringing around the smoke, and the colors seem to saturated. 

Particles on a BG in pIllusion Particles composited on BG in AE

Technical Stuff You Can Skip

The problem is that pIllusion uses an intense (or additive) method of calculating the alpha channel, even for particles that are not intense. While the edges of the smoke particles' RGB channel are quite transparent, pIllusion is creating a non-proportionate buildup of white in the alpha channel where particles overlap – This allows some of the Black BG to contribute to the RGB channel, even if you choose "remove Black BG from Alpha Channel" option. 

RGB Channel in pIllusion Alpha channel in pIllusion (Alt + A to see Alpha Channel)

 As you can see, if we look at the alpha channel for this frame (using Alt+A), we see that the smoke's alpha channel  is too white at the edges and the empty middle parts (which are, technically, also edges as well).

With that in mind, Wondertouch added the Create Non-Intense Alpha export option, which creates an alpha channel that is not additive. So you end up getting an Alpha Channel that looks like this:

Non Intense Alpha Channel (Alt + Shift + A) to toggle between Alpha Channel and Non-Intense Alpha Channel

FYI -  If you are only using intense particles (such as fireworks or sparkles) than the normal (intensity-based) alpha channel should work perfectly in After Effects -  no color fringing. However the color's themselves might be too saturated. Try using the "screen" layer transfer transfer mode, which seems to be the closest thing to pIllusion's internal method of compositing particles over a BG.


Depending on what kind of particles you are using, there are 2 different methods of getting rid of the color fringing:

Method I: If you are using both Intense (glowing) and Non-Intense Particles (such as Fire and Smoke)

To get rid of Color Fringing, you have to take a few simple steps in pIllusion, when you export, and then a few in AE when you import. You can grab a sample pIllusion 3 file here.

 1. Click on the record button to save your animation as a sequence of images:

 2.  In the Save As dialog, name your image sequence and chose a file format that supports alpha channel export (such as TIF or TGA). Also make sure to chose a location to render to, and hit OK.

 3. In the Output Options dialog chose the following options:

 - Save Alpha

 - DO NOT USE Remove Black BG from Alpha

 - Create Non-Intense Alpha

 -Everything else is optional. It will work with Enable Compression, and it works whether it is an image sequence or a single frame.

 4. Click OK.

 In After Effects:

 1. Import your image or sequence through the file import dialog (for more info on importing image sequences into AE click here.

 2. When you get the Interpret footage dialog, choose Straight – Unmatted from the Alpha Options 

Yeah you're right, it doesn't seem to make sense - we rendered with a black BG (premultiplied), but we're telling AE we have no BG (Straight). We need it this way so that when we get to step 4, things work out . Trust me.

 3. Now, when you drop particle image sequence over your other layers (or plain background) the black color fringing is mostly gone, but so is the fire! Only the smoke is visible.

 

4. To bring the fire back into our relationship, we need to choose  the "Luminescent Premultiply" layer transfer mode found in the Mode area of the Timeline:

 - For your comparison:

Particles composited on BG in AE (using Non-Intense Alpha, and Luminescent Premultiply) Particles on a BG in pIllusion

- As you can see they look exactly the same.  Luminescent premultiply uses the alpha channel for the non-intense particles, but also uses something very similar to the Screen transfer mode for the Intense particles.

There are some warnings though. The Luminescent Premultiply mode fudges the edges of the alpha channel a bit, so any effect that utilize the edges or alpha channel will likely have trouble. Also, blurring looks completely wonky and doesn't do anything you expect it to.

So, while this method works it isn't always ideal - especially if you are only using non-intense particles - like smoke (with no fire). That brings us to our next section...


Method II: If you are using only Non-Intense Particles (such as Smoke)

This is a simpler and makes more sense...

1. Click on the record button to save your animation as a sequence of images:

 2.  In the Save As dialog, name your image sequence and chose a file format that supports alpha channel export (such as TIF or TGA). Also make sure to chose a location to render to, and hit OK.

 3. In the Output Options dialog chose the following options:

 - Save Alpha

 - Remove Black BG from Alpha

 - Create Non-Intense Alpha

  - Everything else is optional. It will work with Enable Compression, and it works whether it is an image sequence or a single frame.

 4. Click OK.

 In After Effects:

 1. Import your image or sequence through the file import dialog (for more info on importing image sequences into AE click here.

 2. When you get the Interpret footage dialog, choose Straight – Unmatted from the Alpha Options.

 3. Now, when you drop particle image sequence over your other layers (or plain background) the black color fringing is gone and all looks right. Isn't life wonderful?

Truth be told, you could have used Method I (above) for this as well, but it's roundabout, and creates problems with certain effects. This method is straightforward, and doesn't cause problems with effects.