Page MenuHome

Freestyle problem with objects with an array modifier
Closed, InvalidPublic


System Information
Windows 10.0.16299.699, version 1709
GTX 750 Ti

Blender Version
Broken: blender-2.79.0-git.76f640c27d8-windows64

Short description of error
Freestyle outlines do not work as expected when used with objects with an array modifier

Exact steps for others to reproduce the error

  1. Open the attached file and render it.
  2. In the upper rectangle array, the vertical freestyle lines are missing between the rectangles with an exception after the 3rd rectangle. This doesn't make sense to me. Depending on the freestyle settings, either every of the 8 rectangles must be outlined, or the silhouette of the whole 8 rectangles. I've played with all freestyle settings but wasn't able to outline all 8 rectangles of the upper array.
  3. For demonstration purpose, I've added the bottom array of rectangles with the only difference of a vertical offset. Here, all vertical freestyle lines are drawn.



Related Objects

Event Timeline

Armin Zingler (willi) updated the task description. (Show Details)

I think I found an explanation for this behavior:
In the bottom array, the vertical offset enables Blender to recognize each of the 8 faces indvidually because there won't be vertices at exactly the same position anymore. In the upper array without the vertical offset, there are double vertices at adjacent edges. Consequently, the 8 rectangles are recognized as one big area.

a) It's not a modifier issue as I first thought. This means, if you "Apply" the modifier, the result is the same,
b) Why is there an exception of the one vertical line after the 3rd rect from the left? Is it a rounding/floating point issue? To check this, I've applied the modifier and output all vertex positions using Python (as the UI shows rounded values). For the vertical line in question, the X values of the related four vertices are: 0.5999999642372131, 0.5999999642372131, 0.5999999046325684, 0.5999999046325684. Obviously, not all vertices are exactly at the same X location. Consequently, freestyle recognizes this as the edge of a shape and draws a vertical line. I didn't verify whether the X values of other related vertices are equal, but probably they are; otherwise a vertical lines would have been drawn for them, too.

So the remaining questions are:

  • Why does the array modifier generate different X values for the vertices in question? If you the X values of the mesh 'Plane.001', they are not exactly +/- 0.12 cm. Instead, they are +/- 0.1199999 etc. (which is, of course, normal floating point storage for this value). Consequently, due to further computations within the modifier, there can be "artifacts" that lead to that vertical line. Is this a bug? I don't know. If, with the array modifier, the "Relative Offset" is 1.0, one could expect that these rectangles are exactly aligned.
  • How to make freestyle outline all 8 rectangles individually? I don't know if it should be able to. As the bottom array shows, it is able to not only outline the whole shape but also the congruent vertical lines between. By design?

When it comes to "visual" issues it's always best to attach images describing it well. In this case maybe even editing how you think it should look.

You get an image if you perform step 1.
What I expect is described in the text. Either an outline around the whole shape of 8 rectangles, or every rectangle to be outlined individually.

Sebastian Parborg (zeddb) claimed this task.

As you guessed, this is a limitation of freestyle, you can use edge marks and the merge option in the array modifier to create an outline of the rectangles.