Transparent backgrounds?

If you're having trouble using Context Free or don't understand the language, ask for help here.

Moderators: MtnViewJohn, chris, mtnviewmark

Post Reply
AprilR

Transparent backgrounds?

Post by AprilR »

I have figured out how to render images and export and I want to put what I've rendered on a multicolored background. How do I save my image, or make my image have a transparent background so I can put it on my multicolored background.

Thanks!

User avatar
MtnViewJohn
Site Admin
Posts: 882
Joined: Fri May 06, 2005 2:26 pm
Location: Mountain View, California
Contact:

Post by MtnViewJohn »

Put this line in your cfdg file:

Code: Select all

background {a -1}
If you already have a background statement then just add the 'a -1' adjustment to it.

Unfortunately you also need to specify a color for the transparent background even though it is not seen. The current version of Context Free blends the edges of shapes against the background color, even when the background is transparent. This can cause color artifacts at the edges if the background color in the cfdg file does not match the background that you are compositing your image on top of. So you need to set the background color in the cfdg file to match the color of your background.

If your background has many different colors then try using a transparent white background (background {a -1 b -1}) or a transparent black background (background {a -1}) and see what works best.

I hope that you are using the Windows client because the current Mac client has a bug rendering against transparent backgrounds, in addition to the edge blending bug. Both bugs will be fixed in the next release of Context Free.

Post Reply