Rendering Different Layers

How do I render various separate layers to be post edited in the node compositor if those separate layers overlap and intertwine with eachother. For example a a group of flowers is intertwined with a field of grass but I want to beable to render them separately but when I bring the 2 images together in the node compositor the grass and flowers are still intertwined without the grass completely blocking the flowers or vise versa.
I’m currently using the old version of blender 2.49 if that makes any difference between the way it’s done in either version…

You can use a “z combine” node in the compositor which will use the stored depth information in the z buffer to recombine your layers…

Be careful with transparency (it can stop zvalues for stuff behind) and also be careful of aliasing… (zbuffer is depth and cannot be antialiased so can lead to artifacts.)

Not sure here, but maybe using FSA will defer the antialiasing to after the composite. I tend to keep things simpler!