Compositing Grass with other objects.

Hello there,

I’ve always had this problem rendering grass and other objects separetely and then compositing them together.

Take the below example. I rendered the cube (cycles) and grass separetly (In grass, I had the cube material set to “sky” so it creates an alpha of 0 wherever the cube is visible to the camera). Do you see the white line on the right edge of the cube? That’s the background showing through.


Yes, it might be because I am using two different renderers. I rendered the cube separately in BI and still the same thing happens. Although it is less pronounced in this case.

But when I render the entire lot together they are seamless. No gaps whatsoever. What is behind this entire thing? I’ve seen so many pictures made with blender that has loads of grass in it. How was the issue solved there? Is there a better way to render things separetly than mine?

I would like very much to hear all you guys methods or workarounds.

Thanks in advance for any response,

Timothy.

Hi,

I am guessing you already know about zmask but just in case:

http://www.blender.org/development/release-logs/blender-246/rendering-features/

On the sky showing on the cube have you tried turning off the sky pass on the cube layer and seeing if that makes any difference? (Total guess as without the Blend file thats all I can do).

Thanks for replying!

No, I never tried this method before. It works and takes with it all my old problems, so thank you!

This is what I’m doing now:

  • Getting this mask as per the link above.
  • Below which is a render of the cube with the grass set to cast only its shadows.
  • And finally there’s a render of the grass with the cube casting only its shadow. Rather complicated but manageable.

But it does leave a very faint mark at its outlines. Which I’m not able to remove. Though it’s hardly noticeable, I’d still like to find a way to remove it. Do you know a way to do so? :slight_smile:

You asked if I had the sky turned on. No, I didn’t. The bit were the sky could be seen has almost zero alpha. So in gimp, whatever is under it was visible.