Dashed lines (made with Freestyle) are rendering inconsistently I have a mesh that I've warped into a landscape (using a Displace modifier and a depth-map image). I've then gone into edit mode for that mesh, selected the edges running in one direction, and selected "Mark Freestyle Edge".


In this way I'm able to render those edges as solid lines using the Freestyle feature. I'm also able to render them as dashed lines.

However, some dash values result in inconsistently sized and spaced dashes, and I'm unable to find a behavior pattern that would explain it, nor or a fix to correct it. Can anyone help?

Edit: To knock things back to a more basic level, here's a simple mesh with 300x300 divisions and 10:20 (dash:space) lines applied to the edges running left-to-right. You can see that even that has problems, though in this case the dashes remain the same size but the spacing gradually seems to get out of whack.

And here's the same mesh (zoomed in) with 2:4 lines applied. In this case the dashes seem to be different weights.

So here's a test file for you (note that all this is happening inside Cycles):


And here's the result of that test file when I render it using the default render settings:

As you can see, the line spacing is inconsistent:


Update May 5th, 2017: As per TK's suggestion I changed line 1009 of 2.78/scripts/freestyle/modules/parameter_editor.py so that sampling = 0.1 and this was the result:

Still some oddness in there, but much much better. Perhaps his permanent fix in the next official release will resolve that. Thanks TK!

Thank you.

Dunstan
I can't get what you show in pictures above:



But I could be doing something different...? You could share your file on http://blend-exchange.giantcowfilms.com/ so we can use the same exact geometry.

I wonder if it could be some kind of this effect, instead: https://xkcd.com/1814/ :D