2
$\begingroup$

I have a mesh grid. I have selected all the edges of it that run in one direction and applied a freestyle color mix to them so their start is pink, their middle is white, and their end is green.

When I view the rendered mesh like that I can see that each edge is rendered as a single line, with all the colors nicely lined up: enter image description here

Now I apply a displacement modifier to the mesh, using an image. I would expect that each edge would remain as a single, uninterrupted line, warped to fit the displacement map, and with the color placement the same as above – pink on the left, white in the middle, and green on the right.

Instead of that I see a random distribution of colors, indicating that my edges now appear to be made up of many small lines: enter image description here

How can I correct that and achieve a displaced mesh with single, unbroken edges running the full width of my mesh?

(FWIW applying the displacement modifier has no effect on the issue.)

Update: May 7th, 2017 – I tried turning off the "Visibility" setting, as per TK's suggestion, but that didn't fix my problem. The lines are still mostly broken up into small pieces.enter image description here enter image description here

Here's another version of the file that I created from scratch, just to make sure I hadn't unchecked any default settings while fiddling about. It exhibits the same problems. I've applied the Displace modifier to keep thing simple.

Thank you.

Dunstan

$\endgroup$
2
$\begingroup$

With the displacement modifier, the edges are occluded by bumps created by the modifier and hence are no longer fully visible from the camera. Freestyle identifies both visible and hidden lines, and by default draws only visible lines. If you want to draw all lines no matter whether they are visible or hidden, then you need to turn off the selection by visibility (i.e., disable the "Visibility" toggle in the "Selection By" section of the Freestyle Line Set panel).

Update on May 12, 2017

Setting the mesh faces to the smooth shading and turning on the Face Smoothness option could improve the result as you expect.

That said, there seems a bug in Freestyle that prevents visible and hidden lines from getting chained into a single stroke. For instance, the following render shows lines composed of visible and hidden parts. Most lines are consistent in the sense that they start in red and end in green, while some lines are not.

enter image description here

The next image shows some of those inconsistent lines that are expected to be long continuous red-green strokes rather than being split into short pieces.

enter image description here

The render below shows the visibility of line segments in question (visible and hidden parts in red and green, respectively).

enter image description here

By comparing the last two renders, it is seen that in some cases visible and hidden line segments can be chained to form a consistent line, while not in some other cases. I think this is a bug in Freestyle (to be fixed as soon as time permits).

$\endgroup$
  • $\begingroup$ Thanks so much for getting back to me, TK. Your suggested fix makes complete sense, but unfortunately doesn't seem to work. The lines still appear to be broken into many small pieces, as indicated by the distribution of the pink and green colors. I've updated the post with some (hopefully) clearer graphics and also a test file. $\endgroup$ – Dunstan May 7 '17 at 18:03
  • $\begingroup$ TK, that's wonderful! Thank you so much for looking into that again in more depth. I'm sad to see my problem is the result of a bug, but I'm happy to see someone else successfully duplicate the issue. I'll try and work around it for now and hope a fix is lucky enough to sneak in to an upcoming build. $\endgroup$ – Dunstan May 24 '17 at 1:19

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.