I cannot solve this

I want to render something in which part of the image is done with and edge, and part of it is not. The models are overlapping, so if I render them separately and the re-combine, one is on top of the other.

There must be a compositing technique for doing this, but cannot figure out.

Can someone please give me some advice? Much appreciated.

Attached are simplified examples of what I am talking about. I would like the balls outlined but the lines not to be.

Attachments



if you render an image with the alpha on the balls to 0, those will be transparent. Then to the same again but with the lines. See if that works.

thanks…tried it and see where you are going, but…with edge setting on and the lines made alpha=0 they still get an edge. without edge it works to make empty spaces for where the balls would go.

I see another problem with this in that the balls will have an edge and thus be larger than the original transparent ball, causing an overlap.

image below is line alpha=0 with edge setting on

Attachments


Assuming the that the edge effect is a global post-rendering trick rather than a Materials property, you should be able to duplicate parts of your current Scene – composed of all the lines and balls – into a number of Scenes, each having only certain parts of the entire setup, and give each the rendering specs or post-processing it needs, then re-combine them all into a Composite using Render Layers.

Thanks for the reply. What I am referring to is the ‘edge’ settings in the render output panel. It produces a beautiful edge on your objects if you render them at a high enough resolution but has little control.

I see what you are saying, but if you have a lot of objects, like the image below, which is the real image I want to use the effect on, then I am not sure it is workable, because i would need too many layers, and may not even be able to correctly separate them because of that.

This can be done in photoshop by hand…but that would be a lot of work…

Attachments


Yeah, if "balls & lines " isn’t the actual scene you want to do this with, then it is indeed much more complicated, mainly because of the constantly changing z-depth relationships of the various scene components.

About the only advice I can offer is to analyze your actual sequence(s) very carefully, decide on how various matte components have to be designed, then render both “beauty” passes and matte passes, with an eye to a final post-rendering composite using image sequences rather than Render Layers. I’ve found the Compositor very useful for producing compound mattes – generated from multiple matte passes – that can then be used in layering various pre-rendered sequences together. It’s not simple, but it can be very effective.

Well I appreciate your time. thanks for the advice.

isn’t there some way to use nodes & DOF to get the data you want for compositing?

Don’t turn edge settings on at all.
For the balls just use the colourband (in the Ramps box next to material) to set the ball colour to red and the very edge of the ball to black. You have to use the ‘Normal’ option instead of ‘Shader’ in the Input box.
No bizarre node set up needed.

Thanks! I’ll give that a try when I get a minute.

Codmin:

That’s a great technique. I played around with it and for balls it seems pretty consistent but for more complex shapes it is not as consistent as I need. see the two examples. I also found that you also need to have the interpolation type to ‘constant’ for it to give you that effect.

But it is a cool technique that I will be using for other things. thanks!

image on left is with ramp shader - image on right with edge on…

Attachments



Yes it’s not ideal for all situations. The one you first mentioned it should work well for.
(I don’t think you need the constant type, just move the colour positions of the red and the black for the balls quite close together).
For more complex situations I think using nodes is the way forward.
Probably using render layers with / without ‘edge’ set. And possibly Z Combine.
Probably loads of ways in the end (Sobel filter etc) if you’re some kind of blender guru. Unlike me!