is there any way to ''fade out'' the background?i want the front part to stay the same, but i need to fix that 'background (with the red arrow) putting a Black hole/Black color
Is that possible?
Something like this: (but backwards)
Blender Stack Exchange is a question and answer site for people who use Blender to create 3D graphics, animations, or games. It only takes a minute to sign up.Sign up to join this community
You could try blurring the background with a defocus node controlled with a mist pass.
Set your camera to display mist.
Enable mist on the render pass control.
Adjust the mist distance so it starts close to your camera and ends roughly in the area you want to blur.
Then in the compositor set the mist pass trough a color ramp node and use that to control the defocusing of the background.
If you move the sliders on the color ramp you can determine at what distance things start to blur, black will remain in focus, white is where the blur will start. The blur amount is determined by the defocus node max blur settings and the threshold values.
I think that the solution for you is in this link: http://wiki.blender.org/index.php/Doc:2.4/Tutorials/Composite_Nodes/Setups/Blur_the_Background Although I don't know why, but it doesn't work for me. I tried many combinations and ended up with this kind of method (which is experimental). I don't think that this is the proper node setup, but the result is quite fine as you can see below:
Go to Compositing Nodes window and set up the nodes as shown below. Add a Map Value node (Add-->Vector-->Map Value) and experiment with its Offset and Size values.
As I said, I don't think that this is a proper method of doing this, but I wanted to share it with you. It may work for you, but if not, please tell me in comment and I'll delete this answer.
After reading your question again i think this is how i would do it:
This setup changes the Alpha of the all the pixels in the render based on how far from the camera the pixel is. The fade can be adjusted using the ColourRamp node. Bear in mind that the Z value is based on the cameras clipping distances, if you change these you may have to tweak the bottom value in the math (devide) node.
That can be done easily in the Compositor using only nodes. Have a look at this node group:
They will output a nice background like this:
All you need to do now is to add the render image over the top of it. To do that, update your nodes to look like this:
And voila! It works perfectly:
You will of course want to play with color values etc, but the technique is the same.
You may find it works well to use a mixture of this and @ChristyJames answer.