Forum: Carrara


Subject: render lighting effect with alpha channel

Ed opened this issue on Apr 24, 2003 ยท 8 posts


pem posted Fri, 25 April 2003 at 1:04 AM

As a general rule, you do much better to render in several passes and then mix each separate render back together using an individual object mask in a compositing program to get your final render.

For my St. Judy's Comet: Brian image, each element was rendered out as a individual picture with every other element made hidden or made black against a black background (I may have used blue as that was the dominant colour). I then rendered each object again with only a white shader, black background, 100% ambient light, no other lights to create the masks. I then brought all the renders back togther as separate layers in PhotoPaint and from there I was able to adjust the opacity, hue, glow etc of each object using the individual masks I created. In the case of that image, I actually adjusted the figure to be more orange to punch up the colour contrast. This saved me render time as I could make the adjustments with instant feedback in PhotoPaint instead of having to make test renders of the whole scene.

So how does this fit with rendering lighting effects with an alpha channels?

Let's say I want volumetric lights to have their own alpha channel: I set up my lights and then render my scene without the light cone visible. I then render the scene again with a black background and all the objects hidden except the volumetric light. Objects that need to cast shadows in the volumetric light can be made entirely black/white (or nearly transparent) with no reflections,highlight etc. (experiment) When I render this second version, I get the light cone effect against a black background. I then copy this image, adjust it in a Imaging program (convert to 1 bit, push up the contrast, colour mask etc...) to create an alpha mask of the light cone and save it as a separate image. I can then use the manufactured mask image and the image of the light alone to composite them together with the original render. You can do this for lens flares, glows etc.

It takes some planing to figure out what you should be rendering as a separate object to composite later. But this is typical film and high end production stuff: render a colour pass, reflection pass, one pass for each light used, mask passes for each object or effect, etc...

I've attached a example image of how this worked for my Brian image. The masks were created in Carrara by making the objects plain white, the background black, the ambient light 100%, no other lights and hiding all the other objects. This renders very quickly using the zbuffer. Do these steps after you have rendered the other parts of your image and save your Carrara file with a different file name so you don't over-write your original file.

See the final image at http://www3.telus.net/pem/brian.htm (the better version is at the bottom of the page)