help with CGI character behind real life object?

I really don’t know if this is in the correct section of the forums. If it isn’t, please move it, but here goes nothing.

I’m working on a project with some friends, it’s a live action film, and I’ve been assigned the role of animating it.
Unfortunately, I don’t know how to do as follows:

There’s a scene where a robot walks behind a tree, this tree is real, and the robot is not… This being said, I don’t know how to make a CGI character walk behind a real life object, at least not without a green screen.

any help on the subject would be oh so, very much appreciated.

Can anyone help me with this?

I dont know if it helps or not. but you can model a tree (silhoutte) just in front of your real tree. Move it to another layer. Make it unrenderable. Make your CGI character walk over your CGI tree. Now, when you render the scene, while your character is behind CGI Tree, it will look as if your model is actually behind the Real Tree (cGi tree is going to hide the mesh, also provide shadow ).

Hope this helps.

I believe the tool you are looking for is masking.

Even easier just create a mask in the movie clip tool or the uv image editor, then use the compositor to add it to you robot’s alpha for keying on background.

Thanks so much, to everyone.