0
$\begingroup$

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". enter image description here

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?enter image description here

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.enter image description here

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

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: enter image description here As you can see, the line spacing is inconsistent: enter image description here

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: enter image description here 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

$\endgroup$
  • $\begingroup$ What happens if you do a test disabling the displacement? It could be due to the effect of the modifier. $\endgroup$ – m.ardito Apr 13 '17 at 7:06
  • $\begingroup$ Thanks for the suggestion. I'd already applied the displacement to that mesh and so couldn't undo it. Instead I made a new, simple mesh and updated my post with a couple of examples of the problems I saw with that. $\endgroup$ – Dunstan Apr 14 '17 at 4:31
0
$\begingroup$

The reported issue seems due to a bug in Freestyle. In the case of the latest 2.78 release, there's a line of code shown below at line 1009 of 2.78/scripts/freestyle/modules/parameter_editor.py:

sampling = 1.0

Decrease the assigned value to 0.1 for instance, and you will get much more consistent dashed lines. I will fix the bug so that you won't need to change the code starting from the next official release.

$\endgroup$
  • $\begingroup$ Thanks so much! I've updated my post with the results of changing that value to 0.1. It's not perfect, but it'll get me where I need to be for now. I'll fiddle around with that value some more when I get time and see what happens. Thanks again for your help. $\endgroup$ – Dunstan May 5 '17 at 20:22
0
$\begingroup$

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

enter image description here

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

$\endgroup$
  • $\begingroup$ Thanks for helping me out! If you look closely I'd say that your dashes also don't line up with each other, though it's a bit hard to tell. I've added a test file to my question and also included screenshots of what it looks like when I render using the default render settings. $\endgroup$ – Dunstan Apr 14 '17 at 18:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.