Skip to main content
OFFICER#88
Inspiring
November 14, 2019
Answered

How to export to Open EXR with alpha chanel without being premultiplied

  • November 14, 2019
  • 2 replies
  • 28451 views

How to export to (Open EXR with alpha chanel without being premultiplied)

 

just render to Open EXR with alpha packed up within frame and not being premultiplied?

 

 

Any thoughs?

Correct answer felixs17274976

OK, I have the correct answer for you, courtesy friends at Adobe.

 

Quit AE and edit the Prefs file called something like Adobe After Effects 17.7 Prefs-indep-general.txt. In the ["Misc Section"] you want to have this:

 

"Allow writing straight alpha into EXR" = 01

 

You may already have it there, with the value set to 00.

 

You can also run a script like this:

 

var section = "Misc Section";
var pref = "Allow writing straight alpha into EXR";
var type = PREFType.PREF_Type_MACHINE_INDEPENDENT;

if(app.preferences.havePref(section, pref, type))
{
	if(app.preferences.getPrefAsBool(section, pref, type))
	{
		alert("EXR straight alpha pref already set to TRUE.");
	}
	else
	{
		alert("EXR straight alpha pref was set to FALSE. Setting to TRUE.");
		
		app.preferences.savePrefAsBool(section, pref, true, type);
	}
}
else
{
	alert("EXR straight alpha pref not set. Setting to TRUE.");
	
	app.preferences.savePrefAsBool(section, pref, true, type);
}

 

 


Sorry, this DID work! I created a script file called EXR.jsx and added the code:

var section = "Misc Section";
var pref = "Allow writing straight alpha into EXR";
var type = PREFType.PREF_Type_MACHINE_INDEPENDENT;

if(app.preferences.havePref(section, pref, type))
{
	if(app.preferences.getPrefAsBool(section, pref, type))
	{
		alert("EXR straight alpha pref already set to TRUE.");
	}
	else
	{
		alert("EXR straight alpha pref was set to FALSE. Setting to TRUE.");
		
		app.preferences.savePrefAsBool(section, pref, true, type);
	}
}
else
{
	alert("EXR straight alpha pref not set. Setting to TRUE.");
	
	app.preferences.savePrefAsBool(section, pref, true, type);
}

 

Then saved it and ran it inside AE and the option is there now! THANK YOU! :)))

2 replies

Inspiring
April 29, 2021

Just came to find out the same thing. Why has this not been addressed yet? Seems like a simple fix. 

There is a caveat to the script file as well - Although the alpha is correctly being exported straight, the flag inside the file is still set to premult so any other software and indeed After Effects will interpret it incorrectly as premult when imported and needs to be manually changed.

Inspiring
April 29, 2021

This option is intentionally left hidden because the EXR spec calls for files to be premultiplied. There is no flag in an EXR to mark it as straight.

 

Some people wanted to put a straight alpha in an EXR for whatever reason, so this allows them to do it, but they are responsible for dealing with whatever issues it may cause down the line.

Known Participant
April 29, 2021

The reason is quite simple.

With a straight alpha matte you can give the colorist a shot with a matching alpha mask in a single file sequence.

More and more colorists ask for alpha masks for particular objects so they can use it during grading. If we can't save alpha as straight the same process requires two separate file sequences - it's just easier to put everything into one.

Inspiring
November 14, 2019

In AE 2020 you can switch to Straight alpha from premultipled. Previous versions forced you to use premultiplied, because that confroms to the EXR spec.

felixs17274976
Inspiring
February 10, 2021

hey fnord, can you explain how to enable this straight alpha feature inside AE? I cannot figure it out! Im running latest version of AE 2020. Im even willing to use a different (older) version of after effects to unlock this feature.

Inspiring
February 10, 2022
Sir, its so much of help and thank you a lot, its working.. Now i get the
straight(unmatted) option on at the time of exporting. But i am unable to
get alpha channel into the rendered file its still showing the background
but no alpha embedded in it. So is there any setting or something to get
both background and alpha together in the footage without any extra render
pass.
Please guide me one more time.
Thanks

I'm not totally sure what you're seeing, but if you render your EXR out straight, you also have to interpret it straight when you bring it back in.