Freestyle render not showing objects as solid

I need to render line art for background painters to use in the production of a 2D animation. Painting this in 2D would be all but impossible as the art direction changes day to day. The post edges setting in Blender Internal works OK, but the tapered lines of Freestyle look much better. The problem is that Freestyle can’t keep track of Z depth, or what is solid. I don’t know what to try next. I’m not great at compositing, but I’ve put some object on different layers. And, in Cycles I’ve given foreground objects a higher Freestyle order number (material setting). Any other ideas? Please see the examples below.


Above is edge setting in Blender Internal


Freestyle in Blender Internal - lines ignore Z values.


Freestyle in Cycles - lines ignore Z values.

Attachments




Could you share a scene file to test?

After cutting more than half the data out of the scene, it looks like it was still too big to upload to the forum - about 10MB.

Leave only a pair of pillars, and a pair of rails. Does it still have the same issues? If so, post it. I don’t think that can be 10MB in size.

If it is still to big, post it on http://pasteall.org, and send us the link.

The above link will take you to the scene file at Dropbox. I’ve cut out about 70 percent of the environment, but I think I need to leave most of the parts that are in camera view. The fact that it’s a complicated scene is part of my problem. Thank you for your time and feedback.

It seems that Freestyle doesn’t like mixing long edges and short edges (and some are long!). I subdivided the longest edges until artifacts were gone.

I had to subdivide the rails 100 times, and could have been better to subdivide more. It would have been easier if you duplicated the rails the same way you duplicated parts of the pillars (and, maybe, other elements). You can merge vertices between duplicates, and it would make the subdivisions simpler.