Exporting scenes with transparency
-
Hi Dr Sassi,
When I need to render out an animation of an object that needs a transparent background, I choose the 'Save Alpha Channel' option so I can then import it into After Effects and use it as a matte to give me the transparency I need. My question is, is there a better way to do this? Is it not possible to render out the animation with transparency already there? It would be great to save the step of having to set up the mattes in AE.
Kind Regards
David -
Hi David,
There are several methods to do that, but if I understand correctly, you want the pixels to contain nothing if not the object in question. The problem here is that the alpha information is needed to Composite things and, of course, for any color grading to match the other background.
The problem with "transparency" baked into pixels is that the transparency values influence the change you do to the non-transparent. For example, border pixes have 50% visibility. The whole image needs to be a stop darker, but the 50% transparency gets only a half-stop darker. The same happens to any blend mode applied or color correction/grading.That is why the Alpha is preferably in a fourth channel for RGB and creates an RGBA image or two files, RGB and A.
If the transparency is in the mix already, it must be Un-premultiplied. Then, it is processed.
The ideal setup is Straight Alpha
https://help.maxon.net/c4d/2025/en-us/Default.htm#html/DRENDERSETTINGS-RDATA_GROUP_SAVE.html#RDATA_STRAIGHTALPHA
Here, the pixels are rendered fully as long as the transparency is not 100%, the slightest opaqueness, and the pixel is rendered fully for the object. Ideally. Now, any blend-mode or color change will be applied first, then the transparency (Alpha) will be applied) The merge node on the compositing software will then use the alpha value for both images to set the mount for each pixel in a mix, ideally to achieve 100%. It is not just slapped over a background.Steve Wright's Book, Digital Compositing for Film and Video, is a great source— if possible, use the 5th edition. I'm biased here as I took a Class from him in 2005 about "Shake" compositing, and lately, I reviewed his last book. Read Chapter Seven, and you will know a lot about image composites.
In Ae, you can set the alpha version used for the file via "Interpret Footage"; if you have different files RGB plus A, then you can set this TrackMatte. If you don't work in float, set the Color Settings for the mask containing channel to Preserve RGB, as Alpha has no gamma.
I suggest using float-based formats, not integers (Gamma ≠1), and anything larger than sRGB/REC 709 as color space for good results. The processing "pipeline" should be larger if that is your output gamut. Different views about this exist, but we are no longer in the '90s.
.
Depending on the rendering engine, the options vary: Let me know if that helps or if you need something else about exploring this theme.Enjoy your work.
-
Hi Dr Sassi,
Yes that's correct. I often need to render an object with very simple animation, just the object rotating on its own for example with no background. So I need the background transparent so I can bring the rotating object in to AE where I then add other elements such as backgrounds and text etc. The way I have been doing it is by saving out the extra Alpha channel in the render settings window, then in AE importing that to use for the matte to get the background transparent. I guess I was hoping for a way to render it out from Cinema in one go, similar to how you can export an image in Photoshop as a PNG with transparency for example. I've a lot to learn being a newbie so I may be a bit naive on this yet
-
Thank you very much for the reply, David.
I like separate files, but that is a personal preference. The "all in one" is given if the Object in Cinema 4D is alone in the scene, at least what direct visibility concerns. Then, the Alpha (Straight) can be in one go. This requires file formats that can have RGBA. For quality, I exclude all 8bit/channel options, given that back in the '90s, typically, TV stations even ask for at least 10bit/channel. Apple ProRess has 4444 options RGBA (but Cinema 4D writes it an extra A_file out, which can be ignored for your purposes, which means quality plus alpha. Render Settings, Quicktime> Options. (use 16 bit/channel)
More options exist for masks (mattes, alphas), but that depends on the render engine used, like Object Buffer, or in Redshift 3D, the Puzzle matte or Crypto matte.
If you use OpenEXR, you can have a lot of different Channels inside one file. Which requires image sequences, but those are seen by Ae as one "file". The Extractor can then take the channels out. The upside is if you have to change anything, the re-render (with the same channel structure) can be done by replacing one.
The best thing to do is to explore what your work needs. Make sure you know what your screen can show you, as the bandwidth between what the file can hold and what the screen can show might be extremely different. A lot of productions are done now in SDR and HDR, while an older screen can't often even represent the little sRGB/Rec 709 gamut. So, knowing what is represented is key. There is the idea if it looks right, it must be right, it is obsolete. If you have any options to screen on a newer HDR TV screen, this should be part of your exploration.
So, I say sorry to make it so complex. I hope it places at least a good motivation to handle this part. We have moved into a new time with new challenges for a while now, and what was kind of OK back then is not a path to success these days.
The best book to start is "The Color Management Handbook for Visual Effects Artists: Digital Color Principles, Color Management Fundamentals & ACES Workflows" by Victor Perez. Get the Kindle version.
Example:
https://projectfiles.maxon.net/Cineversity_Forum_Support/2024_PROJECTS_DRS/20240925_CV4_2441_drs_24_AEal_01 folder.zipMy best wishes
-
Hi Dr Sassi,
Thankyou so much for the reply, your advice is absolute gold! I tried experimenting rendering out with the ProRes 4444 and the options and that gave me exactly what I wanted For the time being and the current workflow this is ideal. This saves me a few extra steps, which when there's a lot of files it all mounts up, and saves quite a bit of time (I'm always expected to get a load of videos done for a particular deadline you see). I will seek out those books you recommended, I have a lot to learn but I know if they're recommended by you I know they will be top notch Thanks again Dr Sassi
Kind Regards
David -
You're very welcome, David.
Thanks for the kind feedback.
The typical suggestion is to render in image sequences, just in case something happens (power off, etc.)
But if that works for you as needed, use itThe ProRes forma has many qualities. Here is an overview.
https://support.apple.com/en-us/102207ProRes 4444 in 16-bit is surely a good format.
The 422 is more for preview IMHO, these days it is a delivery but not a pipeline format. (If we talk about alpha, it should be named 4220 )
Enjoy