4
$\begingroup$

I am using the array modifier to create a train track, but I am getting "cuts" between the copies which cause a problem in Freestyle:

enter image description here

enter image description here

The "merge" option on the Array modifier does not fix this. It will close the gap, but does not remove vertices and make continuous geometry.

It is possible to automatically remove those cuts?

$\endgroup$
2
  • $\begingroup$ Make sure there are no "caps" in the rail segments, that means no faces on the ends $\endgroup$ Jun 5, 2017 at 4:47
  • $\begingroup$ I tried removing the "cap" faces, but it has no effect. $\endgroup$
    – Xuan
    Jun 5, 2017 at 5:33

1 Answer 1

4
$\begingroup$

Generally, array segments will have edge loops between them even if you use the merge option. The merge essentially merges the vertices at the bridge between segments, but does not dissolve the edge loops generated by the segmentation.

To avoid seeing the edge loops with freestyle, you can limit the edges that are rendered by freestyle by marking those you want manually, then setting the freestyle to only render marked edges in: enter image description here

To mark an edge, go to edit-mode, then select the edge, press CtrlE --> Mark Freestyle Edge.

To set freestyle to only render marked edges, go to the render layer settings in the options panel, then to the Freestyle Line Set settings, then uncheck everything except Edge Mark.

Alternative method

In this case (and similar cases), where you essentially have an object that simply needs to scale on a specific axis based on the dimensions of another object, you can use a driver instead of an array modifier.

enter image description here

To do this I added a driver to the beam's y scale property (In properties N panel, right click on y scale and then press "Manually create later (single)".

I then added a driver variable (single property type) that points to the wood beams array overall y dimenions (dimensions.y data path), and set the expression to be that variable's value divided by the original y dimensions of the metal beam object (2 in the example above).

This sets the scale so that the metal beam's y dimension fit the wood beam array's overall y dimension, and you have one seamless, "edgeloopless" metal beam that even looks smooth with freestyle renders.

$\endgroup$
4
  • $\begingroup$ The problem with this approach is that I need to use edge marks in combination with other check boxes (edge types). Someone has edited my title. I didn't want to make it about Freestyle, even if the problem happens to relate to Freestyle. I want to know how to merge / remove cuts from the geometry in the array. I should not have fully explained my problem. $\endgroup$
    – Xuan
    Jun 5, 2017 at 8:03
  • $\begingroup$ If you delete the inner faces and check on "merge" on the array modifier, the mesh will indeed be merged and manifold, however that does not mean it will not be segmented with an edge loop marking each segment "bridge". To get rid of those you have to apply the modifier and remove the loops manually. $\endgroup$
    – TLousky
    Jun 5, 2017 at 8:16
  • $\begingroup$ @Xuan I edited the answer to suggest an alternative, driver based approach, that prevents the problem. $\endgroup$
    – TLousky
    Jun 5, 2017 at 9:28
  • 1
    $\begingroup$ It looks like you're saying that the edge loops between copies cannot be automatically dissolved. I will select your post as the answer, and I appreciate the alternate methods, but I suggest you add that the auto-dissolve is not possible in blender, since that technically is the answer. $\endgroup$
    – Xuan
    Jun 5, 2017 at 9:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .